D18144: Implemented find function from console

2019-02-13 Thread Albert Astals Cid
aacid closed this revision. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular, aacid Cc: ngraham, aacid, yurchor, okular-devel, tfella, darcyshen

D18144: Implemented find function from console

2019-02-13 Thread Albert Astals Cid
aacid accepted this revision. aacid added a comment. This revision is now accepted and ready to land. Ah, you got bitten by findbar not being visible to the test. I'll fix the test in a commit just after landing this, have a look in you're interested in the creative solution. REPOSITORY

D18144: Implemented find function from console

2019-02-08 Thread Joao Oliveira
joaonetto added a comment. It seems I can't get the text on the findBar widget, so I can't test if the text there is equivalent to the intended. If it was found or not is not imperative to the test, since this is tested on the searchtext.cpp REPOSITORY R223 Okular REVISION DETAIL http

D18144: Implemented find function from console

2019-02-08 Thread Joao Oliveira
joaonetto updated this revision to Diff 51229. joaonetto added a comment. Added two tests. First one tests if the findBar was opened and second tests the decryption REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=51070&id=51229 BRANCH arcpatch-

D18144: Implemented find function from console

2019-02-06 Thread Albert Astals Cid
aacid added a comment. In D18144#406831 , @joaonetto wrote: > I don't know a lot about autotests, therefore I'm not so sure that it is implemented correctly. I can implement it, but I would need some assistance. Your test isn't testing a

D18144: Implemented find function from console

2019-02-06 Thread Joao Oliveira
joaonetto added a comment. I don't know a lot about autotests, therefore I'm not so sure that it is implemented correctly. I can implement it, but I would need some assistance. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular Cc: ngraham,

D18144: Implemented find function from console

2019-02-06 Thread Joao Oliveira
joaonetto updated this revision to Diff 51070. joaonetto added a comment. Changed decrypt to shellUtils. Implemented a test REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=50806&id=51070 BRANCH arcpatch-D18144_2 REVISION DETAIL https://phabrica

D18144: Implemented find function from console

2019-02-06 Thread Albert Astals Cid
aacid added a comment. Do you think you could create an autotest for this? If not it's fine, but would make sure things don't break in the future. INLINE COMMENTS > shell.cpp:684 > KDocumentViewer* const doc = qobject_cast(part); > +const QString > find(QByteArray::fromBase64(Shell

D18144: Implemented find function from console

2019-02-03 Thread Joao Oliveira
joaonetto updated this revision to Diff 50806. joaonetto added a comment. Changed find String to a encrypted base64 string. REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49685&id=50806 BRANCH arcpatch-D18144_2 REVISION DETAIL https://phabrica

D18144: Implemented find function from console

2019-01-31 Thread Albert Astals Cid
aacid added a comment. Using ; as a separator works, but only so far we don't need to add another parameter there, then it'll be a problem. So i would prefer if you used QByteArray toBase64/fromBase64 on the string, this way we can continue using : as delimiters and all works fine.

D18144: Implemented find function from console

2019-01-29 Thread Joao Oliveira
joaonetto added a comment. Ping REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular Cc: ngraham, aacid, yurchor, okular-devel, tfella, darcyshen

D18144: Implemented find function from console

2019-01-16 Thread Joao Oliveira
joaonetto updated this revision to Diff 49685. joaonetto added a comment. Fixed bug when searching for strings with : and some cleanup REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49497&id=49685 BRANCH arcpatch-D18144_2 REVISION DETAIL https

D18144: Implemented find function from console

2019-01-15 Thread Albert Astals Cid
aacid added a comment. Please make sure you configure your text editor to not change whitespaces, there's lots of unneeded whitespace changes that we don't want. INLINE COMMENTS > part.cpp:1602 > +// Tries to find the text passed from terminal after the file is open > +findTe

D18144: Implemented find function from console

2019-01-14 Thread Joao Oliveira
joaonetto updated this revision to Diff 49497. joaonetto added a comment. Code cleanup, only important parts should be changed REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49496&id=49497 BRANCH arcpatch-D18144 REVISION DETAIL https://phabric

D18144: Implemented find function from console

2019-01-14 Thread Joao Oliveira
joaonetto updated this revision to Diff 49496. joaonetto added a comment. Deleted signal, now I call the function after the file has been open REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49420&id=49496 BRANCH arcpatch-D18144 REVISION DETAIL

D18144: Implemented find function from console

2019-01-14 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > joaonetto wrote in part.cpp:1716 > Tried this, didn't work for network files Right, you actually want it in openFile() not in openUrl, sorry :) REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular C

D18144: Implemented find function from console

2019-01-13 Thread Joao Oliveira
joaonetto updated this revision to Diff 49420. joaonetto added a comment. Not initializing the variable was causing crashes. Fixed it REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49349&id=49420 BRANCH arcpatch-D18144 REVISION DETAIL https://

D18144: Implemented find function from console

2019-01-12 Thread Joao Oliveira
joaonetto updated this revision to Diff 49349. joaonetto added a comment. Changed variable names and deleted QString after use REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49325&id=49349 BRANCH arcpatch-D18144 REVISION DETAIL https://phabric

D18144: Implemented find function from console

2019-01-12 Thread Joao Oliveira
joaonetto added inline comments. INLINE COMMENTS > aacid wrote in part.cpp:1716 > That is, move the code from findTextOnStartUp here, also clean up the > textToFind variable. Tried this, didn't work for network files REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D1814

D18144: Implemented find function from console

2019-01-12 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > part.cpp:377 > +// also connect to the find argument from terminal, searching only after > loading file. > +connect(this, SIGNAL(completed()), this, SLOT(findTextOnStartUp())); > connect(this, &KParts::ReadOnlyPart::canceled, this, > &

D18144: Implemented find function from console

2019-01-12 Thread Joao Oliveira
joaonetto updated this revision to Diff 49325. joaonetto added a comment. Deleted remains and formatting issues REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49324&id=49325 BRANCH arcpatch-D18144_1 REVISION DETAIL https://phabricator.kde.org/

D18144: Implemented find function from console

2019-01-12 Thread Joao Oliveira
joaonetto updated this revision to Diff 49324. joaonetto added a comment. Made changes that allows file to be searched only when loaded REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49206&id=49324 BRANCH arcpatch-D18144_1 REVISION DETAIL http

D18144: Implemented find function from console

2019-01-11 Thread Albert Astals Cid
aacid added a comment. In D18144#391700 , @joaonetto wrote: > It seems that it tries to search before copying the file, so I'm searching an empty string. Let me see what I can do to improve that. Maybe wait until the document is completely copi

D18144: Implemented find function from console

2019-01-11 Thread Joao Oliveira
joaonetto marked an inline comment as done. joaonetto added a comment. It seems that it tries to search before copying the file, so I'm searching an empty string. Let me see what I can do to improve that. Maybe wait until the document is completely copied? REPOSITORY R223 Okular REVISION

D18144: Implemented find function from console

2019-01-11 Thread Albert Astals Cid
aacid added a comment. Doesn't work when opening files from the network, i.e. do okular https://bugs.freedesktop.org/attachment.cgi?id=140739 --find poppler and you'll see that poppler is not highlighted, while if you save the file locally and do the same it'll work REPOSITORY R22

D18144: Implemented find function from console

2019-01-10 Thread Joao Oliveira
joaonetto updated this revision to Diff 49206. joaonetto added a comment. Changed the code so I no longer use query. REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49193&id=49206 BRANCH arcpatch-D18144 REVISION DETAIL https://phabricator.kde.o

D18144: Implemented find function from console

2019-01-10 Thread Albert Astals Cid
aacid added a comment. Using query is a bad idea, now if i actually open a file that has a query in it, it opens the find bar for no reason okular https://bugs.freedesktop.org/attachment.cgi?id=140739 REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joa

D18144: Implemented find function from console

2019-01-10 Thread Joao Oliveira
joaonetto updated this revision to Diff 49193. joaonetto added a comment. one last change to avoid repeating code. I guess it's ready to land, just need a reviewer. REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49190&id=49193 BRANCH arcpatch-D1

D18144: Implemented find function from console

2019-01-10 Thread Joao Oliveira
joaonetto updated this revision to Diff 49190. joaonetto added a comment. Using command find from terminal now opens FindBar REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49125&id=49190 BRANCH arcpatch-D18144 REVISION DETAIL https://phabricat

D18144: Implemented find function from console

2019-01-10 Thread Yuri Chornoivan
yurchor added a comment. In D18144#390624 , @joaonetto wrote: > Tried that, not possible, it gets me compilation error. Ooops... Sorry. Otherwise, I can confirm that the patch works as expected. INLINE COMMENTS > part.cpp:1730 > +

D18144: Implemented find function from console

2019-01-10 Thread Joao Oliveira
joaonetto added a comment. Tried that, not possible, it gets me compilation error. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular Cc: yurchor, okular-devel, ngraham, darcyshen, aacid

D18144: Implemented find function from console

2019-01-10 Thread Joao Oliveira
joaonetto added a reviewer: Okular. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D18144 To: joaonetto, #okular Cc: yurchor, okular-devel, ngraham, darcyshen, aacid

D18144: Implemented find function from console

2019-01-09 Thread Yuri Chornoivan
yurchor added inline comments. INLINE COMMENTS > shellutils.cpp:85 > { > -return > QStringLiteral("%1:%2:%3:%4:%5:%6").arg(startInPresentation).arg(showPrintDialog).arg(showPrintDialogAndExit).arg(unique).arg(noRaise).arg(page); > +return > QStringLiteral("%1:%2:%3:%4:%5:%6:%7").arg(st

D18144: Implemented find function from console

2019-01-09 Thread Joao Oliveira
joaonetto added inline comments. INLINE COMMENTS > part.cpp:1724 > } > > +if( url.hasQuery() ){ Is this some bad practices? I'm sending as ID for search 1, since it's the first search, fromStart is set as false, since the document could be in another page. Change viewport is set as

D18144: Implemented find function from console

2019-01-09 Thread Joao Oliveira
joaonetto updated this revision to Diff 49125. joaonetto added a comment. Deleted iostream used in main for debugging REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18144?vs=49124&id=49125 BRANCH find (branched from master) REVISION DETAIL https://phab

D18144: Implemented find function from console

2019-01-09 Thread Joao Oliveira
joaonetto created this revision. Herald added a project: Okular. Herald added a subscriber: okular-devel. joaonetto requested review of this revision. REVISION SUMMARY Implemented feature request to find from console. BUG: 362038 REPOSITORY R223 Okular BRANCH find (branched from maste