-INCLUDEPATH += /usr/include/phonon
CONFIG += release
TEMPLATE = app
+VERSION=1.0.1
+DEFINES += APP_VERSION="$$VERSION"
+INCLUDEPATH += /usr/include/phonon
# TODO Saner string behaviour
# DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_STRICT_ITERATORS
TARGET = minitube
-mac {
- TARGET = Minitube
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
-}
+
QT += network \
xml \
phonon
src/searchlineedit.h \
src/urllineedit.h \
src/spacer.h \
- src/Constants.h \
+ src/constants.h \
src/iconloader/qticonloader.h \
src/faderwidget/FaderWidget.h \
src/ListModel.h \
src/googlesuggest.cpp \
src/videowidget.cpp \
src/flickcharm.cpp \
- src/videodefinition.cpp
+ src/videodefinition.cpp \
+ src/constants.cpp
RESOURCES += resources.qrc
DESTDIR = build/target/
OBJECTS_DIR = build/obj/
# deploy
DISTFILES += CHANGES \
COPYING
-mac {
- CONFIG += x86 \
- ppc
- QMAKE_INFO_PLIST = Info.plist
- ICON = minitube.icns
-}
-unix {
+
+unix {
isEmpty(PREFIX):PREFIX = /usr
BINDIR = $$PREFIX/bin
INSTALLS += target
desktop \
iconsvg \
icon16 \
+ icon22 \
icon32 \
icon48 \
icon64 \
icon128 \
- icon256
+ icon256 \
+ icon512
translations.path = $$PKGDATADIR
translations.files += $$DESTDIR/locale
desktop.path = $$DATADIR/applications
iconsvg.files += data/minitube.svg
icon16.path = $$DATADIR/icons/hicolor/16x16/apps
icon16.files += data/16x16/minitube.png
+ icon22.path = $$DATADIR/icons/hicolor/22x22/apps
+ icon22.files += data/22x22/minitube.png
icon32.path = $$DATADIR/icons/hicolor/32x32/apps
icon32.files += data/32x32/minitube.png
icon48.path = $$DATADIR/icons/hicolor/48x48/apps
icon128.files += data/128x128/minitube.png
icon256.path = $$DATADIR/icons/hicolor/256x256/apps
icon256.files += data/256x256/minitube.png
+ icon256.path = $$DATADIR/icons/hicolor/512x512/apps
+ icon256.files += data/256x256/minitube.png
}
-win32:RC_FILE = minitube.rc
#include "AboutView.h"
-#include "Constants.h"
+#include "constants.h"
AboutView::AboutView(QWidget *parent) : QWidget(parent) {
#include <QtGui>
#include "View.h"
-#include "Constants.h"
+#include "constants.h"
class AboutView : public QWidget, public View {
#include "MainWindow.h"
#include "spacer.h"
-#include "Constants.h"
+#include "constants.h"
#include "iconloader/qticonloader.h"
#include "global.h"
#include "videodefinition.h"
#include "SearchView.h"
-#include "Constants.h"
+#include "constants.h"
namespace The {
QMap<QString, QAction*>* globalActions();
--- /dev/null
+#include "constants.h"
+
+#define STR(x) #x
+#define STRINGIFY(x) STR(x)
+
+const char *Constants::VERSION = STRINGIFY(APP_VERSION);
+const char *Constants::APP_NAME = "Minitube";
+const char *Constants::ORG_NAME = "Flavio Tordini";
+const char *Constants::ORG_DOMAIN = "flavio.tordini.org";
+const char *Constants::WEBSITE = "http://flavio.tordini.org/minitube";
+const char *Constants::EMAIL = "flavio.tordini@gmail.com";
--- /dev/null
+#ifndef CONSTANTS_H
+#define CONSTANTS_H
+
+#include <QString>
+
+class Constants {
+
+public:
+
+ static const char *VERSION;
+ static const char *APP_NAME;
+ static const char *ORG_NAME;
+ static const char *ORG_DOMAIN;
+ static const char *WEBSITE;
+ static const char *EMAIL;
+ static const QString USER_AGENT;
+
+};
+
+#endif
#include <QtGui>
#include <qtsingleapplication.h>
-#include "Constants.h"
+#include "constants.h"
#include "MainWindow.h"
int main(int argc, char **argv) {
#include "networkaccess.h"
-#include "Constants.h"
+#include "constants.h"
#include <QtGui>
namespace The {
NetworkAccess* http();
}
+const QString USER_AGENT = QString(Constants::APP_NAME)
+ + " " + Constants::VERSION
+ + " (" + Constants::WEBSITE + ")";
+
NetworkReply::NetworkReply(QNetworkReply *networkReply) : QObject(networkReply) {
this->networkReply = networkReply;
}
QNetworkAccessManager *manager = The::networkAccessManager();
QNetworkRequest request(url);
- request.setRawHeader("User-Agent", Constants::USER_AGENT.toUtf8());
+ request.setRawHeader("User-Agent", USER_AGENT.toUtf8());
request.setRawHeader("Connection", "Keep-Alive");
QNetworkReply *networkReply;
#include "updatechecker.h"
#include "networkaccess.h"
-#include "Constants.h"
+#include "constants.h"
namespace The {
NetworkAccess* http();
#include "youtubesearch.h"
#include "youtubestreamreader.h"
-#include "Constants.h"
+#include "constants.h"
#include "networkaccess.h"
namespace The {