logic: file associations for Mac and opening project files via Mac OS
* hide start screen when opening with project file * added project icon file to bundle and file type association to plist * listen for file open events from double click or drag and drop * fixed crashes in window handling
This commit is contained in:
+10
-13
@@ -1,25 +1,22 @@
|
||||
#include <memory>
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "utility/AppPath.h"
|
||||
#include "utility/logging/ConsoleLogger.h"
|
||||
#include "utility/logging/FileLogger.h"
|
||||
#include "utility/logging/LogManager.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
#include "utility/Version.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "includes.h" // defines 'void setup(int argc, char *argv[])'
|
||||
#include "LicenseChecker.h"
|
||||
#include "qt/commandline/QtCommandLineParser.h"
|
||||
#include "qt/window/QtMainWindow.h"
|
||||
#include "qt/window/QtSplashScreen.h"
|
||||
#include "qt/network/QtNetworkFactory.h"
|
||||
#include "qt/QtApplication.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "qt/view/QtViewFactory.h"
|
||||
#include "qt/window/QtMainWindow.h"
|
||||
#include "qt/window/QtSplashScreen.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "utility/AppPath.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
void init()
|
||||
{
|
||||
@@ -40,14 +37,10 @@ int main(int argc, char *argv[])
|
||||
Version version = Version::fromString(GIT_VERSION_NUMBER);
|
||||
|
||||
setup(argc, argv);
|
||||
QApplication qtApp(argc, argv);
|
||||
QtApplication qtApp(argc, argv);
|
||||
QApplication::setApplicationName("Coati");
|
||||
QApplication::setApplicationVersion(version.toDisplayString().c_str());
|
||||
|
||||
QtCommandLineParser commandLineParser;
|
||||
commandLineParser.setup();
|
||||
commandLineParser.process(qtApp);
|
||||
|
||||
qtApp.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
QPixmap whitePixmap(500, 500);
|
||||
@@ -60,6 +53,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
init();
|
||||
|
||||
QtCommandLineParser commandLineParser;
|
||||
commandLineParser.setup();
|
||||
commandLineParser.process(qtApp);
|
||||
|
||||
QtViewFactory viewFactory;
|
||||
QtNetworkFactory networkFactory;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user