Projects
Multimedia
qmp3gain
qmp3gain-0.9.0-qt5.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qmp3gain-0.9.0-qt5.patch of Package qmp3gain (Revision 6)
Currently displaying revision
6
,
Show latest
From: Luigi Baldoni <aloisio@gmx.com> Date: 2018-02-13 12:48:38 +0100 Subject: Build against Qt5 Qt4 is deprecated and a possible security hazard, so it's preferable to build against Qt5 libs. --- a/src/backenddialog.cpp +++ b/src/backenddialog.cpp @@ -1,4 +1,5 @@ #include <QtGui> +#include <QFileDialog> #include "backenddialog.h" --- a/src/constantgainchangedialog.h +++ b/src/constantgainchangedialog.h @@ -1,7 +1,7 @@ #ifndef CONSTANTGAINCHANGEDIALOG_H #define CONSTANTGAINCHANGEDIALOG_H -#include <QtGui/QDialog> +#include <QDialog> #include <QSettings> #include "ui_constantgainchangedialog.h" --- a/src/logoptionsdialog.cpp +++ b/src/logoptionsdialog.cpp @@ -1,5 +1,7 @@ #include <QtGui> #include <QPointer> +#include <QFileDialog> +#include <QMessageBox> #include "logoptionsdialog.h" --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1,5 +1,8 @@ #include <QtGui> #include <QtXml> +#include <QWidgetAction> +#include <QFileDialog> +#include <QAudioDeviceInfo> #include "mainwindow.h" #include "aboutdialog.h" @@ -532,7 +535,7 @@ void MainWindow::playMP3File(){ delete mediaObject; } if (!isToBeStopped) { - mediaObject = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(fileName)); + mediaObject = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(QUrl::fromLocalFile("fileName"))); connect(mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(playStateChanged(Phonon::State,Phonon::State))); mediaObject->play(); @@ -2989,14 +2992,14 @@ void MainWindow::on_actionSave_Analysis_ item = getItem(row, "Path"); if (item){ if (isXML) - out << "\t\t<path>" << Qt::escape(item->text()) << "</path>" << endl; + out << "\t\t<path>" << QString(item->text().toHtmlEscaped()) << "</path>" << endl; else out << "\"" << item->text() << "\"" << ","; } item = getItem(row, "File"); if (item){ if (isXML) - out << "\t\t<file>" << Qt::escape(item->text()) << "</file>" << endl; + out << "\t\t<file>" << QString(item->text().toHtmlEscaped()) << "</file>" << endl; else out << "\"" << item->text() << "\"" << ","; } @@ -3005,7 +3008,7 @@ void MainWindow::on_actionSave_Analysis_ QFileInfo fi(item->text()); QDateTime dateTime = fi.lastModified(); if (isXML) - out << "\t\t<file_last_modified>" << Qt::escape(dateTime.toString("yyyy-MM-dd hh:mm:ss")) << "</file_last_modified>" << endl; + out << "\t\t<file_last_modified>" << QString(dateTime.toString("yyyy-MM-dd hh:mm:ss").toHtmlEscaped()) << "</file_last_modified>" << endl; else out << "#" << dateTime.toString("yyyy-MM-dd hh:mm:ss") << "#" << ","; if (isXML) @@ -3018,7 +3021,7 @@ void MainWindow::on_actionSave_Analysis_ double maxAmplitude = item->data().toDouble(); QString maxAmplitudeStr = QString("%1").arg(maxAmplitude, 0, 'f', 3); if (isXML) - out << "\t\t<max_amplitude>" << Qt::escape(maxAmplitudeStr) << "</max_amplitude>" << endl; + out << "\t\t<max_amplitude>" << QString(maxAmplitudeStr.toHtmlEscaped()) << "</max_amplitude>" << endl; else out << maxAmplitudeStr << ","; } @@ -3027,7 +3030,7 @@ void MainWindow::on_actionSave_Analysis_ double dBGain = item->data().toDouble(); QString dBGainStr = QString("%1").arg(dBGain, 0, 'f', 3); if (isXML) - out << "\t\t<db_gain>" << Qt::escape(dBGainStr) << "</db_gain>" << endl; + out << "\t\t<db_gain>" << QString(dBGainStr.toHtmlEscaped()) << "</db_gain>" << endl; else out << dBGainStr << ","; } @@ -3036,7 +3039,7 @@ void MainWindow::on_actionSave_Analysis_ double AlbumdBGain = item->data().toDouble(); QString AlbumdBGainStr = QString("%1").arg(AlbumdBGain, 0, 'f', 3); if (isXML) - out << "\t\t<album_db_gain>" << Qt::escape(AlbumdBGainStr) << "</album_db_gain>" << endl; + out << "\t\t<album_db_gain>" << QString(AlbumdBGainStr.toHtmlEscaped()) << "</album_db_gain>" << endl; else out << AlbumdBGainStr; } @@ -3729,7 +3732,7 @@ void MainWindow::on_actionShow_Path_at_F // menu: Options/Beep when finished void MainWindow::on_actionBeep_when_finished_toggled(bool checked){ if (checked){ - if (QSound::isAvailable()){ + if (QAudioDeviceInfo::availableDevices(QAudio::AudioOutput).isEmpty()){ QString resourcePath = directoryOf("resources/sounds").absolutePath(); QString beepFile(resourcePath+"/"+"beep.wav"); if (QFileInfo(beepFile).exists()) --- a/src/mymessagebox.cpp +++ b/src/mymessagebox.cpp @@ -6,6 +6,8 @@ */ #include <QtGui> +#include <QGridLayout> +#include <QCheckBox> #include "mymessagebox.h" MyMessageBox::MyMessageBox() { --- a/src/src.pro +++ b/src/src.pro @@ -8,8 +8,7 @@ APP_SUBMINOR_VER = 0 TEMPLATE = app CONFIG += warn_on \ thread \ - qt \ - help + qt TARGET = qmp3gain DESTDIR = ../bin RESOURCEDIR = ../resources @@ -20,11 +19,14 @@ win32 { else { INSTALLDIR_BIN = /usr/bin INSTALLDIR_SHARE = /usr/share/qmp3gain + CONFIG += link_pkgconfig + PKGCONFIG += phonon4qt5 } -QT += gui \ +QT += help \ + gui \ + multimedia \ xml \ - webkit \ - phonon + webkitwidgets # Input HEADERS += doubleprogressbar.h \ mymessagebox.h \ --- a/translations/translations.pri +++ b/translations/translations.pri @@ -24,7 +24,8 @@ } else { translations.path = $${INSTALLDIR_SHARE}/translations - translations.files = $$TS_DIR/*.qm + translations.files = $$TRANSLATIONS + translations.files ~= s,\\.ts$,.qm,g translations.CONFIG += no_check_exist INSTALLS += translations } --- a/help/help.pri +++ b/help/help.pri @@ -14,6 +14,7 @@ for(file, HELPS) { exists($${file}.qhp) { HELPS_QHP += $${file}.qhp + HELPS_INST += $${file}.qch } } @@ -29,13 +30,21 @@ # qcollectiongenerator qmp3gain.qhcp -o qmp3gain.qhc isEmpty(QMAKE_QCOLLECTIONGENERATOR) { - win32:QMAKE_QCOLLECTIONGENERATOR = $$[QT_INSTALL_BINS]\qcollectiongenerator.exe - else:QMAKE_QCOLLECTIONGENERATOR = $$[QT_INSTALL_BINS]/qcollectiongenerator + exists($$[QT_INSTALL_BINS]/qcollectiongenerator) { + QMAKE_QCOLLECTIONGENERATOR = $$[QT_INSTALL_BINS]/qcollectiongenerator + } else { + exists($$[QT_INSTALL_BINS]/qhelpgenerator) { + QMAKE_QCOLLECTIONGENERATOR = $$[QT_INSTALL_BINS]/qhelpgenerator + } else { + QMAKE_QCOLLECTIONGENERATOR = /bin/false + } + } } for(file, HELPS) { exists($${file}.qhcp) { HELPS_QHCP += $${file}.qhcp + HELPS_INST += $${file}.qhc } } @@ -56,7 +65,7 @@ } else { help.path = $${INSTALLDIR_SHARE}/help - help.files = $$HELP_DIR/*.qhc $$HELP_DIR/*.qch + help.files = $$HELPS_INST help.CONFIG += no_check_exist INSTALLS += help }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.