[QGIS Commit] r13042 - in trunk/qgis/src: app app/composer core gui
plugins/copyright_label plugins/grass
plugins/grass/qtermwidget plugins/quick_print
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Mar 10 17:19:32 EST 2010
Author: jef
Date: 2010-03-10 17:19:31 -0500 (Wed, 10 Mar 2010)
New Revision: 13042
Modified:
trunk/qgis/src/app/composer/qgscomposer.cpp
trunk/qgis/src/app/main.cpp
trunk/qgis/src/app/qgsattributeactiondialog.cpp
trunk/qgis/src/app/qgsquerybuilder.cpp
trunk/qgis/src/app/qgssearchquerybuilder.cpp
trunk/qgis/src/app/qgssearchquerybuilder.h
trunk/qgis/src/app/qgsvectorlayerproperties.cpp
trunk/qgis/src/core/qgshttptransaction.cpp
trunk/qgis/src/gui/qgisgui.h
trunk/qgis/src/gui/qgsattributeeditor.cpp
trunk/qgis/src/gui/qgscolorbutton.cpp
trunk/qgis/src/plugins/copyright_label/plugingui.cpp
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grass/qtermwidget/KeyboardTranslator.h
trunk/qgis/src/plugins/quick_print/quickprintgui.cpp
Log:
remove #ifdefs related to no longer supported Qt versions
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -59,11 +59,7 @@
#include <QSettings>
#include <QIcon>
#include <QPixmap>
-#if QT_VERSION < 0x040300
-#include <Q3Picture>
-#else
#include <QSvgGenerator>
-#endif
#include <QToolBar>
#include <QToolButton>
#include <QImageWriter>
@@ -554,16 +550,10 @@
}
else
{
-#if QT_VERSION < 0x040400
- QRectF paperRect( 0, 0, mComposition->paperWidth(), mComposition->paperHeight() );
- QRect pageRect = printer.pageRect();
- mComposition->render( &p, pageRect, paperRect );
-#else
//better in case of custom page size, but only possible with Qt>=4.4.0
QRectF paperRectMM = printer.pageRect( QPrinter::Millimeter );
QRectF paperRectPixel = printer.pageRect( QPrinter::DevicePixel );
mComposition->render( &p, paperRectPixel, paperRectMM );
-#endif
}
mComposition->setPlotStyle( savedPlotStyle );
QApplication::restoreOverrideCursor();
Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/main.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -555,15 +555,8 @@
}
else
{
-#if defined(Q_OS_MACX) && QT_VERSION < 0x040300
- //on mac automasking as done below does not work (as of qt 4.2.1)
- //so we do it the old way see bug #387
- QPixmap myMaskPixmap( mySplashPath + QString( "splash_mask.png" ), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
- mypSplash->setMask( myMaskPixmap.createHeuristicMask() );
-#else
//for win and linux we can just automask and png transparency areas will be used
mypSplash->setMask( myPixmap.mask() );
-#endif
mypSplash->show();
}
Modified: trunk/qgis/src/app/qgsattributeactiondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributeactiondialog.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/qgsattributeactiondialog.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -40,9 +40,7 @@
header->setStretchLastSection( true );
attributeActionTable->setColumnWidth( 0, 100 );
attributeActionTable->setColumnWidth( 1, 230 );
-#if QT_VERSION >= 0x040300
attributeActionTable->setCornerButtonEnabled( false );
-#endif
connect( attributeActionTable, SIGNAL( itemSelectionChanged() ),
this, SLOT( itemSelectionChanged() ) );
@@ -271,16 +269,6 @@
QList<QTableWidgetItem *> selection = attributeActionTable->selectedItems();
if ( !selection.isEmpty() )
{
-#if QT_VERSION < 0x040400
- // Supress multiple selection and select row where mouse release occurs.
- // Workaround for Qt 4.3 bug which allows multiple rows to be selected if
- // the user presses the mouse in one row header and releases in another.
- if ( attributeActionTable->row( selection.first() ) != attributeActionTable->row( selection.last() ) )
- {
- attributeActionTable->selectRow( attributeActionTable->currentRow() );
- selection = attributeActionTable->selectedItems();
- }
-#endif
rowSelected( attributeActionTable->row( selection.first() ) );
}
}
Modified: trunk/qgis/src/app/qgsquerybuilder.cpp
===================================================================
--- trunk/qgis/src/app/qgsquerybuilder.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/qgsquerybuilder.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -23,11 +23,6 @@
#include "qgsvectorlayer.h"
#include "qgsvectordataprovider.h"
-#if QT_VERSION < 0x040300
-#define toPlainText() text()
-#endif
-
-
// constructor used when the query builder must make its own
// connection to the database
QgsQueryBuilder::QgsQueryBuilder( QgsVectorLayer *layer,
Modified: trunk/qgis/src/app/qgssearchquerybuilder.cpp
===================================================================
--- trunk/qgis/src/app/qgssearchquerybuilder.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/qgssearchquerybuilder.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -26,11 +26,6 @@
#include "qgsvectorlayer.h"
#include "qgslogger.h"
-#if QT_VERSION < 0x040300
-#define toPlainText() text()
-#endif
-
-
QgsSearchQueryBuilder::QgsSearchQueryBuilder( QgsVectorLayer* layer,
QWidget *parent, Qt::WFlags fl )
: QDialog( parent, fl ), mLayer( layer )
@@ -49,9 +44,9 @@
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnClear_clicked() ) );
// disable unsupported operators
- btnIn->setEnabled( false );
- btnNotIn->setEnabled( false );
- btnPct->setEnabled( false );
+ btnIn->setHidden( true );
+ btnNotIn->setHidden( true );
+ btnPct->setHidden( true );
// change to ~
btnILike->setText( "~" );
@@ -264,21 +259,6 @@
txtSQL->insertPlainText( " > " );
}
-void QgsSearchQueryBuilder::on_btnPct_clicked()
-{
- txtSQL->insertPlainText( " % " );
-}
-
-void QgsSearchQueryBuilder::on_btnIn_clicked()
-{
- txtSQL->insertPlainText( " IN " );
-}
-
-void QgsSearchQueryBuilder::on_btnNotIn_clicked()
-{
- txtSQL->insertPlainText( " NOT IN " );
-}
-
void QgsSearchQueryBuilder::on_btnLike_clicked()
{
txtSQL->insertPlainText( " LIKE " );
Modified: trunk/qgis/src/app/qgssearchquerybuilder.h
===================================================================
--- trunk/qgis/src/app/qgssearchquerybuilder.h 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/qgssearchquerybuilder.h 2010-03-10 22:19:31 UTC (rev 13042)
@@ -55,9 +55,6 @@
void on_btnOk_clicked();
void on_btnLessThan_clicked();
void on_btnGreaterThan_clicked();
- void on_btnPct_clicked();
- void on_btnIn_clicked();
- void on_btnNotIn_clicked();
void on_btnLike_clicked();
void on_btnILike_clicked();
Modified: trunk/qgis/src/app/qgsvectorlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -59,11 +59,7 @@
#include "qgsstylev2.h"
#include "qgssymbologyv2conversion.h"
-#if QT_VERSION < 0x040300
-#define toPlainText() text()
-#endif
-
QgsVectorLayerProperties::QgsVectorLayerProperties(
QgsVectorLayer *lyr,
QWidget * parent,
Modified: trunk/qgis/src/core/qgshttptransaction.cpp
===================================================================
--- trunk/qgis/src/core/qgshttptransaction.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/core/qgshttptransaction.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -532,7 +532,6 @@
{
proxyType = QNetworkProxy::HttpProxy;
}
-#if QT_VERSION >= 0x040400
else if ( proxyTypeString == "HttpCachingProxy" )
{
proxyType = QNetworkProxy::HttpCachingProxy;
@@ -541,7 +540,6 @@
{
proxyType = QNetworkProxy::FtpCachingProxy;
}
-#endif
http.setProxy( QNetworkProxy( proxyType, proxyHost, proxyPort, proxyUser, proxyPassword ) );
return true;
}
Modified: trunk/qgis/src/gui/qgisgui.h
===================================================================
--- trunk/qgis/src/gui/qgisgui.h 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/gui/qgisgui.h 2010-03-10 22:19:31 UTC (rev 13042)
@@ -44,12 +44,7 @@
* Qt::WindowMaximizeButtonHint is included but will be ignored if
* the dialog is a fixed size and does not have a size grip.
*/
- static const Qt::WFlags ModalDialogFlags =
-#if QT_VERSION < 0x040200
- Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMaximizeButtonHint;
-#else
- 0;
-#endif
+ static const Qt::WFlags ModalDialogFlags = 0;
/**
Open files, preferring to have the default file selector be the
Modified: trunk/qgis/src/gui/qgsattributeeditor.cpp
===================================================================
--- trunk/qgis/src/gui/qgsattributeeditor.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/gui/qgsattributeeditor.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -32,10 +32,7 @@
#include <QSpinBox>
#include <QCompleter>
#include <QHBoxLayout>
-
-#if QT_VERSION >= 0x040400
#include <QPlainTextEdit>
-#endif
void QgsAttributeEditor::selectFileName( void )
{
@@ -274,26 +271,17 @@
{
QLineEdit *le = NULL;
QTextEdit *te = NULL;
-#if QT_VERSION >= 0x040400
QPlainTextEdit *pte = NULL;
-#endif
if ( editor )
{
le = qobject_cast<QLineEdit *>( editor );
te = qobject_cast<QTextEdit *>( editor );
-#if QT_VERSION >= 0x040400
pte = qobject_cast<QPlainTextEdit *>( editor );
-#endif
}
else if ( editType == QgsVectorLayer::TextEdit )
{
-#if QT_VERSION >= 0x040400
pte = new QPlainTextEdit( parent );
-#else
- te = new QTextEdit( parent );
- te->setAcceptRichText( false );
-#endif
}
else
{
@@ -331,18 +319,14 @@
if ( te )
{
-#if QT_VERSION >= 0x040400
te->setAcceptRichText( true );
-#endif
myWidget = te;
}
-#if QT_VERSION >= 0x040400
if ( pte )
{
myWidget = pte;
}
-#endif
}
break;
@@ -424,11 +408,7 @@
QTextEdit *te = qobject_cast<QTextEdit *>( widget );
if ( te )
{
-#if QT_VERSION >= 0x040400
text = te->toHtml();
-#else
- text = te->toPlainText();
-#endif
modified = te->document()->isModified();
if ( text == "NULL" )
{
@@ -436,7 +416,6 @@
}
}
-#if QT_VERSION >= 0x040400
QPlainTextEdit *pte = qobject_cast<QPlainTextEdit *>( widget );
if ( pte )
{
@@ -447,7 +426,6 @@
text = QString::null;
}
}
-#endif
QComboBox *cb = qobject_cast<QComboBox *>( widget );
if ( cb )
@@ -614,14 +592,9 @@
{
QLineEdit *le = qobject_cast<QLineEdit *>( editor );
QTextEdit *te = qobject_cast<QTextEdit *>( editor );
-#if QT_VERSION >= 0x040400
QPlainTextEdit *pte = qobject_cast<QPlainTextEdit *>( editor );
if ( !le && !te && !pte )
return false;
-#else
- if ( !le && !te )
- return false;
-#endif
QString text;
if ( value.isNull() )
@@ -634,15 +607,10 @@
if ( le )
le->setText( text );
-#if QT_VERSION >= 0x040400
if ( te )
te->setHtml( text );
if ( pte )
pte->setPlainText( text );
-#else
- if ( te )
- te->setPlainText( text );
-#endif
}
break;
Modified: trunk/qgis/src/gui/qgscolorbutton.cpp
===================================================================
--- trunk/qgis/src/gui/qgscolorbutton.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/gui/qgscolorbutton.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -76,7 +76,7 @@
}
QgsColorButtonV2::QgsColorButtonV2( QString text, QWidget* parent )
- : QPushButton( text, parent )
+ : QPushButton( text, parent )
{
}
@@ -95,11 +95,7 @@
p.setPen( Qt::NoPen );
p.setRenderHint( QPainter::Antialiasing );
p.setBrush( color );
-#if QT_VERSION >= 0x040400
p.drawRoundedRect( rect, 4, 4 );
-#else
- p.drawRect( rect );
-#endif
p.end();
// set this pixmap as icon
Modified: trunk/qgis/src/plugins/copyright_label/plugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/copyright_label/plugingui.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/plugins/copyright_label/plugingui.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -36,11 +36,7 @@
hide();
//close the dialog
emit changeFont( txtCopyrightText->currentFont() );
-#if QT_VERSION < 0x040300
- emit changeLabel( txtCopyrightText->text() );
-#else
emit changeLabel( txtCopyrightText->toPlainText() );
-#endif
emit changeColor( pbnColorChooser->color() );
emit changePlacement( cboPlacement->currentIndex() );
emit enableCopyrightLabel( cboxEnabled->isChecked() );
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -60,15 +60,6 @@
QgsDebugMsg( "QgsGrassNewMapset()" );
setupUi( this );
-#if QT_VERSION < 0x040400
- // this is not done by Qt4.3 uic
- addPage( WizardPage1 );
- addPage( WizardPage2 );
- addPage( WizardPage3 );
- addPage( WizardPage4 );
- addPage( WizardPage5 );
- addPage( WizardPage6 );
-#endif
#ifdef Q_WS_MAC
setWizardStyle( QWizard::ClassicStyle );
#endif
Modified: trunk/qgis/src/plugins/grass/qtermwidget/KeyboardTranslator.h
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/KeyboardTranslator.h 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/plugins/grass/qtermwidget/KeyboardTranslator.h 2010-03-10 22:19:31 UTC (rev 13042)
@@ -53,11 +53,6 @@
# define K_GLOBAL_STATIC_STRUCT_NAME(NAME)
-#if QT_VERSION < 0x040400
-# define Q_BASIC_ATOMIC_INITIALIZER Q_ATOMIC_INIT
-# define testAndSetOrdered testAndSet
-#endif
-
#define K_GLOBAL_STATIC(TYPE, NAME) K_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ())
#define K_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \
Modified: trunk/qgis/src/plugins/quick_print/quickprintgui.cpp
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintgui.cpp 2010-03-10 22:01:22 UTC (rev 13041)
+++ trunk/qgis/src/plugins/quick_print/quickprintgui.cpp 2010-03-10 22:19:31 UTC (rev 13042)
@@ -21,11 +21,6 @@
#include <QSettings>
#include <QPrinter>
-#if QT_VERSION < 0x040300
-#define toPlainText() text()
-#endif
-
-
//standard includes
QuickPrintGui::QuickPrintGui( QgsMapCanvas * thepMapCanvas,
More information about the QGIS-commit
mailing list