mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
add a basic platform-disabling define
This commit is contained in:
parent
aae9233dc1
commit
1c78cbc0c9
18
qtox.pro
18
qtox.pro
|
@ -52,6 +52,7 @@ DEFINES += GIT_VERSION=\"\\\"$$quote($$GIT_VERSION)\\\"\"
|
|||
TIMESTAMP = $$system($1 2>null||echo 0||a;rm null;date +%s||echo 0) # I'm so sorry
|
||||
DEFINES += TIMESTAMP=$$TIMESTAMP
|
||||
DEFINES += LOG_TO_FILE
|
||||
DEFINES += QTOX_PLATFORM_EXT # Comment out to increase portability
|
||||
|
||||
contains(JENKINS,YES) {
|
||||
INCLUDEPATH += ./libs/include/
|
||||
|
@ -85,7 +86,7 @@ win32 {
|
|||
}
|
||||
|
||||
contains(JENKINS, YES) {
|
||||
LIBS = ./libs/lib/libtoxav.a ./libs/lib/libvpx.a ./libs/lib/libopus.a ./libs/lib/libtoxdns.a ./libs/lib/libtoxencryptsave.a ./libs/lib/libtoxcore.a ./libs/lib/libsodium.a /usr/lib/libopencv_core.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so -lopenal -s
|
||||
LIBS = ./libs/lib/libtoxav.a ./libs/lib/libvpx.a ./libs/lib/libopus.a ./libs/lib/libtoxdns.a ./libs/lib/libtoxencryptsave.a ./libs/lib/libtoxcore.a ./libs/lib/libsodium.a /usr/lib/libopencv_core.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so -lopenal -lX11 -lXss -s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,8 +156,7 @@ HEADERS += src/widget/form/addfriendform.h \
|
|||
src/autoupdate.h \
|
||||
src/misc/serialize.h \
|
||||
src/widget/form/settings/advancedform.h \
|
||||
src/audio.h \
|
||||
src/platform/timer.h
|
||||
src/audio.h
|
||||
|
||||
SOURCES += \
|
||||
src/widget/form/addfriendform.cpp \
|
||||
|
@ -223,7 +223,11 @@ SOURCES += \
|
|||
src/autoupdate.cpp \
|
||||
src/misc/serialize.cpp \
|
||||
src/widget/form/settings/advancedform.cpp \
|
||||
src/audio.cpp \
|
||||
src/platform/timer_osx.cpp \
|
||||
src/platform/timer_win.cpp \
|
||||
src/platform/timer_x11.cpp
|
||||
src/audio.cpp
|
||||
|
||||
contains(DEFINES, QTOX_PLATFORM_EXT) {
|
||||
HEADERS += src/platform/timer.h
|
||||
SOURCES += src/platform/timer_osx.cpp \
|
||||
src/platform/timer_win.cpp \
|
||||
src/platform/timer_x11.cpp
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#ifdef QTOX_PLATFORM_EXT
|
||||
|
||||
#ifndef PLATFORM_TIMER_H
|
||||
#define PLATFORM_TIMER_H
|
||||
|
||||
|
@ -26,3 +28,5 @@ namespace Platform
|
|||
}
|
||||
|
||||
#endif // PLATFORM_TIMER_H
|
||||
|
||||
#endif // QTOX_PLATFORM_EXT
|
||||
|
|
|
@ -144,6 +144,11 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||
connect(bodyUI->proxyPort, SIGNAL(valueChanged(int)), this, SLOT(onProxyPortEdited(int)));
|
||||
connect(bodyUI->reconnectButton, &QPushButton::clicked, this, &GeneralForm::onReconnectClicked);
|
||||
connect(bodyUI->cbFauxOfflineMessaging, &QCheckBox::stateChanged, this, &GeneralForm::onFauxOfflineMessaging);
|
||||
|
||||
#ifndef QTOX_PLATFORM_EXT
|
||||
bodyUI->autoAwayLabel->setEnabled(false); // these don't seem to change the appearance of the widgets,
|
||||
bodyUI->autoAwaySpinBox->setEnabled(false); // though they are unusable
|
||||
#endif
|
||||
}
|
||||
|
||||
GeneralForm::~GeneralForm()
|
||||
|
|
|
@ -1105,6 +1105,7 @@ bool Widget::event(QEvent * e)
|
|||
|
||||
void Widget::onUserAwayCheck()
|
||||
{
|
||||
#ifdef QTOX_PLATFORM_EXT
|
||||
uint32_t autoAwayTime = Settings::getInstance().getAutoAwayTime() * 60 * 1000;
|
||||
|
||||
if (ui->statusButton->property("status").toString() == "online")
|
||||
|
@ -1127,6 +1128,7 @@ void Widget::onUserAwayCheck()
|
|||
}
|
||||
else if (autoAwayActive)
|
||||
autoAwayActive = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Widget::setStatusOnline()
|
||||
|
|
Loading…
Reference in New Issue
Block a user