rjvbb added a comment.

  >   The legacy argc,argv is handled by QCommandLineParser.
  
  Only partly, the annoying bit where you loop over the array to see which 
options are there. For the rest it only handles Qt-specific arguments, and 
files to be opened end up in the `positionalArguments()` list.
  
  QApplication cannot know if your application can (or should be able to) open 
files, even less how to open them.
  All Qt can do is provide an integrated Qt'ish mechanism through which get 
informed when the user intends to open a document via LaunchServices. That 
mechanism encapsulates the ObjC implementation Sergio referred to, and such 
events can occur at any moment, also when the application is already running.
  
  And so yes, every Qt application that wants to be able to open files through 
the Finder and other LaunchServices mechanisms must implement a handler (event 
filter) for QFileOpenEvents.

REPOSITORY
  R223 Okular

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

To: sbragin
Cc: ltoscano, rjvbb, #okular, michaelweghorn, ngraham, aacid

Reply via email to