D10249: Option to exit after printing

2018-02-02 Thread Dileep Sankhla
dileepsankhla added a comment.


  @aacid Agree that only one exit call is required but what about the exit 
status - EXIT_SUCCESS or EXIT_FAILURE? The issue description talked about the 
command line batch processing. For that purpose, should I set a bool "isError" 
when failing condition is encountered like "printing is not allowed" and then 
based on the isError's status, should I call either exit (EXIT_SUCCESS) or exit 
(EXIT_FAILURE)?

INLINE COMMENTS

> aacid wrote in part.cpp:3219
> You have far too many exit calls, i'm 99% sure you could have just one.

Agree that only one exit call is required but what about the exit status - 
EXIT_SUCCESS or EXIT_FAILURE? The issue description talked about the command 
line batch processing. For that purpose, should I set a bool "isError" when 
failing condition is encountered like "printing is not allowed" and then based 
on the isError's status, should I call either exit (EXIT_SUCCESS) or exit 
(EXIT_FAILURE)?

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular, ngraham
Cc: ngraham, aacid, #okular, michaelweghorn


KDE CI: Applications okular stable-kf5-qt5 FreeBSDQt5.9 - Build # 23 - Still Unstable!

2018-02-02 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Applications%20okular%20stable-kf5-qt5%20FreeBSDQt5.9/23/
 Project:
Applications okular stable-kf5-qt5 FreeBSDQt5.9
 Date of build:
Fri, 02 Feb 2018 23:41:21 +
 Build duration:
37 min and counting
   JUnit Tests
  Name: (root) Failed: 2 test(s), Passed: 13 test(s), Skipped: 0 test(s), Total: 15 test(s)Failed: TestSuite.mainshelltestFailed: TestSuite.parttest

D10249: Option to exit after printing

2018-02-02 Thread Albert Astals Cid
aacid added inline comments.

INLINE COMMENTS

> part.cpp:3219
> + delete printDialog;
> + exit ( EXIT_SUCCESS );
> + }

You have far too many exit calls, i'm 99% sure you could have just one.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular, ngraham
Cc: ngraham, aacid, #okular, michaelweghorn


D10249: Option to exit after printing

2018-02-02 Thread Dileep Sankhla
dileepsankhla added a reviewer: ngraham.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular, ngraham
Cc: ngraham, aacid, #okular, michaelweghorn


D10249: Option to exit after printing

2018-02-02 Thread Nathaniel Graham
ngraham edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10249: Option to exit after printing

2018-02-02 Thread Dileep Sankhla
dileepsankhla edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10249: Option to exit after printing

2018-02-02 Thread Dileep Sankhla
dileepsankhla added a reviewer: Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10249

To: dileepsankhla, aacid, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10249: Option to exit after printing

2018-02-02 Thread Dileep Sankhla
dileepsankhla created this revision.
dileepsankhla added a reviewer: aacid.
Restricted Application added a subscriber: Okular.
Restricted Application added a project: Okular.
dileepsankhla requested review of this revision.

REVISION SUMMARY
  When running okular with the parameter --print to directly open the print 
mode, it doesn't exit after acknowledging the print dialog. Hence adding 
--print_and_exit option exits okular 
  after ackowledging the print dialog and thus useful for command line batch 
processing or a Dolphin service as the issue suggests.
  
  BUG: 318998

TEST PLAN
  1. open a file in Okular using the parameter --print. It will open Okular in 
print mode with the print dialog
  2. Either print the file or cancel the print dialog
  3. You will find that Okular stays open
  4. Now using this patch, see for available options with the --help parameter. 
You will find --print_and_exit option
  5. Now open a file in Okular using the parameter --print_and_exit. It will 
open Okular in print mode with the print dialog
  6. Either print the file or cancel the print dialog
  7. You will find that Okular closes after acknowledging the dialog

REPOSITORY
  R223 Okular

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D10249

AFFECTED FILES
  autotests/mainshelltest.cpp
  part.cpp
  part.h
  shell/main.cpp
  shell/shell.cpp
  shell/shellutils.cpp
  shell/shellutils.h

To: dileepsankhla, aacid
Cc: ngraham, aacid, #okular, michaelweghorn


D10007: Fix Build with Purpose

2018-02-02 Thread Tomaz Canabrava
tcanabrava abandoned this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10007

To: tcanabrava, #okular, apol
Cc: michaelweghorn, aacid, ltoscano, #okular, ngraham