Skip to content

Commit 452f166

Browse files
author
g_j_m
committedJul 17, 2006
Remove lines inside #ifdef QT_VERSION < 0x0400000
git-svn-id: http://svn.osgeo.org/qgis/trunk@5608 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9597bcd commit 452f166

File tree

5 files changed

+3
-80
lines changed

5 files changed

+3
-80
lines changed
 

‎src/core/qgsprojectproperty.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,6 @@ bool QgsPropertyValue::readXML(QDomNode & keyNode)
194194

195195
break;
196196

197-
// qt3to4 changes this to QCoreVariant::Icon, which is then not compilable.
198-
#if QT_VERSION < 0x040000
199-
case QCoreVariant::Icon:
200-
qDebug("qgsproject.cpp:%d add support for QVariant::IconSet", __LINE__);
201-
202-
return false;
203-
204-
break;
205-
#endif
206-
207197
case QVariant::Point:
208198
qDebug("qgsproject.cpp:%d add support for QVariant::Point", __LINE__);
209199

@@ -273,16 +263,6 @@ bool QgsPropertyValue::readXML(QDomNode & keyNode)
273263

274264
break;
275265

276-
// in Qt4 this is equivalent to case QVariant::CString
277-
#if QT_VERSION < 0x040000
278-
case QVariant::ByteArray :
279-
qDebug( "qgsproject.cpp:%d add support for QVariant::ByteArray", __LINE__ );
280-
281-
return false;
282-
283-
break;
284-
#endif
285-
286266
case QVariant::BitArray :
287267
qDebug( "qgsproject.cpp:%d add support for QVariant::BitArray", __LINE__ );
288268

‎src/core/qgssearchstringparser.yy

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

2020
%{
2121
#include <qglobal.h>
22-
#if QT_VERSION < 0x040000
23-
#include <qptrlist.h>
24-
#else
2522
#include <QList>
26-
#endif
2723
#include "qgssearchtreenode.h"
2824

2925
/** returns parsed tree, otherwise returns NULL and sets parserErrorMsg
@@ -44,11 +40,7 @@ QString gParserErrorMsg;
4440
void yyerror(const char* msg);
4541

4642
//! temporary list for nodes without parent (if parsing fails these nodes are removed)
47-
#if QT_VERSION < 0x040000
48-
QPtrList<QgsSearchTreeNode> gTmpNodes;
49-
#else
5043
QList<QgsSearchTreeNode*> gTmpNodes;
51-
#endif
5244
void joinTmpNodes(QgsSearchTreeNode* parent, QgsSearchTreeNode* left, QgsSearchTreeNode* right);
5345
void addToTmpNodes(QgsSearchTreeNode* node);
5446

@@ -135,11 +127,7 @@ scalar_exp:
135127

136128
void addToTmpNodes(QgsSearchTreeNode* node)
137129
{
138-
#if QT_VERSION < 0x040000
139130
gTmpNodes.append(node);
140-
#else
141-
gTmpNodes.append(node);
142-
#endif
143131
}
144132

145133

@@ -149,29 +137,17 @@ void joinTmpNodes(QgsSearchTreeNode* parent, QgsSearchTreeNode* left, QgsSearchT
149137

150138
if (left)
151139
{
152-
#if QT_VERSION < 0x040000
153-
res = gTmpNodes.removeRef(left);
154-
#else
155140
res = gTmpNodes.removeAll(left);
156-
#endif
157141
Q_ASSERT(res);
158142
}
159143

160144
if (right)
161145
{
162-
#if QT_VERSION < 0x040000
163-
res = gTmpNodes.removeRef(right);
164-
#else
165146
res = gTmpNodes.removeAll(right);
166-
#endif
167147
Q_ASSERT(res);
168148
}
169149

170-
#if QT_VERSION < 0x040000
171-
gTmpNodes.append(parent);
172-
#else
173150
gTmpNodes.append(parent);
174-
#endif
175151
}
176152

177153
// returns parsed tree, otherwise returns NULL and sets parserErrorMsg
@@ -187,23 +163,14 @@ QgsSearchTreeNode* parseSearchString(const QString& str, QString& parserErrorMsg
187163
if (res == 0) // success?
188164
{
189165
Q_ASSERT(gTmpNodes.count() == 1);
190-
#if QT_VERSION < 0x040000
191-
return gTmpNodes.take(0);
192-
#else
193166
return gTmpNodes.takeFirst();
194-
#endif
195167
}
196168
else // error?
197169
{
198170
parserErrorMsg = gParserErrorMsg;
199171
// remove nodes without parents - to prevent memory leaks
200-
#if QT_VERSION < 0x040000
201-
while (gTmpNodes.first())
202-
delete gTmpNodes.take();
203-
#else
204172
while (gTmpNodes.size() > 0)
205173
delete gTmpNodes.takeFirst();
206-
#endif
207174
return NULL;
208175
}
209176
}

‎src/gui/qgspastetransformations.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,7 @@ void QgsPasteTransformations::addTransfer(const QString& sourceSelectedFieldName
126126
<< std::endl;
127127
#endif
128128

129-
#if QT_VERSION < 0x040000
130-
int newRow = transferLayout->numRows();
131-
#else
132-
// For some reason Qt4's uic3 only outputs generic names for layout items
133129
int newRow = gridLayout->numRows();
134-
#endif
135130

136131
// TODO: Do not add the transfer if neither the sourceSelectedFieldName nor the destinationSelectedFieldName could be found.
137132

@@ -176,14 +171,8 @@ void QgsPasteTransformations::addTransfer(const QString& sourceSelectedFieldName
176171
}
177172

178173
// Append to dialog layout
179-
#if QT_VERSION < 0x040000
180-
transferLayout->addWidget(newSourceFields, newRow, 0);
181-
transferLayout->addWidget(newDestinationFields, newRow, 1);
182-
#else
183-
// For some reason Qt4's uic3 only outputs generic names for layout items
184174
gridLayout->addWidget(newSourceFields, newRow, 0);
185175
gridLayout->addWidget(newDestinationFields, newRow, 1);
186-
#endif
187176

188177
// Keep a reference to them so that we can read from them
189178
// when the dialog is dismissed

‎src/plugins/gps_importer/qgsgpsplugin.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,8 @@ void QgsGPSPlugin::importGPSFile(QString inputFilename, QgsBabelFormat* importer
267267
NULL, 0, true);
268268
progressDialog.show();
269269
for (int i = 0; babelProcess.isRunning(); ++i) {
270-
#if QT_VERSION < 0x040000
271-
QApplication::eventLoop()->processEvents(0);
272-
#else
273270
QCoreApplication::processEvents();
274-
#endif
271+
275272
progressDialog.setProgress(i/64);
276273
if (progressDialog.wasCanceled())
277274
return;
@@ -344,11 +341,8 @@ void QgsGPSPlugin::downloadFromGPS(QString device, QString port,
344341
NULL, 0, true);
345342
progressDialog.show();
346343
for (int i = 0; babelProcess.isRunning(); ++i) {
347-
#if QT_VERSION < 0x040000
348-
QApplication::eventLoop()->processEvents(0);
349-
#else
350344
QCoreApplication::processEvents();
351-
#endif
345+
352346
progressDialog.setProgress(i/64);
353347
if (progressDialog.wasCanceled())
354348
return;
@@ -429,11 +423,8 @@ void QgsGPSPlugin::uploadToGPS(QgsVectorLayer* gpxLayer, QString device,
429423
NULL, 0, true);
430424
progressDialog.show();
431425
for (int i = 0; babelProcess.isRunning(); ++i) {
432-
#if QT_VERSION < 0x040000
433-
QApplication::eventLoop()->processEvents(0);
434-
#else
435426
QCoreApplication::processEvents();
436-
#endif
427+
437428
progressDialog.setProgress(i/64);
438429
if (progressDialog.wasCanceled())
439430
return;

‎src/providers/mysql/qgsmysqlprovider.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,7 @@ QgsMySQLProvider::getNextFeature_( QgsFeature & feature,
470470
// to
471471
// geometry
472472

473-
#if QT_VERSION < 0x040000
474-
QDataStream s( buffer, QIODevice::WriteOnly ); // open on buffers's data
475-
#else
476473
QDataStream s( &buffer, QIODevice::WriteOnly ); // open on buffers's data
477-
#endif
478474

479475
switch ( endian() )
480476
{

0 commit comments

Comments
 (0)
Please sign in to comment.