Skip to content
Permalink
Browse files

Use platform menubars on Windows

This allows the tests and QML code to be unified, as all platforms
now use native menubars.
  • Loading branch information...
mitchcurtis committed Mar 2, 2018
1 parent 53626c7 commit 465166841bd5bd362a0471f88d69697efa60cb2b
@@ -53,7 +53,6 @@ HEADERS += \
$$PWD/changelayervisiblecommand.h \
$$PWD/changelayeropacitycommand.h \
$$PWD/deletelayercommand.h \
$$PWD/platformdefines.h \
$$PWD/addlayercommand.h \
$$PWD/applygreedypixelfillcommand.h \
$$PWD/guide.h \
@@ -19,9 +19,7 @@

#include "application.h"

#ifndef NON_NATIVE_MENUS
#include <QApplication>
#endif
#include <QFontDatabase>
#include <QLoggingCategory>

@@ -51,17 +49,11 @@

Q_LOGGING_CATEGORY(lcApplication, "app.application")

#ifdef NON_NATIVE_MENUS
typedef QGuiApplication QtApplicationType;
#else
typedef QApplication QtApplicationType;
#endif

static QGuiApplication *createApplication(int &argc, char **argv, const QString &applicationName)
{
QLoggingCategory::setFilterRules("app.* = false");
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QtApplicationType *app = new QtApplicationType(argc, argv);
QApplication *app = new QApplication(argc, argv);
app->setOrganizationName("Mitch Curtis");
app->setApplicationName(applicationName);
app->setOrganizationDomain("mitchcurtis");
@@ -25,7 +25,6 @@
#include <QtQml>

#include "applicationsettings.h"
#include "platformdefines.h"

class Application
{
@@ -389,7 +389,12 @@ void ApplicationSettings::setExportShortcut(const QString &shortcut)

QString ApplicationSettings::defaultCloseShortcut() const
{
#ifdef Q_OS_WIN
// Ctrl+F4 is apparently the default, but is not what we want.
return QLatin1String("Ctrl+W");
#else
return QKeySequence(QKeySequence::Close).toString();
#endif
}

QString ApplicationSettings::closeShortcut() const

This file was deleted.

Oops, something went wrong.
@@ -49,8 +49,7 @@ ApplicationWindow {
title: qtbug53394Title
visible: true

// Leave this uncommented until the cursor/focus issue is fixed
onActiveFocusItemChanged: print(activeFocusItem)
// onActiveFocusItemChanged: print(activeFocusItem)

property string qtbug53394Title: project && project.loaded
? ((project.url.toString().length > 0 ? project.displayUrl : "Untitled") + (project.unsavedChanges ? "*" : ""))
@@ -157,7 +156,7 @@ ApplicationWindow {
canvas: window.canvas
}

menuBar: Ui.MenuBar {
Ui.MenuBar {
id: menuBar
projectManager: window.projectManager
canvas: window.canvas
@@ -38,7 +38,6 @@
<file>ui/ProjectTemplateButton.qml</file>
<file>ui/NewImageProjectPopup.qml</file>
<file>ui/CanvasContainer.qml</file>
<file>ui/+windows/MenuBar.qml</file>
<file>ui/NewLayeredImageProjectPopup.qml</file>
<file>ui/ImageTypeCanvas.qml</file>
<file>ui/TilesetTypeCanvas.qml</file>

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 4651668

Please sign in to comment.
You can’t perform that action at this time.