From b8e7af7f86088cc8958e501d5f558ac1562ffdf3 Mon Sep 17 00:00:00 2001 From: Flavio Date: Wed, 30 Jul 2014 10:38:30 +0200 Subject: [PATCH] Preliminary Qt5 support --- locale/locale.pri | 1 + minitube.pro | 10 ++++++++-- src/Suggester.h | 3 +++ src/aboutview.h | 3 +++ src/autocomplete.h | 3 +++ src/channelitemdelegate.h | 3 +++ src/channelview.h | 3 +++ src/downloadlistview.h | 3 +++ src/downloadmanager.h | 3 +++ src/downloadsettings.h | 3 +++ src/downloadview.h | 3 +++ src/global.h | 3 +++ src/gridwidget.h | 3 +++ src/homeview.h | 3 +++ src/loadingwidget.h | 3 +++ src/main.cpp | 3 +++ src/mainwindow.h | 3 +++ src/mediaview.h | 3 +++ src/networkaccess.cpp | 3 +++ src/painterutils.h | 3 +++ src/playlistitemdelegate.h | 3 +++ src/playlistmodel.h | 3 +++ src/playlistview.h | 3 +++ src/refinesearchbutton.h | 3 +++ src/refinesearchwidget.h | 3 +++ src/regionsview.h | 3 +++ src/searchview.h | 3 +++ src/seekslider.h | 3 +++ src/segmentedcontrol.h | 3 +++ src/sidebarheader.h | 3 +++ src/sidebarwidget.h | 3 +++ src/spacer.h | 3 +++ src/standardfeedsview.h | 3 +++ src/suggester.h | 3 +++ src/utils.h | 3 +++ src/video.h | 3 +++ src/videosourcewidget.h | 3 +++ src/ytregions.h | 3 +++ src/ytuser.h | 3 +++ 39 files changed, 120 insertions(+), 2 deletions(-) diff --git a/locale/locale.pri b/locale/locale.pri index a9ff4b4..fc472ee 100644 --- a/locale/locale.pri +++ b/locale/locale.pri @@ -2,6 +2,7 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD +VPATH += $$PWD # ls -1 *.ts | tr '\n' ' ' TRANSLATIONS += ar.ts ast.ts be.ts bg_BG.ts ca.ts ca_ES.ts cs_CZ.ts da.ts de_DE.ts el.ts en.ts es.ts es_AR.ts es_ES.ts es_MX.ts fi.ts fi_FI.ts fr.ts gl.ts he_IL.ts hr.ts hu.ts ia.ts it.ts ja_JP.ts ky.ts ms_MY.ts nb.ts nl.ts nn.ts pl.ts pl_PL.ts pt.ts pt_BR.ts ro.ts ru.ts sk.ts sl.ts sq.ts sv_SE.ts tr.ts uk.ts uk_UA.ts vi.ts zh_CN.ts zh_TW.ts diff --git a/minitube.pro b/minitube.pro index 0786842..dd6c5c8 100644 --- a/minitube.pro +++ b/minitube.pro @@ -1,6 +1,6 @@ CONFIG += release TEMPLATE = app -VERSION = 2.2 +VERSION = 2.3 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube @@ -15,7 +15,13 @@ DEFINES += QT_STRICT_ITERATORS TARGET = $${APP_UNIX_NAME} -QT += network xml phonon sql script +QT += network xml sql script + +qt:greaterThan(QT_MAJOR_VERSION, 4) { + contains(QT, gui): QT *= widgets +} else { + QT += phonon +} include(src/qtsingleapplication/qtsingleapplication.pri) diff --git a/src/Suggester.h b/src/Suggester.h index e14492f..a647ccc 100644 --- a/src/Suggester.h +++ b/src/Suggester.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SUGGESTER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Suggester : public QObject { diff --git a/src/aboutview.h b/src/aboutview.h index 14c0bd1..9bd251a 100644 --- a/src/aboutview.h +++ b/src/aboutview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define ABOUTVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" #include "constants.h" diff --git a/src/autocomplete.h b/src/autocomplete.h index 17a5953..65673f9 100644 --- a/src/autocomplete.h +++ b/src/autocomplete.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SUGGESTCOMPLETION_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Suggester; class SearchLineEdit; diff --git a/src/channelitemdelegate.h b/src/channelitemdelegate.h index 6e5543a..7aef664 100644 --- a/src/channelitemdelegate.h +++ b/src/channelitemdelegate.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define CHANNELITEMDELEGATE_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class ChannelItemDelegate : public QStyledItemDelegate { diff --git a/src/channelview.h b/src/channelview.h index f8fa206..a108a4c 100644 --- a/src/channelview.h +++ b/src/channelview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define CHANNELSVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class VideoSource; diff --git a/src/downloadlistview.h b/src/downloadlistview.h index 59514c6..c46d19b 100644 --- a/src/downloadlistview.h +++ b/src/downloadlistview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define DOWNLOADLISTVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class DownloadListView : public QListView { diff --git a/src/downloadmanager.h b/src/downloadmanager.h index a07d7e3..01766df 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define DOWNLOADMANAGER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class DownloadItem; class DownloadModel; diff --git a/src/downloadsettings.h b/src/downloadsettings.h index f6d8e01..c740cbf 100644 --- a/src/downloadsettings.h +++ b/src/downloadsettings.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define DOWNLOADSETTINGS_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class DownloadSettings : public QWidget { diff --git a/src/downloadview.h b/src/downloadview.h index 731c6f9..dccbf9c 100644 --- a/src/downloadview.h +++ b/src/downloadview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define DOWNLOADVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class SegmentedControl; diff --git a/src/global.h b/src/global.h index 6057a83..5bac445 100644 --- a/src/global.h +++ b/src/global.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define GLOBAL_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include #include #include diff --git a/src/gridwidget.h b/src/gridwidget.h index 25756ca..efc61c3 100644 --- a/src/gridwidget.h +++ b/src/gridwidget.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define GRIDWIDGET_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class GridWidget : public QWidget { diff --git a/src/homeview.h b/src/homeview.h index 168a610..7e4ddb7 100644 --- a/src/homeview.h +++ b/src/homeview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define HOMEVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class SegmentedControl; diff --git a/src/loadingwidget.h b/src/loadingwidget.h index 37021f4..4c7a2d3 100644 --- a/src/loadingwidget.h +++ b/src/loadingwidget.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define LOADINGWIDGET_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "video.h" class LoadingWidget : public QWidget { diff --git a/src/main.cpp b/src/main.cpp index d26a9ff..a9717af 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,9 @@ along with Minitube. If not, see . $END_LICENSE */ #include +#if QT_VERSION >= 0x050000 +#include +#endif #include #include "constants.h" #include "mainwindow.h" diff --git a/src/mainwindow.h b/src/mainwindow.h index 159ffb6..e20bae0 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define MAINWINDOW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include #include #include diff --git a/src/mediaview.h b/src/mediaview.h index 2bc3f29..15e9a8d 100644 --- a/src/mediaview.h +++ b/src/mediaview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define __MEDIAVIEW_H__ #include +#if QT_VERSION >= 0x050000 +#include +#endif #include #include #include diff --git a/src/networkaccess.cpp b/src/networkaccess.cpp index ea8b557..98e44ca 100644 --- a/src/networkaccess.cpp +++ b/src/networkaccess.cpp @@ -21,6 +21,9 @@ $END_LICENSE */ #include "networkaccess.h" #include "constants.h" #include +#if QT_VERSION >= 0x050000 +#include +#endif namespace The { NetworkAccess* http(); diff --git a/src/painterutils.h b/src/painterutils.h index 35557bc..26bdbab 100644 --- a/src/painterutils.h +++ b/src/painterutils.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define PAINTERUTILS_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class PainterUtils { diff --git a/src/playlistitemdelegate.h b/src/playlistitemdelegate.h index 222ad9a..0bbd77f 100644 --- a/src/playlistitemdelegate.h +++ b/src/playlistitemdelegate.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define PLAYLISTITEMDELEGATE_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class PlaylistItemDelegate : public QStyledItemDelegate { diff --git a/src/playlistmodel.h b/src/playlistmodel.h index a5c3b7c..88d6dcf 100644 --- a/src/playlistmodel.h +++ b/src/playlistmodel.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define PLAYLISTMODEL_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Video; class VideoSource; diff --git a/src/playlistview.h b/src/playlistview.h index 82c5edd..d40fc99 100644 --- a/src/playlistview.h +++ b/src/playlistview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define PLAYLISTVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class PlaylistView : public QListView { diff --git a/src/refinesearchbutton.h b/src/refinesearchbutton.h index a861d8f..22cf1f1 100644 --- a/src/refinesearchbutton.h +++ b/src/refinesearchbutton.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define REFINESEARCHBUTTON_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class RefineSearchButton : public QPushButton { diff --git a/src/refinesearchwidget.h b/src/refinesearchwidget.h index 7330ca4..809d388 100644 --- a/src/refinesearchwidget.h +++ b/src/refinesearchwidget.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define REFINESEARCHWIDGET_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class SearchParams; diff --git a/src/regionsview.h b/src/regionsview.h index f0029ca..7368188 100644 --- a/src/regionsview.h +++ b/src/regionsview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define REGIONSVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class YTRegion; diff --git a/src/searchview.h b/src/searchview.h index 9cefc71..490a9a2 100644 --- a/src/searchview.h +++ b/src/searchview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define __SEARCHVIEW_H__ #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class SearchLineEdit; diff --git a/src/seekslider.h b/src/seekslider.h index 87e6cb9..decaeae 100644 --- a/src/seekslider.h +++ b/src/seekslider.h @@ -2,6 +2,9 @@ #define SEEKSLIDER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class SeekSlider : public QSlider { diff --git a/src/segmentedcontrol.h b/src/segmentedcontrol.h index ba1ccdf..bab83b1 100644 --- a/src/segmentedcontrol.h +++ b/src/segmentedcontrol.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SEGMENTEDCONTROL_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class SegmentedControl : public QWidget { diff --git a/src/sidebarheader.h b/src/sidebarheader.h index 8591d54..0ac551e 100644 --- a/src/sidebarheader.h +++ b/src/sidebarheader.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SIDEBARHEADER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class SidebarHeader : public QToolBar { diff --git a/src/sidebarwidget.h b/src/sidebarwidget.h index cd8efe6..2a1da99 100644 --- a/src/sidebarwidget.h +++ b/src/sidebarwidget.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SIDEBARWIDGET_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class RefineSearchButton; class RefineSearchWidget; diff --git a/src/spacer.h b/src/spacer.h index 88ae160..a811831 100644 --- a/src/spacer.h +++ b/src/spacer.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SPACER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Spacer : public QWidget { diff --git a/src/standardfeedsview.h b/src/standardfeedsview.h index 1d52143..f7e1485 100644 --- a/src/standardfeedsview.h +++ b/src/standardfeedsview.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define CATEGORIESVIEW_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "view.h" class VideoSource; diff --git a/src/suggester.h b/src/suggester.h index e14492f..a647ccc 100644 --- a/src/suggester.h +++ b/src/suggester.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define SUGGESTER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Suggester : public QObject { diff --git a/src/utils.h b/src/utils.h index b62bddf..de0d9fb 100644 --- a/src/utils.h +++ b/src/utils.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define UTILS_H #include +#if QT_VERSION >= 0x050000 +#include +#endif class Utils { diff --git a/src/video.h b/src/video.h index dc7dd60..d169723 100644 --- a/src/video.h +++ b/src/video.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define VIDEO_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include class Video : public QObject { diff --git a/src/videosourcewidget.h b/src/videosourcewidget.h index 22c7740..1aab7c4 100644 --- a/src/videosourcewidget.h +++ b/src/videosourcewidget.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define VIDEOSOURCEWIDGET_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include "gridwidget.h" class Video; diff --git a/src/ytregions.h b/src/ytregions.h index bae0286..1ea5e89 100644 --- a/src/ytregions.h +++ b/src/ytregions.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define YTREGIONS_H #include +#if QT_VERSION >= 0x050000 +#include +#endif struct YTRegion { QString id; diff --git a/src/ytuser.h b/src/ytuser.h index 631a366..306cd13 100644 --- a/src/ytuser.h +++ b/src/ytuser.h @@ -22,6 +22,9 @@ $END_LICENSE */ #define YTUSER_H #include +#if QT_VERSION >= 0x050000 +#include +#endif #include class YTUser : public QObject { -- 2.39.5