Skip to content

Commit

Permalink
Merge pull request #5130 from nyalldawson/deprecated
Browse files Browse the repository at this point in the history
Fix use of some deprecated Qt methods
  • Loading branch information
nyalldawson authored Sep 5, 2017
2 parents 26b9c04 + 1b5fbf9 commit a11e0c6
Show file tree
Hide file tree
Showing 42 changed files with 109 additions and 110 deletions.
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsalignraster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ QgsAlignRaster::RasterInfo::RasterInfo( const QString &layerpath )
( void ) GDALGetGeoTransform( mDataset, mGeoTransform );

// TODO: may be null or empty string
mCrsWkt = QString::fromAscii( GDALGetProjectionRef( mDataset ) );
mCrsWkt = QString::fromLatin1( GDALGetProjectionRef( mDataset ) );

mBandCnt = GDALGetBandNumber( mDataset );
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgsattributeselectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa
//set up models, views and delegates
mColumnModel = new QgsComposerAttributeTableColumnModelV2( mComposerTable, mColumnsTableView );
mColumnsTableView->setModel( mColumnModel );
mColumnsTableView->horizontalHeader()->setResizeMode( QHeaderView::Stretch );
mColumnsTableView->horizontalHeader()->setSectionResizeMode( QHeaderView::Stretch );

mColumnSourceDelegate = new QgsComposerColumnSourceDelegate( vLayer, mColumnsTableView, mComposerTable );
mColumnsTableView->setItemDelegateForColumn( 0, mColumnSourceDelegate );
Expand All @@ -312,7 +312,7 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa
mSortedProxyModel->sort( 0, Qt::AscendingOrder );
mSortColumnTableView->setSortingEnabled( false );
mSortColumnTableView->setModel( mSortedProxyModel );
mSortColumnTableView->horizontalHeader()->setResizeMode( QHeaderView::Stretch );
mSortColumnTableView->horizontalHeader()->setSectionResizeMode( QHeaderView::Stretch );
}

mOrderComboBox->insertItem( 0, tr( "Ascending" ) );
Expand Down
6 changes: 3 additions & 3 deletions src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@ QgsComposer::QgsComposer( QgsComposition *composition )

mItemsTreeView->setColumnWidth( 0, 30 );
mItemsTreeView->setColumnWidth( 1, 30 );
mItemsTreeView->header()->setResizeMode( 0, QHeaderView::Fixed );
mItemsTreeView->header()->setResizeMode( 1, QHeaderView::Fixed );
mItemsTreeView->header()->setMovable( false );
mItemsTreeView->header()->setSectionResizeMode( 0, QHeaderView::Fixed );
mItemsTreeView->header()->setSectionResizeMode( 1, QHeaderView::Fixed );
mItemsTreeView->header()->setSectionsMovable( false );

mItemsTreeView->setDragEnabled( true );
mItemsTreeView->setAcceptDrops( true );
Expand Down
2 changes: 1 addition & 1 deletion src/app/locator/qgslocatoroptionswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QgsLocatorOptionsWidget::QgsLocatorOptionsWidget( QgsLocatorWidget *locator, QWi
mFiltersTreeView->setModel( mModel );

mFiltersTreeView->header()->setStretchLastSection( false );
mFiltersTreeView->header()->setResizeMode( 0, QHeaderView::Stretch );
mFiltersTreeView->header()->setSectionResizeMode( 0, QHeaderView::Stretch );

mConfigureFilterButton->setEnabled( false );
connect( mFiltersTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [ = ]( const QItemSelection & selected, const QItemSelection & )
Expand Down
2 changes: 1 addition & 1 deletion src/app/nodetool/qgsnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ void QgsNodeTool::deleteVertex()
QList<int> &vertexIds = it2.value();

bool res = QgsVectorLayer::Success;
qSort( vertexIds.begin(), vertexIds.end(), qGreater<int>() );
std::sort( vertexIds.begin(), vertexIds.end(), std::greater<int>() );
Q_FOREACH ( int vertexId, vertexIds )
{
if ( res != QgsVectorLayer::EmptyGeometry )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgshandlebadlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void QgsHandleBadLayers::setFilename( int row, const QString &filename )
QUrl uriSource = QUrl::fromEncoded( datasource.toLatin1() );
QUrl uriDest = QUrl::fromLocalFile( filename );
uriDest.setQueryItems( uriSource.queryItems() );
datasource = QString::fromAscii( uriDest.toEncoded() );
datasource = QString::fromLatin1( uriDest.toEncoded() );
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void QgsIdentifyResultsDialog::addFeature( const QgsMapToolIdentify::IdentifyRes
void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeature &f, const QMap<QString, QString> &derivedAttributes )
{
QTreeWidgetItem *layItem = layerItem( vlayer );
lstResults->header()->setResizeMode( QHeaderView::ResizeToContents );
lstResults->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
lstResults->header()->setStretchLastSection( false );

if ( !layItem )
Expand Down
36 changes: 18 additions & 18 deletions src/app/qgsmaptoolannotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent *e )
return;
}

mLastMousePosition = e->posF();
mLastMousePosition = e->pos();

QgsMapCanvasAnnotationItem *item = selectedItem();
if ( item )
{
mCurrentMoveAction = item->moveActionForPosition( e->posF() );
mCurrentMoveAction = item->moveActionForPosition( e->pos() );
if ( mCurrentMoveAction != QgsMapCanvasAnnotationItem::NoAction )
{
return;
Expand All @@ -110,7 +110,7 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent *e )
{
//select a new item if there is one at this position
mCanvas->scene()->clearSelection();
QgsMapCanvasAnnotationItem *existingItem = itemAtPos( e->posF() );
QgsMapCanvasAnnotationItem *existingItem = itemAtPos( e->pos() );
if ( existingItem )
{
existingItem->setSelected( true );
Expand All @@ -124,8 +124,8 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent *e )
QgsPointXY mapPos = transformCanvasToAnnotation( toMapCoordinates( e->pos() ), annotation );
annotation->setMapPosition( mapPos );
annotation->setMapPositionCrs( mCanvas->mapSettings().destinationCrs() );
annotation->setRelativePosition( QPointF( e->posF().x() / mCanvas->width(),
e->posF().y() / mCanvas->height() ) );
annotation->setRelativePosition( QPointF( e->pos().x() / mCanvas->width(),
e->pos().y() / mCanvas->height() ) );
annotation->setFrameSize( QSizeF( 200, 100 ) );

QgsProject::instance()->annotationManager()->addAnnotation( annotation );
Expand Down Expand Up @@ -184,17 +184,17 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent *e )
{
QgsPointXY mapPos = transformCanvasToAnnotation( e->snapPoint(), annotation );
annotation->setMapPosition( mapPos );
annotation->setRelativePosition( QPointF( e->posF().x() / mCanvas->width(),
e->posF().y() / mCanvas->height() ) );
annotation->setRelativePosition( QPointF( e->pos().x() / mCanvas->width(),
e->pos().y() / mCanvas->height() ) );
item->update();
QgsProject::instance()->setDirty( true );
}
else if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::MoveFramePosition )
{
QPointF newCanvasPos = item->pos() + ( e->posF() - mLastMousePosition );
QPointF newCanvasPos = item->pos() + ( e->pos() - mLastMousePosition );
if ( annotation->hasFixedMapPosition() )
{
annotation->setFrameOffsetFromReferencePoint( annotation->frameOffsetFromReferencePoint() + ( e->posF() - mLastMousePosition ) );
annotation->setFrameOffsetFromReferencePoint( annotation->frameOffsetFromReferencePoint() + ( e->pos() - mLastMousePosition ) );
annotation->setRelativePosition( QPointF( newCanvasPos.x() / mCanvas->width(),
newCanvasPos.y() / mCanvas->height() ) );
}
Expand Down Expand Up @@ -223,27 +223,27 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent *e )
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameRightDown ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameRightUp )
{
xmax += e->posF().x() - mLastMousePosition.x();
xmax += e->pos().x() - mLastMousePosition.x();
}
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeft ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftDown ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftUp )
{
xmin += e->posF().x() - mLastMousePosition.x();
relPosX = ( relPosX * mCanvas->width() + e->posF().x() - mLastMousePosition.x() ) / ( double )mCanvas->width();
xmin += e->pos().x() - mLastMousePosition.x();
relPosX = ( relPosX * mCanvas->width() + e->pos().x() - mLastMousePosition.x() ) / ( double )mCanvas->width();
}
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameUp ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftUp ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameRightUp )
{
ymin += e->posF().y() - mLastMousePosition.y();
relPosY = ( relPosY * mCanvas->height() + e->posF().y() - mLastMousePosition.y() ) / ( double )mCanvas->height();
ymin += e->pos().y() - mLastMousePosition.y();
relPosY = ( relPosY * mCanvas->height() + e->pos().y() - mLastMousePosition.y() ) / ( double )mCanvas->height();
}
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameDown ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftDown ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameRightDown )
{
ymax += e->posF().y() - mLastMousePosition.y();
ymax += e->pos().y() - mLastMousePosition.y();
}

//switch min / max if necessary
Expand All @@ -270,18 +270,18 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent *e )
}
else if ( item )
{
QgsMapCanvasAnnotationItem::MouseMoveAction moveAction = item->moveActionForPosition( e->posF() );
QgsMapCanvasAnnotationItem::MouseMoveAction moveAction = item->moveActionForPosition( e->pos() );
if ( mCanvas )
{
mCanvas->setCursor( QCursor( item->cursorShapeForAction( moveAction ) ) );
}
}
mLastMousePosition = e->posF();
mLastMousePosition = e->pos();
}

void QgsMapToolAnnotation::canvasDoubleClickEvent( QgsMapMouseEvent *e )
{
QgsMapCanvasAnnotationItem *item = itemAtPos( e->posF() );
QgsMapCanvasAnnotationItem *item = itemAtPos( e->pos() );
if ( !item )
{
return;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolannotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class APP_EXPORT QgsMapToolAnnotation: public QgsMapTool
QgsPointXY transformCanvasToAnnotation( QgsPointXY p, QgsAnnotation *annotation ) const;

QgsMapCanvasAnnotationItem::MouseMoveAction mCurrentMoveAction = QgsMapCanvasAnnotationItem::NoAction;
QPointF mLastMousePosition = QPointF( 0, 0 );
QPoint mLastMousePosition = QPoint( 0, 0 );
};

#endif // QGSMAPTOOLANNOTATION_H
6 changes: 3 additions & 3 deletions src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
twIdentifyLayers->setHorizontalHeaderItem( 2, new QTableWidgetItem( tr( "Identifiable" ) ) );
twIdentifyLayers->setHorizontalHeaderItem( 3, new QTableWidgetItem( tr( "Read Only" ) ) );
twIdentifyLayers->setRowCount( mapLayers.size() );
twIdentifyLayers->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
twIdentifyLayers->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );

int i = 0;
for ( QMap<QString, QgsMapLayer *>::const_iterator it = mapLayers.constBegin(); it != mapLayers.constEnd(); ++it, i++ )
Expand Down Expand Up @@ -620,7 +620,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
}
}
twWFSLayers->setRowCount( j );
twWFSLayers->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
twWFSLayers->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );

mWCSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WCSUrl" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
QStringList wcsLayerIdList = QgsProject::instance()->readListEntry( QStringLiteral( "WCSLayers" ), QStringLiteral( "/" ) );
Expand Down Expand Up @@ -659,7 +659,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
}
}
twWCSLayers->setRowCount( j );
twWCSLayers->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
twWCSLayers->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );

// Default Styles
mStyle = QgsStyle::defaultStyle();
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ void QgsRasterLayerProperties::setupTransparencyTable( int nBands )
tableTransparency->setHorizontalHeaderItem( 2, new QTableWidgetItem( tr( "Percent Transparent" ) ) );
}

tableTransparency->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
tableTransparency->horizontalHeader()->setResizeMode( 1, QHeaderView::Stretch );
tableTransparency->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch );
tableTransparency->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::Stretch );
}

void QgsRasterLayerProperties::populateTransparencyTable( QgsRasterRenderer *renderer )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ bool QgsApplication::notify( QObject *receiver, QEvent *event )
}
catch ( std::exception &e )
{
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromAscii( e.what() ) );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromLatin1( e.what() ) );
if ( qApp->thread() == QThread::currentThread() )
QMessageBox::critical( activeWindow(), tr( "Exception" ), e.what() );
}
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsexpressionlexer.ll
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ string "'"{str_char}*"'"
"," { return COMMA; }
{num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; }
{num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromLatin1(yytext) ); return NUMBER_FLOAT; }
{num_int} {
bool ok;
yylval->numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok );
yylval->numberInt = cLocale.toInt( QString::fromLatin1(yytext), &ok );
if( ok )
return NUMBER_INT;
yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext), &ok );
yylval->numberFloat = cLocale.toDouble( QString::fromLatin1(yytext), &ok );
if( ok )
return NUMBER_FLOAT;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsexpressionsorter.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class QgsExpressionSorter

delete expressionContext->popScope();

qSort( indexedFeatures.begin(), indexedFeatures.end(), *this );
std::sort( indexedFeatures.begin(), indexedFeatures.end(), *this );

features.clear();

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, const QgsReadWr

QUrl urlDest = QUrl::fromLocalFile( context.pathResolver().readPath( urlSource.toLocalFile() ) );
urlDest.setQueryItems( urlSource.queryItems() );
mDataSource = QString::fromAscii( urlDest.toEncoded() );
mDataSource = QString::fromLatin1( urlDest.toEncoded() );
}
else if ( provider == QLatin1String( "wms" ) )
{
Expand Down Expand Up @@ -621,7 +621,7 @@ bool QgsMapLayer::writeLayerXml( QDomElement &layerElement, QDomDocument &docume
QUrl urlSource = QUrl::fromEncoded( src.toLatin1() );
QUrl urlDest = QUrl::fromLocalFile( context.pathResolver().writePath( urlSource.toLocalFile() ) );
urlDest.setQueryItems( urlSource.queryItems() );
src = QString::fromAscii( urlDest.toEncoded() );
src = QString::fromLatin1( urlDest.toEncoded() );
}
else if ( vlayer && vlayer->providerType() == QLatin1String( "memory" ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprenderercustompainterjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void QgsMapRendererCustomPainterJob::staticRender( QgsMapRendererCustomPainterJo
catch ( std::exception &e )
{
Q_UNUSED( e );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromAscii( e.what() ) );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromLatin1( e.what() ) );
}
catch ( ... )
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsmaprendererparalleljob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void QgsMapRendererParallelJob::renderLayerStatic( LayerRenderJob &job )
catch ( std::exception &e )
{
Q_UNUSED( e );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromAscii( e.what() ) );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromLatin1( e.what() ) );
}
catch ( ... )
{
Expand Down Expand Up @@ -307,7 +307,7 @@ void QgsMapRendererParallelJob::renderLabelsStatic( QgsMapRendererParallelJob *s
catch ( std::exception &e )
{
Q_UNUSED( e );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromAscii( e.what() ) );
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromLatin1( e.what() ) );
}
catch ( ... )
{
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgssqlstatementlexer.ll
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,18 @@ string "'"{str_char}*"'"
"," { return COMMA; }
{num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; }
{num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromLatin1(yytext) ); return NUMBER_FLOAT; }
{num_int} {
bool ok;
yylval->numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok );
yylval->numberInt = cLocale.toInt( QString::fromLatin1(yytext), &ok );
if( ok )
return NUMBER_INT;
yylval->numberInt64 = cLocale.toLongLong( QString::fromAscii(yytext), &ok );
yylval->numberInt64 = cLocale.toLongLong( QString::fromLatin1(yytext), &ok );
if( ok )
return NUMBER_INT64;
yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext), &ok );
yylval->numberFloat = cLocale.toDouble( QString::fromLatin1(yytext), &ok );
if( ok )
return NUMBER_FLOAT;
Expand Down
5 changes: 2 additions & 3 deletions src/core/qgsstringutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "qgsstringutils.h"
#include <QVector>
#include <QRegExp>
#include <QTextDocument> // for Qt::escape
#include <QStringList>
#include <QTextBoundaryFinder>

Expand Down Expand Up @@ -362,7 +361,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
{
protoUrl.prepend( "http://" );
}
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( Qt::escape( protoUrl ), Qt::escape( url ) );
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( protoUrl.toHtmlEscaped(), url.toHtmlEscaped() );
converted.replace( urlRegEx.pos( 1 ), url.length(), anchor );
offset = urlRegEx.pos( 1 ) + anchor.length();
}
Expand All @@ -371,7 +370,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
{
found = true;
QString email = emailRegEx.cap( 1 );
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( Qt::escape( email ), Qt::escape( email ) );
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( email.toHtmlEscaped(), email.toHtmlEscaped() );
converted.replace( emailRegEx.pos( 1 ), email.length(), anchor );
offset = emailRegEx.pos( 1 ) + anchor.length();
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/auth/qgsautheditorwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void QgsAuthMethodPlugins::setupTable()
tblAuthPlugins->setColumnWidth( 0, 150 );
tblAuthPlugins->setColumnWidth( 1, 300 );
tblAuthPlugins->setRowCount( QgsAuthManager::instance()->authMethodsKeys().size() );
tblAuthPlugins->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
tblAuthPlugins->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
tblAuthPlugins->setSortingEnabled( true );
tblAuthPlugins->setSelectionBehavior( QAbstractItemView::SelectRows );
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/layout/qgslayoutruler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void QgsLayoutRuler::setCursorPosition( QPointF position )

void QgsLayoutRuler::mouseMoveEvent( QMouseEvent *event )
{
mMarkerPos = event->posF();
mMarkerPos = event->pos();
update();

QPointF displayPos;
Expand Down Expand Up @@ -651,7 +651,7 @@ void QgsLayoutRuler::mouseMoveEvent( QMouseEvent *event )
}

//update cursor position in status bar
displayPos = mTransform.inverted().map( event->posF() );
displayPos = mTransform.inverted().map( event->pos() );
switch ( mOrientation )
{
case Qt::Horizontal:
Expand Down
Loading

0 comments on commit a11e0c6

Please sign in to comment.