Skip to content

Commit 3e5ff1f

Browse files
committed
set minimum Qt version to 4.7 and remove #ifdef code depending on prior versions
1 parent 9cc3c5c commit 3e5ff1f

30 files changed

+30
-175
lines changed

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ SET (HAVE_MSSQL TRUE)
219219

220220
#############################################################
221221
# search for Qt4
222-
SET(QT_MIN_VERSION 4.5.0)
222+
SET(QT_MIN_VERSION 4.7.0)
223223
FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
224224
MESSAGE(STATUS "Found Qt version: ${QTVERSION}")
225225
SET(QT_USE_QTXML 1)
@@ -242,12 +242,8 @@ ELSE (ANDROID)
242242
SET (DEFAULT_WITH_TOUCH FALSE)
243243
ENDIF (ANDROID)
244244

245-
#Add a touch mode if Qt has Qt Gestures (starting from 4.6)
246-
IF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
247-
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")
248-
ELSE ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
249-
SET (WITH_TOUCH FALSE)
250-
ENDIF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
245+
#Add a touch mode if Qt has Qt Gestures
246+
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")
251247

252248
IF (WITH_TOUCH)
253249
# following variable is used in qgsconfig.h

INSTALL

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
QGIS
22
Building QGIS from source - step by step
3-
Thursday November 21, 2013
3+
Saturday November 30, 2013
44

55

6-
Last Updated: Thursday November 21, 2013
7-
Last Change : Thursday November 21, 2013
6+
Last Updated: Saturday November 30, 2013
7+
Last Change : Saturday November 30, 2013
88

99

1010
1. Introduction
@@ -98,7 +98,7 @@ Required build tools:
9898

9999
Required build deps:
100100

101-
- Qt >= 4.5.0
101+
- Qt >= 4.7.0
102102
- Proj >= 4.4.x
103103
- GEOS >= 3.0
104104
- Sqlite3 >= 3.0.0

doc/INSTALL.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>QGIS</TITLE>
77

8-
<!-- Included /home/fischer/src/qgis/doc/style.css -->
8+
<!-- Included /home/fischer/src/qgis/qgis/doc/style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -77,13 +77,13 @@
7777
<DIV CLASS="header" ID="header">
7878
<H1>QGIS</H1>
7979
<H2>Building QGIS from source - step by step</H2>
80-
<H3>Thursday November 21, 2013</H3>
80+
<H3>Saturday November 30, 2013</H3>
8181
</DIV>
8282

8383
<DIV CLASS="body" ID="body">
8484
<P>
85-
Last Updated: Thursday November 21, 2013
86-
Last Change : Thursday November 21, 2013
85+
Last Updated: Saturday November 30, 2013
86+
Last Change : Saturday November 30, 2013
8787
</P>
8888
<DIV CLASS="toc">
8989

@@ -205,7 +205,7 @@ <H1>2. Overview</H1>
205205
</P>
206206

207207
<UL>
208-
<LI>Qt &gt;= 4.5.0
208+
<LI>Qt &gt;= 4.7.0
209209
<LI>Proj &gt;= 4.4.x
210210
<LI>GEOS &gt;= 3.0
211211
<LI>Sqlite3 &gt;= 3.0.0
@@ -3227,5 +3227,5 @@ <H1>9. Authors and Acknowledgments</H1>
32273227

32283228
</DIV>
32293229
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3230-
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/debian/build/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
3230+
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/qgis/debian/build/doc/INSTALL.html -t html /home/fischer/src/qgis/qgis/doc/INSTALL.t2t -->
32313231
</BODY></HTML>

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 deps:
1717

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

src/app/composer/qgscomposer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,9 +1509,7 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
15091509
for ( int i = 0; i < mComposition->numPages(); ++i )
15101510
{
15111511
QSvgGenerator generator;
1512-
#if QT_VERSION >= 0x040500
15131512
generator.setTitle( QgsProject::instance()->title() );
1514-
#endif
15151513
if ( i == 0 )
15161514
{
15171515
generator.setFileName( outputFileName );
@@ -1527,9 +1525,7 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
15271525
//height in pixel
15281526
int height = ( int )( mComposition->paperHeight() * mComposition->printResolution() / 25.4 );
15291527
generator.setSize( QSize( width, height ) );
1530-
#if QT_VERSION >= 0x040500
15311528
generator.setViewBox( QRect( 0, 0, width, height ) );
1532-
#endif
15331529
generator.setResolution( mComposition->printResolution() ); //because the rendering is done in mm, convert the dpi
15341530

15351531
QPainter p( &generator );

src/app/composer/qgscomposerlabelwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void QgsComposerLabelWidget::on_mFontButton_clicked()
8686
if ( mComposerLabel )
8787
{
8888
bool ok;
89-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
89+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
9090
// Native Mac dialog works only for Qt Carbon
9191
QFont newFont = QFontDialog::getFont( &ok, mComposerLabel->font(), 0, QString(), QFontDialog::DontUseNativeDialog );
9292
#else

src/app/composer/qgscomposerlegendwidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void QgsComposerLegendWidget::on_mTitleFontButton_clicked()
373373
if ( mLegend )
374374
{
375375
bool ok;
376-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
376+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
377377
// Native Mac dialog works only for Qt Carbon
378378
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Title ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
379379
#else
@@ -395,7 +395,7 @@ void QgsComposerLegendWidget::on_mGroupFontButton_clicked()
395395
if ( mLegend )
396396
{
397397
bool ok;
398-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
398+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
399399
// Native Mac dialog works only for Qt Carbon
400400
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Group ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
401401
#else
@@ -417,7 +417,7 @@ void QgsComposerLegendWidget::on_mLayerFontButton_clicked()
417417
if ( mLegend )
418418
{
419419
bool ok;
420-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
420+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
421421
// Native Mac dialog works only for Qt Carbon
422422
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Subgroup ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
423423
#else
@@ -439,7 +439,7 @@ void QgsComposerLegendWidget::on_mItemFontButton_clicked()
439439
if ( mLegend )
440440
{
441441
bool ok;
442-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
442+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
443443
// Native Mac dialog works only for Qt Carbon
444444
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::SymbolLabel ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
445445
#else

src/app/composer/qgscomposermapwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ void QgsComposerMapWidget::on_mAnnotationFontButton_clicked()
751751
}
752752

753753
bool ok;
754-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
754+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
755755
// Native Mac dialog works only for Qt Carbon
756756
QFont newFont = QFontDialog::getFont( &ok, mComposerMap->gridAnnotationFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
757757
#else

src/app/composer/qgscomposerscalebarwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void QgsComposerScaleBarWidget::on_mFontButton_clicked()
282282

283283
bool dialogAccepted;
284284
QFont oldFont = mComposerScaleBar->font();
285-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
285+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
286286
// Native Mac dialog works only for Qt Carbon
287287
QFont newFont = QFontDialog::getFont( &dialogAccepted, oldFont, 0, QString(), QFontDialog::DontUseNativeDialog );
288288
#else

src/app/composer/qgscomposertablewidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void QgsComposerTableWidget::on_mHeaderFontPushButton_clicked()
217217
}
218218

219219
bool ok;
220-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
220+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
221221
// Native Mac dialog works only for Qt Carbon
222222
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->headerFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
223223
#else
@@ -239,7 +239,7 @@ void QgsComposerTableWidget::on_mContentFontPushButton_clicked()
239239
}
240240

241241
bool ok;
242-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
242+
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
243243
// Native Mac dialog works only for Qt Carbon
244244
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->contentFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
245245
#else

0 commit comments

Comments
 (0)