Changeset 14163


Ignore:
Timestamp:
Aug 17, 2013, 4:22:56 PM (8 years ago)
Author:
jordan
Message:

(trunk, qt) #5465: restore Qt 4.6 support, patch by mike.did

Location:
trunk/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/README.txt

    r14150 r14163  
    3737BUILDING ON UNIX
    3838
    39    1. Prerequisites: Qt >= 5 and its development packages
     39   1. Prerequisites: Qt >= 4.6 and its development packages
    4040   2. Build Transmission as normal
    41    3. In the qt/ directory, type "qmake qtr.pro" or "qmake-qt5 qtr.pro"
     41   3. In the qt/ directory, type "qmake qtr.pro" (or "qmake-qt4 qtr.pro", or "qmake-qt5 qtr.pro")
    4242   4. In the qt/ directory, type "make"
    4343   5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install"
  • trunk/qt/favicon.cc

    r14150 r14163  
    1515#include <QNetworkReply>
    1616#include <QNetworkRequest>
    17 #include <QStandardPaths>
     17
     18#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     19 #include <QDesktopServices>
     20#else
     21 #include <QStandardPaths>
     22#endif
    1823
    1924#include "favicon.h"
     
    4146Favicons :: getCacheDir( )
    4247{
    43     const QString base = QStandardPaths::writableLocation (QStandardPaths::CacheLocation);
     48    const QString base =
     49#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     50        QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
     51#else
     52        QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
     53#endif
     54
    4455    return QDir( base ).absoluteFilePath( "favicons" );
    4556}
  • trunk/qt/file-tree.cc

    r14150 r14163  
    886886    {
    887887      setColumnHidden (i, (i<FIRST_VISIBLE_COLUMN) || (LAST_VISIBLE_COLUMN<i));
     888
     889#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     890      header()->setResizeMode(i, QHeaderView::Interactive);
     891#else
    888892      header()->setSectionResizeMode(i, QHeaderView::Interactive);
     893#endif
    889894    }
    890895
  • trunk/qt/qtr.pro

    r14150 r14163  
    1313
    1414CONFIG += qt thread debug link_pkgconfig
    15 QT += network dbus widgets
     15QT += network dbus
    1616PKGCONFIG = fontconfig libcurl openssl libevent
     17
     18greaterThan(QT_MAJOR_VERSION, 4) {
     19    QT += widgets
     20}
    1721
    1822TRANSMISSION_TOP = ..
Note: See TracChangeset for help on using the changeset viewer.