#include "mac_startup.h"
#include "macfullscreen.h"
#endif
-#ifdef APP_WIN
-#include "local/win/qtwin.h"
-#endif
#include "iconloader/qticonloader.h"
int main(int argc, char **argv) {
#endif
QtSingleApplication app(argc, argv);
- if (app.sendMessage("Wake up!"))
+ QString message = app.arguments().size() > 1 ? app.arguments().at(1) : "";
+ if (app.sendMessage(message))
return 0;
app.setApplicationName(Constants::NAME);
mainWin.setWindowTitle(Constants::NAME);
#ifdef Q_WS_MAC
+ app.setQuitOnLastWindowClosed(false);
mac::SetupFullScreenWindow(mainWin.winId());
#endif
#endif
#ifdef APP_WIN
- if (QtWin::isCompositionEnabled()) {
- QtWin::extendFrameIntoClientArea(&mainWin);
- mainWin.setContentsMargins(0, 0, 0, 0);
- }
app.setFont(QFont("Segoe UI", 9));
#endif
mainWin.show();
+ mainWin.connect(&app, SIGNAL(messageReceived(const QString &)), &mainWin, SLOT(messageReceived(const QString &)));
app.setActivationWindow(&mainWin, true);
// all string literals are UTF-8