Skip to content

Commit d70f53c

Browse files
authoredJul 18, 2017
Merge pull request #4876 from nyalldawson/upstream_ftw
Upstream some sourcepole fork commits
2 parents 9bae832 + 514e430 commit d70f53c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
 

‎src/app/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ int main( int argc, char *argv[] )
10341034
}
10351035
else
10361036
{
1037-
qWarning( "loading of qgis translation failed [%s]", QStringLiteral( "%1/qgis_%2" ).arg( i18nPath, myTranslationCode ).toLocal8Bit().constData() );
1037+
QgsDebugMsg( QStringLiteral( "loading of qgis translation failed %1/qgis_%2" ).arg( i18nPath, myTranslationCode ) );
10381038
}
10391039

10401040
/* Translation file for Qt.
@@ -1048,7 +1048,7 @@ int main( int argc, char *argv[] )
10481048
}
10491049
else
10501050
{
1051-
qWarning( "loading of qt translation failed [%s]", QStringLiteral( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ).toLocal8Bit().constData() );
1051+
QgsDebugMsg( QStringLiteral( "loading of qt translation failed %1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ) );
10521052
}
10531053
}
10541054

‎src/gui/qgsmapcanvas.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ QgsMapCanvas::QgsMapCanvas( QWidget *parent )
133133
mResizeTimer->setSingleShot( true );
134134
connect( mResizeTimer, &QTimer::timeout, this, &QgsMapCanvas::refresh );
135135

136+
mRefreshTimer = new QTimer( this );
137+
mRefreshTimer->setSingleShot( true );
138+
connect( mRefreshTimer, &QTimer::timeout, this, &QgsMapCanvas::refreshMap );
139+
136140
// create map canvas item which will show the map
137141
mMap = new QgsMapCanvasMap( this );
138142

@@ -493,7 +497,7 @@ void QgsMapCanvas::refresh()
493497
QgsDebugMsg( "CANVAS refresh scheduling" );
494498

495499
// schedule a refresh
496-
QTimer::singleShot( 1, this, SLOT( refreshMap() ) );
500+
mRefreshTimer->start( 1 );
497501
} // refresh
498502

499503
void QgsMapCanvas::refreshMap()

‎src/gui/qgsmapcanvas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
814814
QgsMapRendererCache *mCache = nullptr;
815815

816816
QTimer *mResizeTimer = nullptr;
817+
QTimer *mRefreshTimer = nullptr;
817818

818819
QgsPreviewEffect *mPreviewEffect = nullptr;
819820

0 commit comments

Comments
 (0)
Please sign in to comment.