diff options
author | Marius Kintel <marius@kintel.net> | 2014-02-05 05:27:05 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2014-02-05 05:27:05 (GMT) |
commit | 0f3de6ca8ab02609919fd2a98fce65c6d7b54166 (patch) | |
tree | 161908a465ce198fc4b20e2503b2dfeb49fbbd69 | |
parent | 00d20bb5ac94e64700216e046f6650542b9bb187 (diff) |
Qt5: Ported Q_WS usage to Q_OS
-rw-r--r-- | src/Preferences.cc | 8 | ||||
-rw-r--r-- | src/QGLView.cc | 2 | ||||
-rw-r--r-- | src/openscad.cc | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc index 92f11c7..2cd38cf 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -50,11 +50,11 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) // Editor pane // Setup default font (Try to use a nice monospace font) QString fontfamily; -#ifdef Q_WS_X11 +#ifdef Q_OS_X11 fontfamily = "Mono"; -#elif defined (Q_WS_WIN) +#elif defined (Q_OS_WIN) fontfamily = "Console"; -#elif defined (Q_WS_MAC) +#elif defined (Q_OS_MAC) fontfamily = "Monaco"; #endif QFont font; @@ -367,7 +367,7 @@ void Preferences::on_forceGoldfeatherBox_toggled(bool state) void Preferences::keyPressEvent(QKeyEvent *e) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period) { close(); } else diff --git a/src/QGLView.cc b/src/QGLView.cc index 6ffd586..83acf23 100644 --- a/src/QGLView.cc +++ b/src/QGLView.cc @@ -217,7 +217,7 @@ void QGLView::mouseMoveEvent(QMouseEvent *event) double dy = (this_mouse.y()-last_mouse.y()) * 0.7; if (mouse_drag_active) { if (event->buttons() & Qt::LeftButton -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC && !(event->modifiers() & Qt::MetaModifier) #endif ) { diff --git a/src/openscad.cc b/src/openscad.cc index 5c21fa9..ad6cbf9 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -463,7 +463,7 @@ static QString assemblePath(const fs::path& absoluteBase, bool QtUseGUI() { -#ifdef Q_WS_X11 +#ifdef Q_OS_X11 // see <http://qt.nokia.com/doc/4.5/qapplication.html#QApplication-2>: // On X11, the window system is initialized if GUIenabled is true. If GUIenabled // is false, the application does not connect to the X server. On Windows and @@ -486,7 +486,7 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha } #endif QApplication app(argc, argv, true); //useGUI); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC app.installEventFilter(new EventFilter(&app)); #endif // set up groups for QSettings @@ -499,7 +499,7 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha QDir exdir(app_path); QString qexamplesdir; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC exdir.cd("../Resources"); // Examples can be bundled if (!exdir.exists("examples")) exdir.cd("../../.."); #elif defined(Q_OS_UNIX) @@ -519,11 +519,11 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha MainWindow::setExamplesDir(qexamplesdir); parser_init(app_path.toLocal8Bit().constData()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC installAppleEventHandlers(); #endif -#if defined(OPENSCAD_DEPLOY) && defined(Q_WS_MAC) +#if defined(OPENSCAD_DEPLOY) && defined(Q_OS_MAC) AutoUpdater *updater = new SparkleAutoUpdater; AutoUpdater::setUpdater(updater); if (updater->automaticallyChecksForUpdates()) updater->checkForUpdates(); @@ -560,7 +560,7 @@ int gui(const vector<string> &inputFiles, const fs::path &original_path, int arg int main(int argc, char **argv) { int rc = 0; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC set_output_handler(CocoaUtils::nslog, NULL); #endif #ifdef ENABLE_CGAL |