Skip to content

Commit fe072c5

Browse files
committedMay 13, 2013
Use QgsMessageBar instead of QMessageBox
1 parent 142223b commit fe072c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/qgisapp.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,14 +2540,14 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS
25402540
else
25412541
{
25422542
QString msg = tr( "%1 doesn't have any layers" ).arg( src );
2543-
QMessageBox::critical( this, tr( "Invalid Data Source" ), msg );
2543+
messageBar()->pushMessage( tr( "Invalid Data Source" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );
25442544
delete layer;
25452545
}
25462546
}
25472547
else
25482548
{
25492549
QString msg = tr( "%1 is not a valid or recognized data source" ).arg( src );
2550-
QMessageBox::critical( this, tr( "Invalid Data Source" ), msg );
2550+
messageBar()->pushMessage( tr( "Invalid Data Source" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );
25512551

25522552
// since the layer is bad, stomp on it
25532553
delete layer;

0 commit comments

Comments
 (0)
Please sign in to comment.