Skip to content

Commit ac8d4df

Browse files
nyalldawsonjef-n
authored andcommittedJun 14, 2015
Bump minimum Qt version to 4.8
1 parent f261270 commit ac8d4df

13 files changed

+24
-96
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ IF (WITH_QTWEBKIT)
245245
ENDIF(WITH_QTWEBKIT)
246246
#############################################################
247247
# search for Qt4
248-
SET(QT_MIN_VERSION 4.7.0)
248+
SET(QT_MIN_VERSION 4.8.0)
249249
SET (ENABLE_QT5 FALSE CACHE BOOL "If enabled will try to find Qt5 before looking for Qt4")
250250
IF (ENABLE_QT5)
251251
FIND_PACKAGE(Qt5Core QUIET)

‎INSTALL

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Required build tools:
9797

9898
Required build dependencies:
9999

100-
- Qt >= 4.7.0
100+
- Qt >= 4.8.0
101101
- Proj >= 4.4.x
102102
- GEOS >= 3.0
103103
- Sqlite3 >= 3.0.0
@@ -555,23 +555,23 @@ it, just point the installer to c:\msys\mingw
555555

556556
When Qt installation is complete:
557557

558-
Edit C:\Qt\4.7.0\bin\qtvars.bat and add the following lines:
558+
Edit C:\Qt\4.8.0\bin\qtvars.bat and add the following lines:
559559

560560
set PATH=%PATH%;C:\msys\local\bin;c:\msys\local\lib
561561
set PATH=%PATH%;"C:\Program Files\Subversion\bin"
562562

563-
I suggest you also add C:\Qt\4.7.0\bin\ to your Environment Variables Path in
563+
I suggest you also add C:\Qt\4.8.0\bin\ to your Environment Variables Path in
564564
the windows system preferences.
565565

566566
If you plan to do some debugging, you'll need to compile debug version of Qt:
567-
C:\Qt\4.7.0\bin\qtvars.bat compile_debug
567+
C:\Qt\4.8.0\bin\qtvars.bat compile_debug
568568

569-
Note: there is a problem when compiling debug version of Qt 4.7, the script ends with
569+
Note: there is a problem when compiling debug version of Qt 4.8, the script ends with
570570
this message "mingw32-make: *** No rule to make target `debug'. Stop.". To
571571
compile the debug version you have to go out of src directory and execute the
572572
following command:
573573

574-
c:\Qt\4.7.0 make
574+
c:\Qt\4.8.0 make
575575

576576

577577
4.2.3. Flex and Bison
@@ -611,7 +611,7 @@ to get versions that match your current Qt installed version.
611611
4.2.4.3. Compile SIP
612612
====================
613613

614-
c:\Qt\4.7.0\bin\qtvars.bat
614+
c:\Qt\4.8.0\bin\qtvars.bat
615615
python configure.py -p win32-g++
616616
make
617617
make install
@@ -620,7 +620,7 @@ to get versions that match your current Qt installed version.
620620
4.2.4.4. Compile PyQt
621621
=====================
622622

623-
c:\Qt\4.7.0\bin\qtvars.bat
623+
c:\Qt\4.8.0\bin\qtvars.bat
624624
python configure.py
625625
make
626626
make install
@@ -673,9 +673,9 @@ this document.
673673
Start a cmd.exe window ( Start -> Run -> cmd.exe ) if you don't have one
674674
already. Add paths to compiler and our MSYS environment:
675675

676-
c:\Qt\4.7.0\bin\qtvars.bat
676+
c:\Qt\4.8.0\bin\qtvars.bat
677677

678-
For ease of use add c:\Qt\4.7.0\bin\ to your system path in system
678+
For ease of use add c:\Qt\4.8.0\bin\ to your system path in system
679679
properties so you can just type qtvars.bat when you open the cmd console.
680680
Create build directory and set it as current directory:
681681

@@ -1036,7 +1036,7 @@ Snow Leopard+ note: If you are building on Snow Leopard+, you will need to
10361036
decide between 32-bit support in the older Qt Carbon branch, or 64-bit
10371037
support in the Qt Cocoa branch. Appropriate installers are available for both
10381038
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
1039-
Qt 4.6+ is recommended for Cocoa.
1039+
10401040
Starting with Lion, Carbon may not work properly, if at all.
10411041
Starting with Qt 4.8, only 64bit Cocoa installers are available.
10421042

‎doc/INSTALL.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ <H1>2. Overview</H1>
204204
</P>
205205

206206
<UL>
207-
<LI>Qt &gt;= 4.7.0
207+
<LI>Qt &gt;= 4.8.0
208208
<LI>Proj &gt;= 4.4.x
209209
<LI>GEOS &gt;= 3.0
210210
<LI>Sqlite3 &gt;= 3.0.0
@@ -836,7 +836,7 @@ <H3>4.2.2. Qt</H3>
836836
When Qt installation is complete:
837837
</P>
838838
<P>
839-
Edit C:\Qt\4.7.0\bin\qtvars.bat and add the following lines:
839+
Edit C:\Qt\4.8.0\bin\qtvars.bat and add the following lines:
840840
</P>
841841

842842
<div class="code"><PRE>
@@ -845,22 +845,22 @@ <H3>4.2.2. Qt</H3>
845845
</PRE></div>
846846

847847
<P>
848-
I suggest you also add C:\Qt\4.7.0\bin\ to your Environment Variables Path in
848+
I suggest you also add C:\Qt\4.8.0\bin\ to your Environment Variables Path in
849849
the windows system preferences.
850850
</P>
851851
<P>
852852
If you plan to do some debugging, you'll need to compile debug version of Qt:
853-
C:\Qt\4.7.0\bin\qtvars.bat compile_debug
853+
C:\Qt\4.8.0\bin\qtvars.bat compile_debug
854854
</P>
855855
<P>
856-
Note: there is a problem when compiling debug version of Qt 4.7, the script ends with
856+
Note: there is a problem when compiling debug version of Qt 4.8, the script ends with
857857
this message "mingw32-make: *** No rule to make target `debug'. Stop.". To
858858
compile the debug version you have to go out of src directory and execute the
859859
following command:
860860
</P>
861861

862862
<div class="code"><PRE>
863-
c:\Qt\4.7.0 make
863+
c:\Qt\4.8.0 make
864864
</PRE></div>
865865

866866
<H3>4.2.3. Flex and Bison</H3>
@@ -902,7 +902,7 @@ <H4>4.2.4.2. Download SIP and PyQt4 sources</H4>
902902
<H4>4.2.4.3. Compile SIP</H4>
903903

904904
<div class="code"><PRE>
905-
c:\Qt\4.7.0\bin\qtvars.bat
905+
c:\Qt\4.8.0\bin\qtvars.bat
906906
python configure.py -p win32-g++
907907
make
908908
make install
@@ -911,7 +911,7 @@ <H4>4.2.4.3. Compile SIP</H4>
911911
<H4>4.2.4.4. Compile PyQt</H4>
912912

913913
<div class="code"><PRE>
914-
c:\Qt\4.7.0\bin\qtvars.bat
914+
c:\Qt\4.8.0\bin\qtvars.bat
915915
python configure.py
916916
make
917917
make install
@@ -975,11 +975,11 @@ <H3>4.2.8. Compiling</H3>
975975
</P>
976976

977977
<div class="code"><PRE>
978-
c:\Qt\4.7.0\bin\qtvars.bat
978+
c:\Qt\4.8.0\bin\qtvars.bat
979979
</PRE></div>
980980

981981
<P>
982-
For ease of use add c:\Qt\4.7.0\bin\ to your system path in system
982+
For ease of use add c:\Qt\4.8.0\bin\ to your system path in system
983983
properties so you can just type qtvars.bat when you open the cmd console.
984984
Create build directory and set it as current directory:
985985
</P>
@@ -1443,7 +1443,7 @@ <H2>5.2. Install Qt4 from disk image</H2>
14431443
decide between 32-bit support in the older Qt Carbon branch, or 64-bit
14441444
support in the Qt Cocoa branch. Appropriate installers are available for both
14451445
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
1446-
Qt 4.6+ is recommended for Cocoa.
1446+
14471447
Starting with Lion, Carbon may not work properly, if at all.
14481448
Starting with Qt 4.8, only 64bit Cocoa installers are available.
14491449
</P>

‎doc/overview.t2t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Required build tools:
1515

1616
Required build dependencies:
1717

18-
- Qt >= 4.7.0
18+
- Qt >= 4.8.0
1919
- Proj >= 4.4.x
2020
- GEOS >= 3.0
2121
- Sqlite3 >= 3.0.0

‎src/app/qgsoptions.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -746,11 +746,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
746746
QStringList myI18nList = i18nList();
747747
foreach ( QString l, myI18nList )
748748
{
749-
#if QT_VERSION >= 0x040800
750749
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), QLocale( l ).nativeLanguageName(), l );
751-
#else
752-
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), l, l );
753-
#endif
754750
}
755751
cboLocale->setCurrentIndex( cboLocale->findData( myUserLocale ) );
756752
bool myLocaleOverrideFlag = settings.value( "locale/overrideFlag", false ).toBool();

‎src/core/qgsnetworkaccessmanager.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
322322
}
323323
}
324324

325-
#if QT_VERSION >= 0x40500
326325
setFallbackProxyAndExcludes( proxy, excludes );
327326

328327
QNetworkDiskCache *newcache = qobject_cast<QNetworkDiskCache*>( cache() );
@@ -340,8 +339,5 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
340339

341340
if ( cache() != newcache )
342341
setCache( newcache );
343-
#else
344-
setProxy( proxy );
345-
#endif
346342
}
347343

‎src/core/qgspallabeling.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,9 +2070,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
20702070
geometries.append( lbl );
20712071

20722072
// store the label's calculated font for later use during painting
2073-
#if QT_VERSION >= 0x040800
20742073
QgsDebugMsgLevel( QString( "PAL font stored definedFont: %1, Style: %2" ).arg( labelFont.toString() ).arg( labelFont.styleName() ), 4 );
2075-
#endif
20762074
lbl->setDefinedFont( labelFont );
20772075

20782076
// set repeat distance
@@ -4185,11 +4183,8 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
41854183

41864184
//font
41874185
QFont dFont = palGeometry->definedFont();
4188-
// following debug is >= Qt 4.8 only ( because of QFont::styleName() )
4189-
#if QT_VERSION >= 0x040800
41904186
QgsDebugMsgLevel( QString( "PAL font tmpLyr: %1, Style: %2" ).arg( tmpLyr.textFont.toString() ).arg( QFontInfo( tmpLyr.textFont ).styleName() ), 4 );
41914187
QgsDebugMsgLevel( QString( "PAL font definedFont: %1, Style: %2" ).arg( dFont.toString() ).arg( dFont.styleName() ), 4 );
4192-
#endif
41934188
tmpLyr.textFont = dFont;
41944189

41954190
if ( tmpLyr.multilineAlign == QgsPalLayerSettings::MultiFollowPlacement )

‎src/gui/raster/qwt5_histogram_item.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,7 @@ void HistogramItem::drawBar( QPainter *painter,
258258
{
259259
painter->save();
260260

261-
#if QT_VERSION >= 0x040000
262261
const QRect r = rect.normalized();
263-
#else
264-
const QRect r = rect.normalize();
265-
#endif
266-
267262
painter->setBrush( d_data->color );
268263

269264
if ( d_data->flat )
@@ -286,50 +281,26 @@ void HistogramItem::drawBar( QPainter *painter,
286281
painter->setBrush( Qt::NoBrush );
287282

288283
painter->setPen( QPen( light, 2 ) );
289-
#if QT_VERSION >= 0x040000
290284
QwtPainter::drawLine( painter,
291285
r.left() + 1, r.top() + 2, r.right() + 1, r.top() + 2 );
292-
#else
293-
QwtPainter::drawLine( painter,
294-
r.left(), r.top() + 2, r.right() + 1, r.top() + 2 );
295-
#endif
296286

297287
painter->setPen( QPen( dark, 2 ) );
298-
#if QT_VERSION >= 0x040000
299288
QwtPainter::drawLine( painter,
300289
r.left() + 1, r.bottom(), r.right() + 1, r.bottom() );
301-
#else
302-
QwtPainter::drawLine( painter,
303-
r.left(), r.bottom(), r.right() + 1, r.bottom() );
304-
#endif
305290

306291
painter->setPen( QPen( light, 1 ) );
307292

308-
#if QT_VERSION >= 0x040000
309293
QwtPainter::drawLine( painter,
310294
r.left(), r.top() + 1, r.left(), r.bottom() );
311295
QwtPainter::drawLine( painter,
312296
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom() - 1 );
313-
#else
314-
QwtPainter::drawLine( painter,
315-
r.left(), r.top() + 1, r.left(), r.bottom() + 1 );
316-
QwtPainter::drawLine( painter,
317-
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom() );
318-
#endif
319297

320298
painter->setPen( QPen( dark, 1 ) );
321299

322-
#if QT_VERSION >= 0x040000
323300
QwtPainter::drawLine( painter,
324301
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom() );
325302
QwtPainter::drawLine( painter,
326303
r.right(), r.top() + 2, r.right(), r.bottom() - 1 );
327-
#else
328-
QwtPainter::drawLine( painter,
329-
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom() + 1 );
330-
QwtPainter::drawLine( painter,
331-
r.right(), r.top() + 2, r.right(), r.bottom() );
332-
#endif
333304
}
334305

335306
painter->restore();
@@ -350,11 +321,7 @@ void HistogramItem::updateLegend( QwtLegend *legend ) const
350321

351322
QwtLegendItem *legendItem = ( QwtLegendItem * )widget;
352323

353-
#if QT_VERSION < 0x040000
354-
const bool doUpdate = legendItem->isUpdatesEnabled();
355-
#else
356324
const bool doUpdate = legendItem->updatesEnabled();
357-
#endif
358325
legendItem->setUpdatesEnabled( false );
359326

360327
const int policy = legend->displayPolicy();

‎tests/src/core/testqgsexpression.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
#include <qgsgeometry.h>
2727
#include <qgsrenderchecker.h>
2828

29-
#if QT_VERSION < 0x40701
30-
// See http://hub.qgis.org/issues/4284
31-
Q_DECLARE_METATYPE( QVariant )
32-
#endif
33-
3429
static void _parseAndEvalExpr( int arg )
3530
{
3631
Q_UNUSED( arg );

‎tests/src/core/testqgsrulebasedrenderer.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
#include <qgssymbolv2.h>
2323
#include <qgsvectorlayer.h>
2424

25-
#if QT_VERSION < 0x40701
26-
// See http://hub.qgis.org/issues/4284
27-
Q_DECLARE_METATYPE( QVariant )
28-
#endif
29-
3025
typedef QgsRuleBasedRendererV2::Rule RRule;
3126

3227
class TestQgsRuleBasedRenderer: public QObject

‎tests/src/core/testqgsscaleexpression.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919

2020
#include <qgsscaleexpression.h>
2121

22-
#if QT_VERSION < 0x40701
23-
// See http://hub.qgis.org/issues/4284
24-
Q_DECLARE_METATYPE( QVariant )
25-
#endif
26-
2722
class TestQgsScaleExpression: public QObject
2823
{
2924
Q_OBJECT

‎tests/src/core/testqgsspatialindex.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
#include <qgsvectordataprovider.h>
2424
#include <qgsvectorlayer.h>
2525

26-
27-
#if QT_VERSION < 0x40701
28-
// See http://hub.qgis.org/issues/4284
29-
Q_DECLARE_METATYPE( QVariant )
30-
#endif
31-
3226
static QgsFeature _pointFeature( QgsFeatureId id, qreal x, qreal y )
3327
{
3428
QgsFeature f( id );

‎tests/src/core/testqgsvectordataprovider.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
#include <qgsvectordataprovider.h>
2323
#include <qgsvectorlayer.h>
2424

25-
#if QT_VERSION < 0x40701
26-
// See http://hub.qgis.org/issues/4284
27-
Q_DECLARE_METATYPE( QVariant )
28-
#endif
29-
3025
Q_DECLARE_METATYPE( QgsFeatureRequest );
3126

3227
class TestQgsVectorDataProvider : public QObject

0 commit comments

Comments
 (0)
Failed to load comments.