Fix mainshelltest (and as a side-effect docdata saving)

Review Request #126192 - Created Nov. 28, 2015 and submitted

Information
Alex Richardson
okular
frameworks
cb6d871...
Reviewers
okular
aacid

Try fixing mainshelltest: one more passes now

QUrl is not automatically exposed to DBus so the DBus call would fail.
Changed the parameter to QString instead so that DBus invocation works.


mainshelltest: set QStandardPaths to test mode


Parse command line flags with a single dash as a long option

Unlike KCmdLineArgs QCommandLineParser treats options starting with a
single minus as multiple short options by default.

Previously okular -unique would fail with the following error:
Unknown options: u, n, i, q, u, e.

Also changed mainshelltest to use two dashes in case this behaviour
should change in the future.

mainshelltest failures have been reduced from 15 to 4 by this commit.


Fix docdata saving and added a warning message if it fails

If the ~/.local/okular/docdata directory didn't exist previously
creating the docdata file would fail as there are missing paths.

It seems that KStandardDirs used to create the okular/docdata directory
automatically, with QStandardPaths we have to create it manually.

mainshelltest is down to one failed test now


Fix final test case in mainshelltest

as we call QProcess::terminate the exit code will not be 0

mainshelltest now passes and documents are opened where I last viewed them

Issues

  • 0
  • 8
  • 0
  • 8
Description From Last Updated
Albert Astals Cid
Alex Richardson
Albert Astals Cid
Alex Richardson
Alex Richardson
Alex Richardson
Alex Richardson
Alex Richardson
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 1b2de0d1d074769005db01b8de47e26c7e310057 by Albert Astals Cid on behalf of Alex Richardson to branch frameworks.
Albert Astals Cid
Ship It!
Loading...