D13203: Add Typewriter annotation tool in Okular
tobiasdeiminger added inline comments. INLINE COMMENTS > dileepsankhla wrote in parttest.cpp:1582 > First of all, in CloseDialogHelper, `m_clicked` is always false as > `m_part->widget()->findChild();` returns NULL for the QInputDialog > being the activeModalWidget. So I didn't use it. > > Secondly, I agree that the low tests should be independent but I'm using > `QTimer` technique in `testTypewriterAnnotTool` to grab the pointer to the > active QInputDialog widget for which I need to connect the SIGNAL timeout() > to the SLOT testDialogClosed which eventually becomes another test method. So > I can't do it in only a single method instead need two different methods in > which one of them becomes the slot of QTimer implementation. In this case. do > you think I should do the same in the dedicated class like PartTestAnnotation? > > Thirdly, to verify if the annotation is created correctly, what parameter(s) > should I check? > m_part->widget()->findChild(); returns NULL for the QInputDialog That's because QInputDialog is not a child of the part, but a "window" with no parent. You can slightly modify CloseDialogHelper and it will work: void closeDialog() { //QDialog *dialog = m_part->widget()->findChild(); QWidget * dialog = qApp->activeModalWidget(); Afaikt this is also compatible with the remaining locations where CloseDialogHelper is used. If you apply the change, CloseDialogHelper::m_part is no longer required and can be removed. Construct CloseDialogHelper with QDialogButtonBox::Cancel or QDialogButtonBox::Ok, to click either the Ok or the Cancel button. > So I can't do it in only a single method instead need two different methods > in which one of them becomes the slot of QTimer implementation. The problem goes away if you use CloseDialogHelper. > Thirdly, to verify if the annotation is created correctly, what parameter(s) > should I check? A perfect UI test would be to check for the painted annotation. As you deferred it because it's too difficult, how about checking `part->m_document->page(0)->annotations()` for the expected typewriter annotation? REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D13203 To: dileepsankhla, tobiasdeiminger Cc: ltoscano, ngraham, tobiasdeiminger, aacid, okular-devel
D13203: Add Typewriter annotation tool in Okular
dileepsankhla added inline comments. INLINE COMMENTS > tobiasdeiminger wrote in parttest.cpp:1582 > The QInputDialog is pure Qt functionality, just closing it is not that > interesting in a typewriter test case. The more interesting thing is to > verify if annotation is created correctly after closing. First of all, in CloseDialogHelper, `m_clicked` is always false as `m_part->widget()->findChild();` returns NULL for the QInputDialog being the activeModalWidget. So I didn't use it. Secondly, I agree that the low tests should be independent but I'm using `QTimer` technique in `testTypewriterAnnotTool` to grab the pointer to the active QInputDialog widget for which I need to connect the SIGNAL timeout() to the SLOT testDialogClosed which eventually becomes another test method. So I can't do it in only a single method instead need two different methods in which one of them becomes the slot of QTimer implementation. In this case. do you think I should do the same in the dedicated class like PartTestAnnotation? Thirdly, to verify if the annotation is created correctly, what parameter(s) should I check? REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D13203 To: dileepsankhla, tobiasdeiminger Cc: ltoscano, ngraham, tobiasdeiminger, aacid, okular-devel
[okular] [Bug 395517] can't set print default to duplex
https://bugs.kde.org/show_bug.cgi?id=395517 Amnon changed: What|Removed |Added CC||amye...@gmail.com -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 395517] New: can't set print default to duplex
https://bugs.kde.org/show_bug.cgi?id=395517 Bug ID: 395517 Summary: can't set print default to duplex Product: okular Version: 1.3.3 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: printing Assignee: okular-devel@kde.org Reporter: amye...@gmail.com Target Milestone: --- Created attachment 113384 --> https://bugs.kde.org/attachment.cgi?id=113384=edit screenshot As of the latest version: KUBUNTU 18.04 OKULAR 1.3.3 that I installed a few says ago, OKULAR ignores the system-wide printer default "long side duplex", and offers "none" as the default. This causes frequent wasteful printing! -- You are receiving this mail because: You are the assignee for the bug.