3 changes: 2 additions & 1 deletion python/console/console_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ def runScriptCode(self):
tmpFile = self.createTempFile()
filename = tmpFile

self.parent.pc.shell.runCommand(u"execfile(r'{0}')".format(filename))
self.parent.pc.shell.runCommand(u"execfile(u'{0}'.encode('{1}'))"
.format(filename.replace("\\", "/"), sys.getfilesystemencoding()))

def runSelectedCode(self):
cmd = self.selectedText()
Expand Down
4 changes: 3 additions & 1 deletion python/console/console_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def write(self, m):
self.out.write(m)

self.move_cursor_to_end()
QCoreApplication.processEvents()

if self.style != "_traceback":
QCoreApplication.processEvents()

def move_cursor_to_end(self):
"""Move cursor to end of text"""
Expand Down
1 change: 1 addition & 0 deletions python/plugins/fTools/tools/doRandom.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def accept(self):
self.buttonOk.setEnabled( False )
if self.inShape.currentText() == "":
QMessageBox.information(self, self.tr("Random Selection Tool"), self.tr("No input shapefile specified"))
return
else:
self.progressBar.setValue(10)
inName = self.inShape.currentText()
Expand Down
Binary file modified python/qsci_apis/pyqgis.pap
Binary file not shown.
4 changes: 2 additions & 2 deletions src/gui/qgsmessagebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ QgsMessageBar::QgsMessageBar( QWidget *parent )
mCloseBtn->setToolTip( tr( "Close" ) );
mCloseBtn->setMinimumWidth( 40 );
mCloseBtn->setStyleSheet(
"QToolButton { background-color: rgba(0, 0, 0, 0); } "
"QToolButton::menu-button { background-color: rgba(0, 0, 0, 0); " );
"QToolButton { background-color: rgba(0, 0, 0, 0); }"
"QToolButton::menu-button { background-color: rgba(0, 0, 0, 0); }" );
mCloseBtn->setCursor( Qt::PointingHandCursor );
mCloseBtn->setIcon( QgsApplication::getThemeIcon( "/mIconClose.png" ) );
mCloseBtn->setIconSize( QSize( 18, 18 ) );
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/spatialquery/qgsspatialqueryplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "qgisinterface.h"
#include "qgsapplication.h"
#include "qgsmaplayerregistry.h"
#include "qgsmessagebar.h"

//
// Required plugin includes
Expand Down Expand Up @@ -111,7 +112,7 @@ void QgsSpatialQueryPlugin::run()
QString msg;
if ( ! QgsSpatialQueryDialog::hasPossibleQuery( msg ) )
{
QMessageBox::warning( mIface->mainWindow(), tr( "Query not executed" ), msg, QMessageBox::Ok );
mIface->messageBar()->pushMessage( tr( "Query not executed" ), msg, QgsMessageBar::INFO, mIface->messageTimeout() );
return;
}
mDialog = new QgsSpatialQueryDialog( mIface->mainWindow(), mIface );
Expand Down