Skip to content

Commit

Permalink
Fix rvls -x skipping license validation on MacOS (#634)
Browse files Browse the repository at this point in the history
### Fix rvls -x skipping license validation on MacOS

### Summarize your change.

Initialized the QCoreApplication on MacOS before creating the bundle.

### Describe the reason for the change.

The QCoreApplication was not being created properly on MacOS. This
caused the license validation to be skipped since the the validation was
checking the application name which did not exist.

### Describe what you have tested and on which operating system.

Successfully tested on MacOS

Signed-off-by: Éloïse Brosseau <[email protected]>
Co-authored-by: Bernard Laberge <[email protected]>
  • Loading branch information
eloisebrosseau and bernie-laberge authored Nov 25, 2024
1 parent f792dd7 commit ee1ecd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bin/imgtools/rvls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ TARGET_LINK_LIBRARIES(
stl_ext
Boost::headers
yaml_cpp
Qt5::Core
)

IF(RV_TARGET_DARWIN)
Expand Down
3 changes: 2 additions & 1 deletion src/bin/imgtools/rvls/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#ifdef PLATFORM_DARWIN
#include <DarwinBundle/DarwinBundle.h>
#include <QtCore/QtCore>
#else
#include <QTBundle/QTBundle.h>
#endif
Expand Down Expand Up @@ -577,11 +578,11 @@ vector<string> readSession(string path)
int utf8Main(int argc, char** argv)
{
TwkFB::ThreadPool::initialize();
const QCoreApplication qapp(argc, argv);

#ifdef PLATFORM_DARWIN
TwkApp::DarwinBundle bundle("RV", MAJOR_VERSION, MINOR_VERSION, REVISION_NUMBER);
#else
QCoreApplication qapp(argc, argv);
TwkApp::QTBundle bundle("rv", MAJOR_VERSION, MINOR_VERSION, REVISION_NUMBER);
(void) bundle.top();
#endif
Expand Down

0 comments on commit ee1ecd5

Please sign in to comment.