diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-20 19:59:37 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:32:10 +0100 |
commit | 6c2dbc95c317b94c82b909aeddef82c2c33116ff (patch) | |
tree | 8136c05808b9b6668d69c2b5c2a3c35cfa9899aa | |
parent | deb301619d3d6ade1023d0a2b234a9d948a6dbd0 (diff) |
cruft
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 2 | ||||
-rw-r--r-- | compat/macros.hpp | 2 | ||||
-rw-r--r-- | gui/init.cpp | 4 | ||||
-rw-r--r-- | gui/process_detector.cpp | 2 | ||||
-rw-r--r-- | logic/pipeline.cpp | 3 | ||||
-rw-r--r-- | proto-wine/opentrack-wrapper-wine-windows.cxx | 1 | ||||
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 2 | ||||
-rw-r--r-- | variant/default/main-window.cpp | 7 |
8 files changed, 5 insertions, 18 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 68017422..c56c43ee 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -7,7 +7,7 @@ set(opentrack-perms-dir WORLD_READ WORLD_EXECUTE OWNER_WRITE OWNER_READ OWNER_EX set(opentrack-perms-exec "${opentrack-perms-dir}") set(new-hier-path "#pragma once -#ifndef OPENTRACK_NO_QT_PATH +#ifdef QT_CORE_LIB # include <QCoreApplication> # include <QString> # include \"compat/base-path.hpp\" diff --git a/compat/macros.hpp b/compat/macros.hpp index 5b959011..f905ad6c 100644 --- a/compat/macros.hpp +++ b/compat/macros.hpp @@ -90,9 +90,7 @@ constexpr cc_forceinline void static_warn<true>() {} #define static_warning(cond) \ static_warn<(cond)>(); \ -#define typed_progn(type, ...) ([&]() -> type { __VA_ARGS__ }()) #define progn(...) ([&]() -> decltype(auto) { __VA_ARGS__ }()) // end c++-only macros #endif - diff --git a/gui/init.cpp b/gui/init.cpp index a30e185a..bac8f700 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -7,10 +7,6 @@ * copyright notice and this permission notice appear in all copies. */ -#if defined(Q_CREATOR_RUN) -# pragma clang diagnostic ignored "-Wmain" -#endif - #include "migration/migration.hpp" #include "options/options.hpp" using namespace options; diff --git a/gui/process_detector.cpp b/gui/process_detector.cpp index 8301974c..ef65ca9a 100644 --- a/gui/process_detector.cpp +++ b/gui/process_detector.cpp @@ -106,7 +106,7 @@ int process_detector::add_row(QString const& exe_name, QString const& profile) { BrowseButton* b = new BrowseButton(twi); b->setText("..."); - QObject::connect(b, SIGNAL(clicked()), b, SLOT(browse())); + QObject::connect(b, &BrowseButton::clicked, b, &BrowseButton::browse); ui.tableWidget->setCellWidget(i, 2, b); } diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 219ccf62..1bde1bb1 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -204,8 +204,7 @@ double pipeline::map(double pos, Map& axis) #ifndef NO_NAN_CHECK template<int u, int w> -static cc_forceinline -bool is_nan(const dmat<u,w>& r) +static inline bool is_nan(const dmat<u,w>& r) { for (unsigned i = 0; i < u; i++) for (unsigned j = 0; j < w; j++) diff --git a/proto-wine/opentrack-wrapper-wine-windows.cxx b/proto-wine/opentrack-wrapper-wine-windows.cxx index e1f91797..d464cf6c 100644 --- a/proto-wine/opentrack-wrapper-wine-windows.cxx +++ b/proto-wine/opentrack-wrapper-wine-windows.cxx @@ -6,7 +6,6 @@ #include "compat/shm.h" #include "compat/shm.cpp" #include "wine-shm.h" -#define OPENTRACK_NO_QT_PATH #include "compat/library-path.hpp" #include <cstring> diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 6fc31874..bddec739 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -155,7 +155,7 @@ static int enum_to_fps(int value) } return fps; -}; +} bool aruco_tracker::open_camera() { diff --git a/variant/default/main-window.cpp b/variant/default/main-window.cpp index 5cb1af42..7b2456e8 100644 --- a/variant/default/main-window.cpp +++ b/variant/default/main-window.cpp @@ -855,12 +855,7 @@ void main_window::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e) setVisible(is_minimized); setHidden(!is_minimized); - setWindowState(typed_progn(Qt::WindowStates, - if (is_minimized) - return windowState() & ~Qt::WindowMinimized; - else - return Qt::WindowNoState; - )); + setWindowState(is_minimized ? windowState() & ~Qt::WindowMinimized : Qt::WindowNoState); if (is_minimized) { |