Skip to content

Instantly share code, notes, and snippets.

@jef-n
Created March 6, 2015 00:25
Show Gist options
  • Save jef-n/3e558e0b17764ad0fa4e to your computer and use it in GitHub Desktop.
Save jef-n/3e558e0b17764ad0fa4e to your computer and use it in GitHub Desktop.
diff --git a/src/gui/qgscodeeditorpython.cpp b/src/gui/qgscodeeditorpython.cpp
index b234e5e..0b2d885 100644
--- a/src/gui/qgscodeeditorpython.cpp
+++ b/src/gui/qgscodeeditorpython.cpp
@@ -120,7 +120,7 @@ bool QgsCodeEditorPython::loadScript( const QString &script )
{
QgsDebugMsg( QString( "The script file: %1" ).arg( script ) );
QFile file( script );
- if ( !file.open( QIODevice::ReadOnly ) )
+ if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
{
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment