mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +00:00
(trunk, qt) #5465: restore Qt 4.6 support, patch by mike.did
This commit is contained in:
parent
9182c34711
commit
59abf35807
4 changed files with 25 additions and 5 deletions
|
@ -36,9 +36,9 @@ BUILDING ON OS X
|
||||||
|
|
||||||
BUILDING ON UNIX
|
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
|
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"
|
4. In the qt/ directory, type "make"
|
||||||
5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install"
|
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)
|
(Feel free to replace /usr with /usr/local or /opt or whatever)
|
||||||
|
|
|
@ -14,7 +14,12 @@
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
#include <QStandardPaths>
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#else
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "favicon.h"
|
#include "favicon.h"
|
||||||
|
|
||||||
|
@ -40,7 +45,13 @@ Favicons :: ~Favicons( )
|
||||||
QString
|
QString
|
||||||
Favicons :: getCacheDir( )
|
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" );
|
return QDir( base ).absoluteFilePath( "favicons" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -885,7 +885,12 @@ FileTreeView :: FileTreeView (QWidget * parent, bool isEditable):
|
||||||
for (int i=0; i<NUM_COLUMNS; ++i)
|
for (int i=0; i<NUM_COLUMNS; ++i)
|
||||||
{
|
{
|
||||||
setColumnHidden (i, (i<FIRST_VISIBLE_COLUMN) || (LAST_VISIBLE_COLUMN<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);
|
header()->setSectionResizeMode(i, QHeaderView::Interactive);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
connect (this, SIGNAL(clicked(const QModelIndex&)),
|
connect (this, SIGNAL(clicked(const QModelIndex&)),
|
||||||
|
|
|
@ -12,9 +12,13 @@ man.path = /share/man/man1/
|
||||||
man.files = transmission-qt.1
|
man.files = transmission-qt.1
|
||||||
|
|
||||||
CONFIG += qt thread debug link_pkgconfig
|
CONFIG += qt thread debug link_pkgconfig
|
||||||
QT += network dbus widgets
|
QT += network dbus
|
||||||
PKGCONFIG = fontconfig libcurl openssl libevent
|
PKGCONFIG = fontconfig libcurl openssl libevent
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
QT += widgets
|
||||||
|
}
|
||||||
|
|
||||||
TRANSMISSION_TOP = ..
|
TRANSMISSION_TOP = ..
|
||||||
|
|
||||||
include(config.pri)
|
include(config.pri)
|
||||||
|
|
Loading…
Add table
Reference in a new issue