diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri index 16ac6d1ce..1febf21aa 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -10,8 +10,10 @@ linux-g++-64 { } win32 { - # from Qt 4.7.4 and 4.8+ the mkspecs has changed making dyn libs unusable anymore on windows : QMAKE_LFLAGS = - QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc + lessThan(QT_MAJOR_VERSION, 5) { + # from Qt 4.7.4 and 4.8+ the mkspecs has changed making dyn libs unusable anymore on windows : QMAKE_LFLAGS = + QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc + } # Switch on extra warnings QMAKE_CFLAGS += -Wextra @@ -22,7 +24,7 @@ win32 { RCC_DIR = temp/qrc UI_DIR = temp/ui - DEFINES += WINDOWS_SYS WIN32 STATICLIB MINGW + DEFINES += WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T DEFINES += MINIUPNPC_VERSION=13 # DESTDIR = lib diff --git a/plugins/FeedReader/FeedReader.pro b/plugins/FeedReader/FeedReader.pro index e376a7556..ff2a09500 100644 --- a/plugins/FeedReader/FeedReader.pro +++ b/plugins/FeedReader/FeedReader.pro @@ -2,6 +2,11 @@ CONFIG += qt uic qrc resources +greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 + QT += widgets +} + SOURCES = FeedReaderPlugin.cpp \ services/p3FeedReader.cc \ services/p3FeedReaderThread.cc \ diff --git a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp index eb9472179..24e88fe1d 100644 --- a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp +++ b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp @@ -15,6 +15,7 @@ #include "gui/common/RSTreeWidgetItem.h" #include "gui/settings/rsharesettings.h" #include "util/HandleRichText.h" +#include "util/QtVersion.h" #include "retroshare/rsiface.h" @@ -78,7 +79,7 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(const std::string &feedId, RsFe /* set header resize modes and initial section sizes */ QHeaderView *header = ui->msgTreeWidget->header(); - header->setResizeMode(COLUMN_MSG_TITLE, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(header, COLUMN_MSG_TITLE, QHeaderView::Interactive); header->resizeSection(COLUMN_MSG_TITLE, 350); header->resizeSection(COLUMN_MSG_PUBDATE, 140); header->resizeSection(COLUMN_MSG_AUTHOR, 150); @@ -98,7 +99,7 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(const std::string &feedId, RsFe /* Set header sizes for the fixed columns and resize modes, must be set after processSettings */ header->resizeSection(COLUMN_MSG_READ, 24); - header->setResizeMode(COLUMN_MSG_READ, QHeaderView::Fixed); + QHeaderView_setSectionResizeMode(header, COLUMN_MSG_READ, QHeaderView::Fixed); /* build menu for link button */ QMenu *menu = new QMenu(this); diff --git a/plugins/LinksCloud/LinksCloud.pro b/plugins/LinksCloud/LinksCloud.pro index f22e87337..1d0ab9253 100644 --- a/plugins/LinksCloud/LinksCloud.pro +++ b/plugins/LinksCloud/LinksCloud.pro @@ -2,6 +2,11 @@ CONFIG += qt uic qrc resources +greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 + QT += widgets +} + SOURCES = p3ranking.cc LinksDialog.cpp rsrankitems.cc AddLinksDialog.cpp LinksCloudPlugin.cpp HEADERS = rsrank.h p3ranking.h LinksDialog.h rsrankitems.h AddLinksDialog.h LinksCloudPlugin.h FORMS = LinksDialog.ui AddLinksDialog.ui diff --git a/plugins/LinksCloud/LinksDialog.cpp b/plugins/LinksCloud/LinksDialog.cpp index 477cea063..8cce40f76 100644 --- a/plugins/LinksCloud/LinksDialog.cpp +++ b/plugins/LinksCloud/LinksDialog.cpp @@ -28,6 +28,7 @@ #include #include "AddLinksDialog.h" #include "rsrank.h" +#include "util/QtVersion.h" #include @@ -81,9 +82,9 @@ LinksDialog::LinksDialog(RsPeers *peers, RsFiles *files, QWidget *parent) /* Set header resize modes and initial section sizes */ QHeaderView * _header = ui.linkTreeWidget->header () ; - _header->setResizeMode (0, QHeaderView::Interactive); - _header->setResizeMode (1, QHeaderView::Interactive); - _header->setResizeMode (2, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 0, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 1, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 2, QHeaderView::Interactive); _header->resizeSection ( 0, 400 ); _header->resizeSection ( 1, 60 ); diff --git a/plugins/VOIP/VOIP.pro b/plugins/VOIP/VOIP.pro index e75bb72ef..e3f688eac 100644 --- a/plugins/VOIP/VOIP.pro +++ b/plugins/VOIP/VOIP.pro @@ -1,5 +1,10 @@ !include("../Common/retroshare_plugin.pri"): error("Could not include file ../Common/retroshare_plugin.pri") +greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 + QT += widgets +} + exists($$[QMAKE_MKSPECS]/features/mobility.prf) { CONFIG += mobility } else { diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index 78236b377..b4c3cb21c 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "VOIPPlugin.h" #include "interface/rsvoip.h" diff --git a/plugins/VOIP/gui/AudioInputConfig.cpp b/plugins/VOIP/gui/AudioInputConfig.cpp index 23cd43bec..564c305c9 100644 --- a/plugins/VOIP/gui/AudioInputConfig.cpp +++ b/plugins/VOIP/gui/AudioInputConfig.cpp @@ -29,6 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + //#include "AudioInput.h" //#include "AudioOutput.h" #include "AudioStats.h" diff --git a/plugins/VOIP/gui/AudioStats.cpp b/plugins/VOIP/gui/AudioStats.cpp index 354fa367c..93435127e 100644 --- a/plugins/VOIP/gui/AudioStats.cpp +++ b/plugins/VOIP/gui/AudioStats.cpp @@ -30,6 +30,8 @@ #define iroundf(x) ( static_cast(x) ) +#include + #include "AudioStats.h" #include "AudioInputConfig.h" //#include "Global.h" diff --git a/plugins/VOIP/gui/AudioStats.h b/plugins/VOIP/gui/AudioStats.h index f1a887fc2..afa652831 100644 --- a/plugins/VOIP/gui/AudioStats.h +++ b/plugins/VOIP/gui/AudioStats.h @@ -31,8 +31,7 @@ #ifndef _AUDIOSTATS_H #define _AUDIOSTATS_H -#include -#include +#include //#include "mumble_pch.hpp" diff --git a/plugins/VOIP/gui/AudioWizard.cpp b/plugins/VOIP/gui/AudioWizard.cpp index 1b75d40da..32729cdf5 100644 --- a/plugins/VOIP/gui/AudioWizard.cpp +++ b/plugins/VOIP/gui/AudioWizard.cpp @@ -28,6 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include "AudioWizard.h" //#include "AudioInput.h" //#include "Global.h" diff --git a/plugins/VOIP/gui/AudioWizard.h b/plugins/VOIP/gui/AudioWizard.h index cee60f4f5..d43117ae3 100644 --- a/plugins/VOIP/gui/AudioWizard.h +++ b/plugins/VOIP/gui/AudioWizard.h @@ -40,6 +40,9 @@ #include "ui_AudioWizard.h" +class QGraphicsScene; +class QGraphicsItem; + class AudioWizard: public QWizard, public Ui::AudioWizard { private: Q_OBJECT diff --git a/plugins/VOIP/gui/audiodevicehelper.cpp b/plugins/VOIP/gui/audiodevicehelper.cpp index 5ba8628cd..a54dffa5f 100644 --- a/plugins/VOIP/gui/audiodevicehelper.cpp +++ b/plugins/VOIP/gui/audiodevicehelper.cpp @@ -8,8 +8,13 @@ AudioDeviceHelper::AudioDeviceHelper() QAudioInput* AudioDeviceHelper::getDefaultInputDevice() { QAudioFormat fmt; +#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) + fmt.setSampleRate(16000); + fmt.setChannelCount(1); +#else fmt.setFrequency(16000); fmt.setChannels(1); +#endif fmt.setSampleSize(16); fmt.setSampleType(QAudioFormat::SignedInt); fmt.setByteOrder(QAudioFormat::LittleEndian); @@ -45,8 +50,13 @@ QAudioInput* AudioDeviceHelper::getPreferedInputDevice() { QAudioOutput* AudioDeviceHelper::getDefaultOutputDevice() { QAudioFormat fmt; +#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) + fmt.setSampleRate(16000); + fmt.setChannelCount(1); +#else fmt.setFrequency(16000); fmt.setChannels(1); +#endif fmt.setSampleSize(16); fmt.setSampleType(QAudioFormat::SignedInt); fmt.setByteOrder(QAudioFormat::LittleEndian);