Commit 08748397 authored by Sébastien Blin's avatar Sébastien Blin Committed by Andreas Traczyk

build: fix build on linux

Change-Id: Ie802c7aebe23ef30a18c0765ac9878d3a57b913c
parent f54419bd
......@@ -1421,7 +1421,7 @@
<customwidget>
<class>ToggleSwitch</class>
<extends>QWidget</extends>
<header>ToggleSwitch.h</header>
<header>toggleswitch.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
......@@ -1952,7 +1952,7 @@
<customwidget>
<class>ToggleSwitch</class>
<extends>QWidget</extends>
<header>ToggleSwitch.h</header>
<header>toggleswitch.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
......@@ -22,7 +22,9 @@
#include <QMessageBox>
#ifdef Q_OS_WIN
#include <windows.h>
#endif // !Q_OS_WIN
DownloadManager::DownloadManager()
{}
......
TEMPLATE = app
TARGET = jami-qt
QT += widgets xml multimedia multimediawidgets network webenginewidgets
CONFIG += c++17
QT += widgets xml multimedia multimediawidgets network webenginewidgets svg
isEmpty(LRC) {
LRC=../../install/lrc/
......@@ -14,128 +16,134 @@ LIBS += -L$${LRC}/lib -lringclient
LIBS += -lqrencode
# Input
HEADERS += ./pixbufmanipulator.h \
./ringthemeutils.h \
./runguard.h \
./settingskey.h \
./utils.h \
./version.h \
./webchathelpers.h \
./windowscontactbackend.h \
./aboutdialog.h \
./callwidget.h \
./accountlistmodel.h \
./accountitemdelegate.h \
./deleteaccountdialog.h \
./globalsystemtray.h \
./idlabel.h \
./mainwindow.h \
./navwidget.h \
./photoboothwidget.h \
./invitebuttonswidget.h \
./currentaccountcombobox.h \
./animationhelpers.h \
./advancedsettingswidget.h \
./avatargraphicsview.h \
./bannedlistmodel.h \
./linkdevicedialog.h \
./bezierconnectorwidget.h \
./lrcinstance.h \
./messagewebview.h \
./messagewebpage.h \
./passworddialog.h \
./newwizardwidget.h \
./advancedsipsettingwidget.h \
./iconbutton.h \
./deviceitemwidget.h \
./banneditemwidget.h \
./ringbutton.h \
./ringcontactlineedit.h \
./nameregistrationdialog.h \
./selectareadialog.h \
./smartlistview.h \
./conversationitemdelegate.h \
./smartlistmodel.h \
./conversationsfilterwidget.h \
./smartlistselectorbuttonnotifier.h \
./settingswidget.h \
./toggleswitch.h \
./videooverlay.h \
./videoview.h \
./videowidget.h \
./downloadbar.h \
./updateconfirmdialog.h \
./downloadmanger.h
SOURCES += ./advancedsettingswidget.cpp \
./advancedsipsettingwidget.cpp \
./avatargraphicsview.cpp \
./banneditemwidget.cpp \
./bannedlistmodel.cpp \
./animationhelpers.cpp \
./currentaccountcombobox.cpp \
./aboutdialog.cpp \
./accountitemdelegate.cpp \
./accountlistmodel.cpp \
./callwidget.cpp \
./deleteaccountdialog.cpp \
./deviceitemwidget.cpp \
./globalsystemtray.cpp \
./iconbutton.cpp \
./idlabel.cpp \
./bezierconnectorwidget.cpp \
./invitebuttonswidget.cpp \
./linkdevicedialog.cpp \
./main.cpp \
./mainwindow.cpp \
./messagewebpage.cpp \
./messagewebview.cpp \
./navwidget.cpp \
./newwizardwidget.cpp \
./passworddialog.cpp \
./photoboothwidget.cpp \
./pixbufmanipulator.cpp \
./nameregistrationdialog.cpp \
./ringbutton.cpp \
./ringcontactlineedit.cpp \
./runguard.cpp \
./selectareadialog.cpp \
./conversationsfilterwidget.cpp \
./settingswidget.cpp \
./smartlistselectorbuttonnotifier.cpp \
./smartlistview.cpp \
./conversationitemdelegate.cpp \
./smartlistmodel.cpp \
./toggleswitch.cpp \
./utils.cpp \
./videooverlay.cpp \
./videoview.cpp \
./videowidget.cpp \
./webchathelpers.cpp \
./windowscontactbackend.cpp \
./downloadbar.cpp \
./updateconfirmdialog.cpp \
./downloadmanger.cpp
HEADERS += ./aboutdialog.h \
./banneditemwidget.h \
./conversationsfilterwidget.h \
./idlabel.h \
./messagewebview.h \
./ringbutton.h \
./smartlistmodel.h \
./utils.h \
./accountitemdelegate.h \
./bannedlistmodel.h \
./currentaccountcombobox.h \
./invitebuttonswidget.h \
./nameregistrationdialog.h \
./ringcontactlineedit.h \
./smartlistselectorbuttonnotifier.h \
./version.h \
./accountlistmodel.h \
./bezierconnectorwidget.h \
./deleteaccountdialog.h \
./levelmeter.h \
./navwidget.h \
./ringthemeutils.h \
./smartlistview.h \
./videooverlay.h \
./advancedsettingswidget.h \
./callwidget.h \
./deviceitemwidget.h \
./linkdevicedialog.h \
./newwizardwidget.h \
./runguard.h \
./splashscreen.h \
./videoview.h \
./advancedsipsettingwidget.h \
./contactpicker.h \
./downloadmanager.h \
./lrcinstance.h \
./passworddialog.h \
./selectareadialog.h \
./toggleswitch.h \
./videowidget.h \
./animationhelpers.h \
./contactpickeritemdelegate.h \
./globalsystemtray.h \
./mainwindow.h \
./photoboothwidget.h \
./settingskey.h \
./updateconfirmdialog.h \
./webchathelpers.h \
./avatargraphicsview.h \
./conversationitemdelegate.h \
./iconbutton.h \
./messagewebpage.h \
./pixbufmanipulator.h \
./settingswidget.h \
./updatedownloaddialog.h
SOURCES += ./aboutdialog.cpp \
./banneditemwidget.cpp \
./conversationsfilterwidget.cpp \
./idlabel.cpp \
./messagewebview.cpp \
./ringbutton.cpp \
./smartlistview.cpp \
./videoview.cpp \
./accountitemdelegate.cpp \
./bannedlistmodel.cpp \
./currentaccountcombobox.cpp \
./invitebuttonswidget.cpp \
./nameregistrationdialog.cpp \
./ringcontactlineedit.cpp \
./splashscreen.cpp \
./videowidget.cpp \
./accountlistmodel.cpp \
./bezierconnectorwidget.cpp \
./deleteaccountdialog.cpp \
./levelmeter.cpp \
./navwidget.cpp \
./runguard.cpp \
./toggleswitch.cpp \
./webchathelpers.cpp \
./advancedsettingswidget.cpp \
./callwidget.cpp \
./deviceitemwidget.cpp \
./linkdevicedialog.cpp \
./newwizardwidget.cpp \
./selectareadialog.cpp \
./updateconfirmdialog.cpp \
./advancedsipsettingwidget.cpp \
./contactpicker.cpp \
./downloadmanager.cpp \
./main.cpp \
./passworddialog.cpp \
./settingswidget.cpp \
./updatedownloaddialog.cpp \
./animationhelpers.cpp \
./contactpickeritemdelegate.cpp \
./globalsystemtray.cpp \
./mainwindow.cpp \
./photoboothwidget.cpp \
./smartlistmodel.cpp \
./utils.cpp \
./avatargraphicsview.cpp \
./conversationitemdelegate.cpp \
./iconbutton.cpp \
./messagewebpage.cpp \
./pixbufmanipulator.cpp \
./smartlistselectorbuttonnotifier.cpp \
./videooverlay.cpp
FORMS += ./aboutdialog.ui \
./advancedsettingswidget.ui \
./advancedsipsettingwidget.ui \
./animatedoverlay.ui \
./banneditemwidget.ui \
./callwidget.ui \
./deleteaccountdialog.ui \
./deviceitemwidget.ui \
./invitebuttonswidget.ui \
./linkdevicedialog.ui \
./mainwindow.ui \
./nameregistrationdialog.ui \
./newwizardwidget.ui \
./passworddialog.ui \
./photoboothdialog.ui \
./photoboothwidget.ui \
./ringbutton.ui \
./settingswidget.ui \
./videooverlay.ui \
./videoview.ui \
./downloadbar.ui \
./updateconfirmdialog.ui \
./contactpicker.ui
./advancedsipsettingwidget.ui \
./callwidget.ui \
./deviceitemwidget.ui \
./mainwindow.ui \
./passworddialog.ui \
./ringbutton.ui \
./updatedownloaddialog.ui \
./animatedoverlay.ui \
./contactpicker.ui \
./invitebuttonswidget.ui \
./nameregistrationdialog.ui \
./photoboothdialog.ui \
./settingswidget.ui \
./videooverlay.ui \
./advancedsettingswidget.ui \
./banneditemwidget.ui \
./deleteaccountdialog.ui \
./linkdevicedialog.ui \
./newwizardwidget.ui \
./photoboothwidget.ui \
./updateconfirmdialog.ui \
./videoview.ui
RESOURCES += ressources.qrc
......@@ -21,6 +21,7 @@
#include <QTimer>
#include <QDebug>
#include <algorithm>
#include <cmath>
#include <limits>
......
......@@ -183,7 +183,7 @@ main(int argc, char* argv[])
GlobalInstances::setPixmapManipulator(std::make_unique<PixbufManipulator>());
SplashScreen* splash = new SplashScreen();
std::atomic_bool isMigrating = false;
std::atomic_bool isMigrating(false);
LRCInstance::init(
[&splash, &a, &isMigrating] {
splash->setupUI(
......
......@@ -25,9 +25,9 @@
#include <QDebug>
#include <QDesktopServices>
#include <QFileDialog>
#include <QImagereader>
#include <QImageReader>
#include <QMenu>
#include <QMessagebox>
#include <QMessageBox>
#include <QMimeData>
#include <QMouseEvent>
#include <QScrollBar>
......
......@@ -143,11 +143,11 @@ PhotoboothWidget::on_takePhotoButton_clicked()
}
void
PhotoboothWidget::setAvatarPixmap(const QPixmap& avatarPixmap, bool default)
PhotoboothWidget::setAvatarPixmap(const QPixmap& avatarPixmap, bool _default)
{
ui->avatarLabel->setPixmap(avatarPixmap);
stopBooth();
if (default) {
if (_default) {
ui->takePhotoButton->setIcon(QIcon(":/images/icons/round-add_a_photo-24px.svg"));
}
}
......
......@@ -37,7 +37,7 @@ public:
void startBooth();
void stopBooth();
void setAvatarPixmap(const QPixmap& avatarPixmap, bool default = false);
void setAvatarPixmap(const QPixmap& avatarPixmap, bool _default = false);
const QPixmap& getAvatarPixmap();
bool hasAvatar();
......
......@@ -74,6 +74,7 @@ bool RunGuard::isAnotherRunning()
bool RunGuard::tryToRun()
{
#ifdef Q_OS_WIN
if (isAnotherRunning()) {
// This is a secondary instance,
// connect to the primary instance to trigger a restore
......@@ -111,6 +112,7 @@ bool RunGuard::tryToRun()
this,
&RunGuard::tryRestorePrimaryInstance
);
#endif
return true;
}
......
......@@ -1134,7 +1134,11 @@ void SettingsWidget::startAudioMeter(bool blocking)
LRCInstance::avModel().startAudioDevice();
LRCInstance::avModel().setAudioMeterState(true);
};
blocking ? f() : QtConcurrent::run(f);
if (blocking) {
f();
} else {
QtConcurrent::run(f);
}
}
void SettingsWidget::stopAudioMeter(bool blocking)
......@@ -1145,5 +1149,9 @@ void SettingsWidget::stopAudioMeter(bool blocking)
LRCInstance::avModel().setAudioMeterState(false);
ui->audioInputMeter->stop();
auto f = [this] { LRCInstance::avModel().stopAudioDevice(); };
blocking ? f() : QtConcurrent::run(f);
if (blocking) {
f();
} else {
QtConcurrent::run(f);
}
}
\ No newline at end of file
......@@ -4223,7 +4223,7 @@
<customwidget>
<class>ToggleSwitch</class>
<extends>QWidget</extends>
<header>ToggleSwitch.h</header>
<header>toggleswitch.h</header>
<container>1</container>
</customwidget>
<customwidget>
......
......@@ -289,12 +289,16 @@ void Utils::showSystemNotification(QWidget* widget,
QSize
Utils::getRealSize(QScreen* screen)
{
#ifdef Q_OS_WIN
DEVMODE dmThisScreen;
ZeroMemory(&dmThisScreen, sizeof(dmThisScreen));
EnumDisplaySettings((const wchar_t *)screen->name().utf16(),
ENUM_CURRENT_SETTINGS,
(DEVMODE*)&dmThisScreen);
return QSize(dmThisScreen.dmPelsWidth, dmThisScreen.dmPelsHeight);
#else
return {};
#endif
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment