mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Code maintenance for Qt 5:
- LinksCloud - VOIP - FeedReader git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6853 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c8b8daf110
commit
41ba665813
@ -10,8 +10,10 @@ linux-g++-64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
# from Qt 4.7.4 and 4.8+ the mkspecs has changed making dyn libs unusable anymore on windows : QMAKE_LFLAGS =
|
lessThan(QT_MAJOR_VERSION, 5) {
|
||||||
QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
|
# 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
|
# Switch on extra warnings
|
||||||
QMAKE_CFLAGS += -Wextra
|
QMAKE_CFLAGS += -Wextra
|
||||||
@ -22,7 +24,7 @@ win32 {
|
|||||||
RCC_DIR = temp/qrc
|
RCC_DIR = temp/qrc
|
||||||
UI_DIR = temp/ui
|
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
|
DEFINES += MINIUPNPC_VERSION=13
|
||||||
# DESTDIR = lib
|
# DESTDIR = lib
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
CONFIG += qt uic qrc resources
|
CONFIG += qt uic qrc resources
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
# Qt 5
|
||||||
|
QT += widgets
|
||||||
|
}
|
||||||
|
|
||||||
SOURCES = FeedReaderPlugin.cpp \
|
SOURCES = FeedReaderPlugin.cpp \
|
||||||
services/p3FeedReader.cc \
|
services/p3FeedReader.cc \
|
||||||
services/p3FeedReaderThread.cc \
|
services/p3FeedReaderThread.cc \
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "gui/common/RSTreeWidgetItem.h"
|
#include "gui/common/RSTreeWidgetItem.h"
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
|
#include "util/QtVersion.h"
|
||||||
|
|
||||||
#include "retroshare/rsiface.h"
|
#include "retroshare/rsiface.h"
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(const std::string &feedId, RsFe
|
|||||||
|
|
||||||
/* set header resize modes and initial section sizes */
|
/* set header resize modes and initial section sizes */
|
||||||
QHeaderView *header = ui->msgTreeWidget->header();
|
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_TITLE, 350);
|
||||||
header->resizeSection(COLUMN_MSG_PUBDATE, 140);
|
header->resizeSection(COLUMN_MSG_PUBDATE, 140);
|
||||||
header->resizeSection(COLUMN_MSG_AUTHOR, 150);
|
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 */
|
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||||
header->resizeSection(COLUMN_MSG_READ, 24);
|
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 */
|
/* build menu for link button */
|
||||||
QMenu *menu = new QMenu(this);
|
QMenu *menu = new QMenu(this);
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
CONFIG += qt uic qrc resources
|
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
|
SOURCES = p3ranking.cc LinksDialog.cpp rsrankitems.cc AddLinksDialog.cpp LinksCloudPlugin.cpp
|
||||||
HEADERS = rsrank.h p3ranking.h LinksDialog.h rsrankitems.h AddLinksDialog.h LinksCloudPlugin.h
|
HEADERS = rsrank.h p3ranking.h LinksDialog.h rsrankitems.h AddLinksDialog.h LinksCloudPlugin.h
|
||||||
FORMS = LinksDialog.ui AddLinksDialog.ui
|
FORMS = LinksDialog.ui AddLinksDialog.ui
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <gui/RetroShareLink.h>
|
#include <gui/RetroShareLink.h>
|
||||||
#include "AddLinksDialog.h"
|
#include "AddLinksDialog.h"
|
||||||
#include "rsrank.h"
|
#include "rsrank.h"
|
||||||
|
#include "util/QtVersion.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -81,9 +82,9 @@ LinksDialog::LinksDialog(RsPeers *peers, RsFiles *files, QWidget *parent)
|
|||||||
|
|
||||||
/* Set header resize modes and initial section sizes */
|
/* Set header resize modes and initial section sizes */
|
||||||
QHeaderView * _header = ui.linkTreeWidget->header () ;
|
QHeaderView * _header = ui.linkTreeWidget->header () ;
|
||||||
_header->setResizeMode (0, QHeaderView::Interactive);
|
QHeaderView_setSectionResizeMode(_header, 0, QHeaderView::Interactive);
|
||||||
_header->setResizeMode (1, QHeaderView::Interactive);
|
QHeaderView_setSectionResizeMode(_header, 1, QHeaderView::Interactive);
|
||||||
_header->setResizeMode (2, QHeaderView::Interactive);
|
QHeaderView_setSectionResizeMode(_header, 2, QHeaderView::Interactive);
|
||||||
|
|
||||||
_header->resizeSection ( 0, 400 );
|
_header->resizeSection ( 0, 400 );
|
||||||
_header->resizeSection ( 1, 60 );
|
_header->resizeSection ( 1, 60 );
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
!include("../Common/retroshare_plugin.pri"): error("Could not include file ../Common/retroshare_plugin.pri")
|
!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) {
|
exists($$[QMAKE_MKSPECS]/features/mobility.prf) {
|
||||||
CONFIG += mobility
|
CONFIG += mobility
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "VOIPPlugin.h"
|
#include "VOIPPlugin.h"
|
||||||
#include "interface/rsvoip.h"
|
#include "interface/rsvoip.h"
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
//#include "AudioInput.h"
|
//#include "AudioInput.h"
|
||||||
//#include "AudioOutput.h"
|
//#include "AudioOutput.h"
|
||||||
#include "AudioStats.h"
|
#include "AudioStats.h"
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#define iroundf(x) ( static_cast<int>(x) )
|
#define iroundf(x) ( static_cast<int>(x) )
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
#include "AudioStats.h"
|
#include "AudioStats.h"
|
||||||
#include "AudioInputConfig.h"
|
#include "AudioInputConfig.h"
|
||||||
//#include "Global.h"
|
//#include "Global.h"
|
||||||
|
@ -31,8 +31,7 @@
|
|||||||
#ifndef _AUDIOSTATS_H
|
#ifndef _AUDIOSTATS_H
|
||||||
#define _AUDIOSTATS_H
|
#define _AUDIOSTATS_H
|
||||||
|
|
||||||
#include <QtCore>
|
#include <QWidget>
|
||||||
#include <QtGui>
|
|
||||||
|
|
||||||
//#include "mumble_pch.hpp"
|
//#include "mumble_pch.hpp"
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include "AudioWizard.h"
|
#include "AudioWizard.h"
|
||||||
//#include "AudioInput.h"
|
//#include "AudioInput.h"
|
||||||
//#include "Global.h"
|
//#include "Global.h"
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
|
|
||||||
#include "ui_AudioWizard.h"
|
#include "ui_AudioWizard.h"
|
||||||
|
|
||||||
|
class QGraphicsScene;
|
||||||
|
class QGraphicsItem;
|
||||||
|
|
||||||
class AudioWizard: public QWizard, public Ui::AudioWizard {
|
class AudioWizard: public QWizard, public Ui::AudioWizard {
|
||||||
private:
|
private:
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -8,8 +8,13 @@ AudioDeviceHelper::AudioDeviceHelper()
|
|||||||
QAudioInput* AudioDeviceHelper::getDefaultInputDevice()
|
QAudioInput* AudioDeviceHelper::getDefaultInputDevice()
|
||||||
{
|
{
|
||||||
QAudioFormat fmt;
|
QAudioFormat fmt;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||||
|
fmt.setSampleRate(16000);
|
||||||
|
fmt.setChannelCount(1);
|
||||||
|
#else
|
||||||
fmt.setFrequency(16000);
|
fmt.setFrequency(16000);
|
||||||
fmt.setChannels(1);
|
fmt.setChannels(1);
|
||||||
|
#endif
|
||||||
fmt.setSampleSize(16);
|
fmt.setSampleSize(16);
|
||||||
fmt.setSampleType(QAudioFormat::SignedInt);
|
fmt.setSampleType(QAudioFormat::SignedInt);
|
||||||
fmt.setByteOrder(QAudioFormat::LittleEndian);
|
fmt.setByteOrder(QAudioFormat::LittleEndian);
|
||||||
@ -45,8 +50,13 @@ QAudioInput* AudioDeviceHelper::getPreferedInputDevice() {
|
|||||||
|
|
||||||
QAudioOutput* AudioDeviceHelper::getDefaultOutputDevice() {
|
QAudioOutput* AudioDeviceHelper::getDefaultOutputDevice() {
|
||||||
QAudioFormat fmt;
|
QAudioFormat fmt;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||||
|
fmt.setSampleRate(16000);
|
||||||
|
fmt.setChannelCount(1);
|
||||||
|
#else
|
||||||
fmt.setFrequency(16000);
|
fmt.setFrequency(16000);
|
||||||
fmt.setChannels(1);
|
fmt.setChannels(1);
|
||||||
|
#endif
|
||||||
fmt.setSampleSize(16);
|
fmt.setSampleSize(16);
|
||||||
fmt.setSampleType(QAudioFormat::SignedInt);
|
fmt.setSampleType(QAudioFormat::SignedInt);
|
||||||
fmt.setByteOrder(QAudioFormat::LittleEndian);
|
fmt.setByteOrder(QAudioFormat::LittleEndian);
|
||||||
|
Loading…
Reference in New Issue
Block a user