summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/base-path.cpp2
-rw-r--r--compat/camera-names.cpp4
-rw-r--r--compat/check-visible.cpp4
-rw-r--r--compat/check-visible.hpp7
-rw-r--r--compat/euler.cpp4
-rw-r--r--compat/sleep.cpp2
-rw-r--r--dinput/dinput.cpp2
-rw-r--r--gui/init.cpp2
-rw-r--r--options/tie.cpp22
-rw-r--r--qxt-mini/x11-keymap.cpp11
-rw-r--r--qxt-mini/x11-keymap.hpp22
11 files changed, 35 insertions, 47 deletions
diff --git a/compat/base-path.cpp b/compat/base-path.cpp
index f207eca0..4ef3762e 100644
--- a/compat/base-path.cpp
+++ b/compat/base-path.cpp
@@ -1,8 +1,6 @@
#include "base-path.hpp"
#include <QCoreApplication>
-OTR_COMPAT_EXPORT
-cc_noinline
const QString& application_base_path()
{
static QString const& const_path = QCoreApplication::applicationDirPath();
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp
index c88bae75..23649d38 100644
--- a/compat/camera-names.cpp
+++ b/compat/camera-names.cpp
@@ -17,7 +17,7 @@
#include <QDebug>
-OTR_COMPAT_EXPORT int camera_name_to_index(const QString &name)
+int camera_name_to_index(const QString &name)
{
auto list = get_camera_names();
int ret = list.indexOf(name);
@@ -26,7 +26,7 @@ OTR_COMPAT_EXPORT int camera_name_to_index(const QString &name)
return ret;
}
-OTR_COMPAT_EXPORT QList<QString> get_camera_names()
+QList<QString> get_camera_names()
{
QList<QString> ret;
#if defined(_WIN32)
diff --git a/compat/check-visible.cpp b/compat/check-visible.cpp
index 0e154dd0..96dba60f 100644
--- a/compat/check-visible.cpp
+++ b/compat/check-visible.cpp
@@ -15,7 +15,6 @@ static Timer timer;
static QMutex mtx;
static bool visible = true;
-cc_noinline OTR_COMPAT_EXPORT
void set_is_visible(const QWidget& w, bool force)
{
QMutexLocker l(&mtx);
@@ -47,7 +46,6 @@ void set_is_visible(const QWidget& w, bool force)
}
}
-cc_noinline OTR_COMPAT_EXPORT
bool check_is_visible()
{
QMutexLocker l(&mtx);
@@ -57,12 +55,10 @@ bool check_is_visible()
#else
-cc_noinline OTR_COMPAT_EXPORT
void set_is_visible(const QWidget&, bool)
{
}
-cc_noinline OTR_COMPAT_EXPORT
bool check_is_visible()
{
return true;
diff --git a/compat/check-visible.hpp b/compat/check-visible.hpp
index 65a20d79..e24a654b 100644
--- a/compat/check-visible.hpp
+++ b/compat/check-visible.hpp
@@ -5,5 +5,8 @@
#include <QWidget>
-cc_noinline OTR_COMPAT_EXPORT void set_is_visible(QWidget const& w, bool force = false);
-cc_noinline OTR_COMPAT_EXPORT bool check_is_visible();
+cc_noinline OTR_COMPAT_EXPORT
+void set_is_visible(QWidget const& w, bool force = false);
+
+cc_noinline OTR_COMPAT_EXPORT
+bool check_is_visible();
diff --git a/compat/euler.cpp b/compat/euler.cpp
index 44b34f90..889fc53e 100644
--- a/compat/euler.cpp
+++ b/compat/euler.cpp
@@ -4,7 +4,7 @@
namespace euler {
-euler_t OTR_COMPAT_EXPORT rmat_to_euler(const rmat& R)
+euler_t rmat_to_euler(const rmat& R)
{
const double cy = sqrt(R(2,2)*R(2, 2) + R(2, 1)*R(2, 1));
const bool large_enough = cy > 1e-10;
@@ -23,7 +23,7 @@ euler_t OTR_COMPAT_EXPORT rmat_to_euler(const rmat& R)
}
// tait-bryan angles, not euler
-rmat OTR_COMPAT_EXPORT euler_to_rmat(const euler_t& input)
+rmat euler_to_rmat(const euler_t& input)
{
const double H = -input(0);
const double P = -input(1);
diff --git a/compat/sleep.cpp b/compat/sleep.cpp
index 4ec61db5..5178ae2f 100644
--- a/compat/sleep.cpp
+++ b/compat/sleep.cpp
@@ -8,7 +8,7 @@
namespace portable
{
- OTR_COMPAT_EXPORT void sleep(int milliseconds)
+ void sleep(int milliseconds)
{
if (milliseconds > 0)
{
diff --git a/dinput/dinput.cpp b/dinput/dinput.cpp
index c3509dd6..8a3d0f4a 100644
--- a/dinput/dinput.cpp
+++ b/dinput/dinput.cpp
@@ -17,7 +17,7 @@ diptr di_t::init_di_()
nullptr);
!SUCCEEDED(hr))
{
- qDebug() << "can't make dinput:" << (void*)hr;
+ qDebug() << "can't make dinput:" << (void*)(LONG_PTR)hr;
qDebug() << "crashing!";
std::abort();
}
diff --git a/gui/init.cpp b/gui/init.cpp
index 367822ae..758919c4 100644
--- a/gui/init.cpp
+++ b/gui/init.cpp
@@ -183,7 +183,7 @@ static int run_window(std::unique_ptr<QWidget> main_window)
return status;
}
-OTR_GUI_EXPORT int otr_main(int argc, char** argv, std::function<QWidget*()> const& make_main_window)
+int otr_main(int argc, char** argv, std::function<QWidget*()> const& make_main_window)
{
#if defined OTR_HAS_DENORM_CONTROL
set_fp_mask();
diff --git a/options/tie.cpp b/options/tie.cpp
index 9de3df4c..1f2d7dae 100644
--- a/options/tie.cpp
+++ b/options/tie.cpp
@@ -11,7 +11,7 @@
namespace options {
-OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QComboBox* cb)
+void tie_setting(value<int>& v, QComboBox* cb)
{
cb->setCurrentIndex(v);
v = cb->currentIndex();
@@ -19,7 +19,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QComboBox* cb)
value_::connect(&v, SIGNAL(valueChanged(int)), cb, SLOT(setCurrentIndex(int)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QComboBox* cb)
+void tie_setting(value<QString>& v, QComboBox* cb)
{
cb->setCurrentText(v);
v = cb->currentText();
@@ -27,7 +27,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QComboBox* cb)
value_::connect(&v, SIGNAL(valueChanged(const QString&)), cb, SLOT(setCurrentText(const QString&)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)
+void tie_setting(value<QVariant>& v, QComboBox* cb)
{
auto set_idx = [cb](const QVariant& var) {
const int sz = cb->count();
@@ -50,7 +50,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)
if (idx != -1)
v = cb->itemData(idx);
else
- v = QVariant(QVariant::Invalid);
+ v = {};
value_::connect(cb, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
&v, [cb, &v](int idx) {
@@ -67,48 +67,48 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)
// XXX TODO need variant with setEnabled based on lambda retval -- sh 20170524
-OTR_OPTIONS_EXPORT void tie_setting(value<bool>& v, QCheckBox* cb)
+void tie_setting(value<bool>& v, QCheckBox* cb)
{
cb->setChecked(v);
value_::connect(cb, SIGNAL(toggled(bool)), &v, SLOT(setValue(bool)), v.DIRECT_CONNTYPE);
value_::connect(&v, SIGNAL(valueChanged(bool)), cb, SLOT(setChecked(bool)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<double>& v, QDoubleSpinBox* dsb)
+void tie_setting(value<double>& v, QDoubleSpinBox* dsb)
{
dsb->setValue(v);
value_::connect(dsb, SIGNAL(valueChanged(double)), &v, SLOT(setValue(double)), v.DIRECT_CONNTYPE);
value_::connect(&v, SIGNAL(valueChanged(double)), dsb, SLOT(setValue(double)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QSpinBox* sb)
+void tie_setting(value<int>& v, QSpinBox* sb)
{
sb->setValue(v);
value_::connect(sb, SIGNAL(valueChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
value_::connect(&v, SIGNAL(valueChanged(int)), sb, SLOT(setValue(int)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLineEdit* le)
+void tie_setting(value<QString>& v, QLineEdit* le)
{
le->setText(v);
value_::connect(le, SIGNAL(textChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE);
value_::connect(&v, value_::value_changed<QString>(), le, &QLineEdit::setText, v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLabel* lb)
+void tie_setting(value<QString>& v, QLabel* lb)
{
lb->setText(v);
value_::connect(&v, value_::value_changed<QString>(), lb, &QLabel::setText, v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QTabWidget* t)
+void tie_setting(value<int>& v, QTabWidget* t)
{
t->setCurrentIndex(v);
value_::connect(t, SIGNAL(currentChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
value_::connect(&v, SIGNAL(valueChanged(int)), t, SLOT(setCurrentIndex(int)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<slider_value>& v, QSlider* w)
+void tie_setting(value<slider_value>& v, QSlider* w)
{
{
const int q_min = w->minimum();
diff --git a/qxt-mini/x11-keymap.cpp b/qxt-mini/x11-keymap.cpp
index a42752b3..4b7f56f5 100644
--- a/qxt-mini/x11-keymap.cpp
+++ b/qxt-mini/x11-keymap.cpp
@@ -174,7 +174,6 @@ static tt numpad_keymap[] = {
{ Qt::Key_ScrollLock, XK_Scroll_Lock },
};
-QXT_GUI_EXPORT
quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers)
{
quint32 mods = 0;
@@ -193,7 +192,6 @@ quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers)
return mods;
}
-QXT_GUI_EXPORT
std::vector<quint32> qt_key_to_x11(Display*, Qt::Key k, Qt::KeyboardModifiers)
{
std::vector<quint32> ret;
@@ -212,10 +210,10 @@ std::vector<quint32> qt_key_to_x11(Display*, Qt::Key k, Qt::KeyboardModifiers)
return ret;
}
-QXT_GUI_EXPORT
+
Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods)
{
- Qt::KeyboardModifiers ret(0);
+ Qt::KeyboardModifiers ret{0};
if (mods & Mod1Mask)
ret |= Qt::AltModifier;
@@ -229,7 +227,6 @@ Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods)
return ret;
}
-QXT_GUI_EXPORT
std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp, quint32 keycode, quint32 mods)
{
(void)disp;
@@ -247,7 +244,6 @@ std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp, quint32
}
-QXT_GUI_EXPORT
QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
quint32 keycode, quint32 keystate,
xcb_key_press_event_t const* kev)
@@ -298,10 +294,9 @@ QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
return ret;
}
-QXT_GUI_EXPORT
quint32 xcb_mods_to_x11(quint32 mods)
{
- unsigned int keystate = 0;
+ unsigned keystate = 0;
if(mods & XCB_MOD_MASK_1) // alt
keystate |= Mod1Mask;
diff --git a/qxt-mini/x11-keymap.hpp b/qxt-mini/x11-keymap.hpp
index 52e2ebea..a6f2a061 100644
--- a/qxt-mini/x11-keymap.hpp
+++ b/qxt-mini/x11-keymap.hpp
@@ -19,24 +19,20 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-QXT_EXPORT
-std::vector<quint32> qt_key_to_x11(Display* disp,
- Qt::Key k, Qt::KeyboardModifiers m);
+std::vector<quint32>
+qt_key_to_x11(Display* disp, Qt::Key k, Qt::KeyboardModifiers m);
-QXT_EXPORT
-std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp,
- quint32 keycode, quint32 mods);
+std::tuple<Qt::Key, Qt::KeyboardModifiers>
+x11_key_to_qt(Display* disp, quint32 keycode, quint32 mods);
-QXT_EXPORT QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
- quint32 keycode, quint32 keystate,
- xcb_key_press_event_t const* kev);
+QPair<KeySym, KeySym>
+keycode_to_keysym(Display* disp,
+ quint32 keycode, quint32 keystate,
+ xcb_key_press_event_t const* kev);
-QXT_EXPORT quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers);
+quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers);
-QXT_GUI_EXPORT
Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods);
-
-QXT_GUI_EXPORT
quint32 xcb_mods_to_x11(quint32 mods);
#endif