summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-10-04 09:36:08 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-10-04 09:36:14 +0200
commit61afb4d02a9dde1c68d40cb9b50805bbf29b3c84 (patch)
treeefbbadb05e26d666a3122f70543e64a2acf0b9c8
parentef3d371e0f54030bed9a10c15d3c740f9dacc3bd (diff)
parent64ddd6a4f57f4579bfd0eab91dc0f433c3a9f5f2 (diff)
Merge remote-tracking branch 'origin/wip/qt6' into dev
Conflicts: .qmake.conf Change-Id: I768ece1ea96b2d186484b72eafbc77c9ccfbb912
-rw-r--r--.qmake.conf2
-rw-r--r--examples/multimedia/audiodecoder/audiodecoder.cpp24
-rw-r--r--examples/multimedia/audiodecoder/main.cpp10
-rw-r--r--examples/multimedia/spectrum/app/engine.cpp4
-rw-r--r--src/imports/audioengine/audioengine.cpp4
-rw-r--r--src/imports/multimedia/multimedia.cpp5
-rw-r--r--src/plugins/coreaudio/coreaudiodeviceinfo.mm2
-rw-r--r--src/plugins/m3u/qm3uhandler.cpp2
-rw-r--r--src/plugins/qnx/camera/bbcameraorientationhandler.cpp6
-rw-r--r--src/plugins/qnx/camera/bbcameraorientationhandler.h4
-rw-r--r--src/plugins/qnx/common/windowgrabber.cpp6
-rw-r--r--src/plugins/qnx/common/windowgrabber.h4
-rw-r--r--src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp8
-rw-r--r--src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h8
14 files changed, 56 insertions, 33 deletions
diff --git a/.qmake.conf b/.qmake.conf
index b3c7403c2..85f18db7a 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST
-MODULE_VERSION = 5.15.0
+MODULE_VERSION = 6.0.0
diff --git a/examples/multimedia/audiodecoder/audiodecoder.cpp b/examples/multimedia/audiodecoder/audiodecoder.cpp
index 86904f7c9..15c88ebc9 100644
--- a/examples/multimedia/audiodecoder/audiodecoder.cpp
+++ b/examples/multimedia/audiodecoder/audiodecoder.cpp
@@ -129,16 +129,16 @@ void AudioDecoder::error(QAudioDecoder::Error error)
case QAudioDecoder::NoError:
return;
case QAudioDecoder::ResourceError:
- m_cout << "Resource error" << endl;
+ m_cout << "Resource error" << Qt::endl;
break;
case QAudioDecoder::FormatError:
- m_cout << "Format error" << endl;
+ m_cout << "Format error" << Qt::endl;
break;
case QAudioDecoder::AccessDeniedError:
- m_cout << "Access denied error" << endl;
+ m_cout << "Access denied error" << Qt::endl;
break;
case QAudioDecoder::ServiceMissingError:
- m_cout << "Service missing error" << endl;
+ m_cout << "Service missing error" << Qt::endl;
break;
}
@@ -149,10 +149,10 @@ void AudioDecoder::stateChanged(QAudioDecoder::State newState)
{
switch (newState) {
case QAudioDecoder::DecodingState:
- m_cout << "Decoding..." << endl;
+ m_cout << "Decoding..." << Qt::endl;
break;
case QAudioDecoder::StoppedState:
- m_cout << "Decoding stopped" << endl;
+ m_cout << "Decoding stopped" << Qt::endl;
break;
}
}
@@ -160,12 +160,12 @@ void AudioDecoder::stateChanged(QAudioDecoder::State newState)
void AudioDecoder::finished()
{
if (!m_fileWriter.close())
- m_cout << "Failed to finilize output file" << endl;
+ m_cout << "Failed to finilize output file" << Qt::endl;
- m_cout << "Decoding finished" << endl;
+ m_cout << "Decoding finished" << Qt::endl;
if (m_isPlayback) {
- m_cout << "Starting playback" << endl;
+ m_cout << "Starting playback" << Qt::endl;
m_soundEffect.setSource(QUrl::fromLocalFile(m_targetFilename));
m_soundEffect.play();
} else {
@@ -176,7 +176,7 @@ void AudioDecoder::finished()
void AudioDecoder::playbackStatusChanged()
{
if (m_soundEffect.status() == QSoundEffect::Error) {
- m_cout << "Playback error" << endl;
+ m_cout << "Playback error" << Qt::endl;
emit done();
}
}
@@ -184,7 +184,7 @@ void AudioDecoder::playbackStatusChanged()
void AudioDecoder::playingChanged()
{
if (!m_soundEffect.isPlaying()) {
- m_cout << "Playback finished" << endl;
+ m_cout << "Playback finished" << Qt::endl;
if (m_isDelete)
QFile::remove(m_targetFilename);
emit done();
@@ -200,7 +200,7 @@ void AudioDecoder::updateProgress()
progress = position / (qreal)duration;
if (progress > m_progress + 0.1) {
- m_cout << "Decoding progress: " << (int)(progress * 100.0) << "%" << endl;
+ m_cout << "Decoding progress: " << (int)(progress * 100.0) << "%" << Qt::endl;
m_progress = progress;
}
}
diff --git a/examples/multimedia/audiodecoder/main.cpp b/examples/multimedia/audiodecoder/main.cpp
index c0947b83f..46e70445e 100644
--- a/examples/multimedia/audiodecoder/main.cpp
+++ b/examples/multimedia/audiodecoder/main.cpp
@@ -63,10 +63,10 @@ int main(int argc, char *argv[])
QTextStream cout(stdout, QIODevice::WriteOnly);
if (app.arguments().size() < 2) {
- cout << "Usage: audiodecoder [-p] [-pd] SOURCEFILE [TARGETFILE]" << endl;
- cout << "Set -p option if you want to play output file." << endl;
- cout << "Set -pd option if you want to play output file and delete it after successful playback." << endl;
- cout << "Default TARGETFILE name is \"out.wav\" in the same directory as the source file." << endl;
+ cout << "Usage: audiodecoder [-p] [-pd] SOURCEFILE [TARGETFILE]" << Qt::endl;
+ cout << "Set -p option if you want to play output file." << Qt::endl;
+ cout << "Set -pd option if you want to play output file and delete it after successful playback." << Qt::endl;
+ cout << "Default TARGETFILE name is \"out.wav\" in the same directory as the source file." << Qt::endl;
return 0;
}
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
int sourceFileIndex = (isPlayback || isDelete) ? 2 : 1;
if (app.arguments().size() <= sourceFileIndex) {
- cout << "Error: source filename is not specified." << endl;
+ cout << "Error: source filename is not specified." << Qt::endl;
return 0;
}
sourceFile.setFile(app.arguments().at(sourceFileIndex));
diff --git a/examples/multimedia/spectrum/app/engine.cpp b/examples/multimedia/spectrum/app/engine.cpp
index fd977785b..49df1c028 100644
--- a/examples/multimedia/spectrum/app/engine.cpp
+++ b/examples/multimedia/spectrum/app/engine.cpp
@@ -569,14 +569,14 @@ bool Engine::selectFormat()
sampleRatesList += m_audioInputDevice.supportedSampleRates();
sampleRatesList += m_audioOutputDevice.supportedSampleRates();
- sampleRatesList = sampleRatesList.toSet().toList(); // remove duplicates
+ sampleRatesList = QSet<int>(sampleRatesList.begin(), sampleRatesList.end()).values(); // remove duplicates
std::sort(sampleRatesList.begin(), sampleRatesList.end());
ENGINE_DEBUG << "Engine::initialize frequenciesList" << sampleRatesList;
QList<int> channelsList;
channelsList += m_audioInputDevice.supportedChannelCounts();
channelsList += m_audioOutputDevice.supportedChannelCounts();
- channelsList = channelsList.toSet().toList();
+ channelsList = QSet<int>(channelsList.begin(), channelsList.end()).values();
std::sort(channelsList.begin(), channelsList.end());
ENGINE_DEBUG << "Engine::initialize channelsList" << channelsList;
diff --git a/src/imports/audioengine/audioengine.cpp b/src/imports/audioengine/audioengine.cpp
index 537b09ab8..698f41bdc 100644
--- a/src/imports/audioengine/audioengine.cpp
+++ b/src/imports/audioengine/audioengine.cpp
@@ -80,7 +80,9 @@ public:
qmlRegisterType<QDeclarativeAudioEngine, 1>(uri, 1, 1, "AudioEngine");
qmlRegisterType<QDeclarativeSound, 1>(uri, 1, 1, "Sound");
- qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
+ // The minor version used to be the current Qt 5 minor. For compatibility it is the last
+ // Qt 5 release.
+ qmlRegisterModule(uri, 1, 15);
}
};
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
index 8aed83d33..5e3071f2b 100644
--- a/src/imports/multimedia/multimedia.cpp
+++ b/src/imports/multimedia/multimedia.cpp
@@ -160,8 +160,9 @@ public:
// 5.13 types
qmlRegisterType<QDeclarativeVideoOutput, 13>(uri, 5, 13, "VideoOutput");
- // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
- qmlRegisterModule(uri, 5, QT_VERSION_MINOR);
+ // The minor version used to be the current Qt 5 minor. For compatibility it is the last
+ // Qt 5 release.
+ qmlRegisterModule(uri, 5, 15);
}
void initializeEngine(QQmlEngine *engine, const char *uri) override
diff --git a/src/plugins/coreaudio/coreaudiodeviceinfo.mm b/src/plugins/coreaudio/coreaudiodeviceinfo.mm
index 1a79438cb..594ea225b 100644
--- a/src/plugins/coreaudio/coreaudiodeviceinfo.mm
+++ b/src/plugins/coreaudio/coreaudiodeviceinfo.mm
@@ -189,7 +189,7 @@ QList<int> CoreAudioDeviceInfo::supportedSampleRates()
//with available hardware
sampleRates << 8000 << 11025 << 22050 << 44100 << 48000;
#endif
- return sampleRates.toList();
+ return sampleRates.values();
}
diff --git a/src/plugins/m3u/qm3uhandler.cpp b/src/plugins/m3u/qm3uhandler.cpp
index 017c32d92..5e05994ef 100644
--- a/src/plugins/m3u/qm3uhandler.cpp
+++ b/src/plugins/m3u/qm3uhandler.cpp
@@ -163,7 +163,7 @@ public:
virtual bool writeItem(const QMediaContent& item)
{
- *m_textStream << item.request().url().toString() << endl;
+ *m_textStream << item.request().url().toString() << Qt::endl;
return true;
}
diff --git a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
index eee0f2581..a4c7b43ba 100644
--- a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
+++ b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
@@ -76,7 +76,11 @@ BbCameraOrientationHandler::~BbCameraOrientationHandler()
QCoreApplication::eventDispatcher()->removeNativeEventFilter(this);
}
-bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, long*)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, qintptr *)
+#else
+bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, long *)
+#endif
{
bps_event_t* const event = static_cast<bps_event_t*>(message);
if (!event || bps_event_get_domain(event) != orientation_get_domain())
diff --git a/src/plugins/qnx/camera/bbcameraorientationhandler.h b/src/plugins/qnx/camera/bbcameraorientationhandler.h
index 006a259cc..a98582d84 100644
--- a/src/plugins/qnx/camera/bbcameraorientationhandler.h
+++ b/src/plugins/qnx/camera/bbcameraorientationhandler.h
@@ -51,7 +51,11 @@ public:
explicit BbCameraOrientationHandler(QObject *parent = 0);
~BbCameraOrientationHandler();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
int orientation() const;
diff --git a/src/plugins/qnx/common/windowgrabber.cpp b/src/plugins/qnx/common/windowgrabber.cpp
index 9a65ad3a0..f431f98a2 100644
--- a/src/plugins/qnx/common/windowgrabber.cpp
+++ b/src/plugins/qnx/common/windowgrabber.cpp
@@ -189,7 +189,11 @@ bool WindowGrabber::handleScreenEvent(screen_event_t screen_event)
return false;
}
-bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, long*)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *)
+#else
+bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, long *)
+#endif
{
if (eventType == "screen_event_t") {
const screen_event_t event = static_cast<screen_event_t>(message);
diff --git a/src/plugins/qnx/common/windowgrabber.h b/src/plugins/qnx/common/windowgrabber.h
index 3ebd0e8a6..5603d9634 100644
--- a/src/plugins/qnx/common/windowgrabber.h
+++ b/src/plugins/qnx/common/windowgrabber.h
@@ -100,7 +100,11 @@ public:
void pause();
void resume();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
bool handleScreenEvent(screen_event_t event);
diff --git a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
index c050c03c5..29fd082d8 100644
--- a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
+++ b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
@@ -113,9 +113,11 @@ void MmrEventMediaPlayerControl::resetMonitoring()
m_speed = 0;
}
-bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType,
- void *message,
- long *result)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
+#else
+bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
+#endif
{
Q_UNUSED(result)
if (eventType == "screen_event_t") {
diff --git a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
index 0e4defc5c..cb80ccbfc 100644
--- a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
+++ b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
@@ -58,9 +58,11 @@ public:
void stopMonitoring() override;
void resetMonitoring() override;
- bool nativeEventFilter(const QByteArray &eventType,
- void *message,
- long *result) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
private Q_SLOTS:
void readEvents();