BUILDING ON UNIX
- 1. Prerequisites: Qt >= 5 and its development packages
+ 1. Prerequisites: Qt >= 4.6 and its development packages
2. Build Transmission as normal
- 3. In the qt/ directory, type "qmake qtr.pro" or "qmake-qt5 qtr.pro"
+ 3. In the qt/ directory, type "qmake qtr.pro" (or "qmake-qt4 qtr.pro", or "qmake-qt5 qtr.pro")
4. In the qt/ directory, type "make"
5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install"
(Feel free to replace /usr with /usr/local or /opt or whatever)
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
-#include <QStandardPaths>
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ #include <QDesktopServices>
+#else
+ #include <QStandardPaths>
+#endif
#include "favicon.h"
QString
Favicons :: getCacheDir( )
{
- const QString base = QStandardPaths::writableLocation (QStandardPaths::CacheLocation);
+ const QString base =
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
+#else
+ QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
+#endif
+
return QDir( base ).absoluteFilePath( "favicons" );
}
for (int i=0; i<NUM_COLUMNS; ++i)
{
setColumnHidden (i, (i<FIRST_VISIBLE_COLUMN) || (LAST_VISIBLE_COLUMN<i));
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ header()->setResizeMode(i, QHeaderView::Interactive);
+#else
header()->setSectionResizeMode(i, QHeaderView::Interactive);
+#endif
}
connect (this, SIGNAL(clicked(const QModelIndex&)),
man.files = transmission-qt.1
CONFIG += qt thread debug link_pkgconfig
-QT += network dbus widgets
+QT += network dbus
PKGCONFIG = fontconfig libcurl openssl libevent
+greaterThan(QT_MAJOR_VERSION, 4) {
+ QT += widgets
+}
+
TRANSMISSION_TOP = ..
include(config.pri)