diff --git a/python/console/console.py b/python/console/console.py
index 44484a0..61636aa 100644
--- a/python/console/console.py
+++ b/python/console/console.py
@@ -547,7 +547,7 @@ class PythonConsoleWidget(QWidget):
 
     def openScriptFile(self):
         settings = QSettings()
-        lastDirPath = settings.value("pythonConsole/lastDirPath").toString()
+        lastDirPath = settings.value("pythonConsole/lastDirPath")
         filename = QFileDialog.getOpenFileName(
                         self, "Open File", lastDirPath, "Script file (*.py)")
         if not filename.isEmpty():
@@ -561,7 +561,7 @@ class PythonConsoleWidget(QWidget):
                 self.tabEditorWidget.newTabEditor(tabName, filename)
 
         lastDirPath = QFileInfo(filename).path()
-        settings.setValue("pythonConsole/lastDirPath", QVariant(filename))
+        settings.setValue("pythonConsole/lastDirPath", filename)
         self.tabListScript.append(filename)
         self.updateTabListScript(script=None)
 
diff --git a/python/console/console_help.py b/python/console/console_help.py
index 93f677c..99ac1bc 100644
--- a/python/console/console_help.py
+++ b/python/console/console_help.py
@@ -39,7 +39,7 @@ class HelpDialog(QDialog, Ui_Help):
 
         qgisDataDir = QgsApplication.pkgDataPath()
         listFile = os.listdir(qgisDataDir + "/python/console/console_help/i18n")
-        localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
+        localeFullName = QSettings().value( "locale/userLocale", "" )
         locale = "en_US"
         for i in listFile:
             lang = i[0:5]
diff --git a/python/console/console_output.py b/python/console/console_output.py
index a8bdd7e..79c89e4 100644
--- a/python/console/console_output.py
+++ b/python/console/console_output.py
@@ -138,8 +138,8 @@ class ShellOutputScintilla(QsciScintilla):
         self.lexer = QsciLexerPython()
 
         settings = QSettings()
-        loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
-        fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]
+        loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace")
+        fontSize = settings.value("pythonConsole/fontsize", 10)
         font = QFont(loadFont)
         font.setFixedPitch(True)
         font.setPointSize(fontSize)
diff --git a/python/console/console_sci.py b/python/console/console_sci.py
index 0bb0d9c..97bac27 100644
--- a/python/console/console_sci.py
+++ b/python/console/console_sci.py
@@ -59,7 +59,7 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
         for line in _init_commands:
             self.runsource(line)
 
-        self.history = QStringList()
+        self.history = []
         self.historyIndex = 0
         # Read history command file
         self.readHistoryFile()
@@ -109,7 +109,7 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
                      self.completion_list_selected)
 
     def showHistory(self):
-        self.showUserList(1, QStringList(self.history))
+        self.showUserList(1, self.history)
 
     def autoComplete(self):
         self.autoCompleteFromAll()
@@ -137,8 +137,8 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
     def setLexers(self):
         self.lexer = QsciLexerPython()
         settings = QSettings()
-        loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
-        fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]
+        loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace")
+        fontSize = settings.value("pythonConsole/fontsize", 10)
 
         font = QFont(loadFont)
         font.setFixedPitch(True)
@@ -157,13 +157,13 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
         self.lexer.setFont(font, 4)
 
         self.api = QsciAPIs(self.lexer)
-        chekBoxAPI = settings.value("pythonConsole/preloadAPI", True).toBool()
+        chekBoxAPI = settings.value("pythonConsole/preloadAPI", True)
         if chekBoxAPI:
             self.api.loadPrepared( QgsApplication.pkgDataPath() + "/python/qsci_apis/pyqgis_master.pap" )
         else:
-            apiPath = settings.value("pythonConsole/userAPI").toStringList()
+            apiPath = settings.value("pythonConsole/userAPI")
             for i in range(0, len(apiPath)):
-                self.api.load(QString(unicode(apiPath[i])))
+                self.api.load(unicode(apiPath[i]))
             self.api.prepare()
             self.lexer.setAPIs(self.api)
 
@@ -250,7 +250,7 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
         self.move_cursor_to_end()
 
     def updateHistory(self, command):
-        if isinstance(command, QStringList):
+        if isinstance(command, list):
             for line in command:
                 self.history.append(line)
         elif not command == "":
@@ -476,7 +476,7 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
                 self.clearHistoryFile()
                 msgText = QCoreApplication.translate('PythonConsole', 'History cleared successfully.')
             elif cmd == '_clearAll':
-                self.history = QStringList()
+                self.history = []
                 self.clearHistoryFile()
                 msgText = QCoreApplication.translate('PythonConsole', 'Session and file history cleared successfully.')
             elif cmd == '_pyqgis':
diff --git a/python/console/console_settings.py b/python/console/console_settings.py
index c461531..6c5917d 100644
--- a/python/console/console_settings.py
+++ b/python/console/console_settings.py
@@ -70,13 +70,13 @@ class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
 
     def loadAPIFile(self):
         settings = QSettings()
-        lastDirPath = settings.value("pythonConsole/lastDirAPIPath").toString()
+        lastDirPath = settings.value("pythonConsole/lastDirAPIPath")
         fileAPI = QFileDialog.getOpenFileName(
                         self, "Open API File", lastDirPath, "API file (*.api)")
         self.lineEdit.setText(fileAPI)
 
         lastDirPath = QFileInfo(fileAPI).path()
-        settings.setValue("pythonConsole/lastDirAPIPath", QVariant(fileAPI))
+        settings.setValue("pythonConsole/lastDirAPIPath", fileAPI)
 
     def accept(self):
         if not self.preloadAPI.isChecked():
@@ -119,27 +119,27 @@ class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
         #for i in range(0, len(fontFamily)):
             #self.comboBox.addItem(fontFamily[i])
         settings = QSettings()
-        self.fontComboBox.setCurrentIndex(settings.value("pythonConsole/fontfamilyindex").toInt()[0])
+        self.fontComboBox.setCurrentIndex(settings.value("pythonConsole/fontfamilyindex"))
 
     def saveSettings(self):
         settings = QSettings()
-        settings.setValue("pythonConsole/preloadAPI", QVariant(self.preloadAPI.isChecked()))
+        settings.setValue("pythonConsole/preloadAPI", self.preloadAPI.isChecked())
         fontFamilyIndex = self.fontComboBox.currentIndex()
-        settings.setValue("pythonConsole/fontfamilyindex", QVariant(fontFamilyIndex))
+        settings.setValue("pythonConsole/fontfamilyindex", fontFamilyIndex)
         fontFamilyText = self.fontComboBox.currentText()
-        settings.setValue("pythonConsole/fontfamilytext", QVariant(fontFamilyText))
+        settings.setValue("pythonConsole/fontfamilytext", fontFamilyText)
         fontSize = self.spinBox.value()
         for i in range(0, self.tableWidget.rowCount()):
             text = self.tableWidget.item(i, 1).text()
             self.listPath.append(text)
-        settings.setValue("pythonConsole/fontsize", QVariant(fontSize))
-        settings.setValue("pythonConsole/userAPI", QVariant(self.listPath))
+        settings.setValue("pythonConsole/fontsize", fontSize)
+        settings.setValue("pythonConsole/userAPI", self.listPath)
 
     def restoreSettings(self):
         settings = QSettings()
-        self.spinBox.setValue(settings.value("pythonConsole/fontsize").toInt()[0])
-        self.preloadAPI.setChecked(settings.value("pythonConsole/preloadAPI", True).toBool())
-        itemTable = settings.value("pythonConsole/userAPI").toStringList()
+        self.spinBox.setValue(settings.value("pythonConsole/fontsize", 10))
+        self.preloadAPI.setChecked(settings.value("pythonConsole/preloadAPI", True))
+        itemTable = settings.value("pythonConsole/userAPI")
         for i in range(len(itemTable)):
             self.tableWidget.insertRow(i)
             self.tableWidget.setColumnCount(2)
@@ -151,7 +151,7 @@ class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
             self.tableWidget.horizontalHeader().setResizeMode(0, QHeaderView.ResizeToContents)
             self.tableWidget.horizontalHeader().show()
             self.tableWidget.horizontalHeader().setResizeMode(1, QHeaderView.Stretch)
-        #self.comboBox.setCurrentIndex(settings.value("pythonConsole/fontfamilyindex").toInt()[0])
+        #self.comboBox.setCurrentIndex(settings.value("pythonConsole/fontfamilyindex"))
 
     def reject( self ):
         QDialog.reject( self )
diff --git a/python/utils.py b/python/utils.py
index 768ff61..bfffa3b 100755
--- a/python/utils.py
+++ b/python/utils.py
@@ -28,7 +28,7 @@ QGIS utilities module
 
 """
 
-from PyQt4.QtCore import QCoreApplication, QLocale, QString
+from PyQt4.QtCore import QCoreApplication, QLocale
 from qgis.core import QGis, QgsExpression, QgsMessageLog
 from string import Template
 import sys
@@ -182,8 +182,8 @@ def loadPlugin(packageName):
     __import__(packageName)
     return True
   except:
-    msgTemplate = QCoreApplication.translate("Python", "Couldn't load plugin '%1' from ['%2']")
-    msg = msgTemplate.arg(packageName).arg("', '".join(sys.path))
+    msgTemplate = QCoreApplication.translate("Python", "Couldn't load plugin '%s' from ['%s']")
+    msg = msgTemplate % (packageName, "', '".join(sys.path))
     showException(sys.exc_type, sys.exc_value, sys.exc_traceback, msg)
     return False
 
@@ -196,14 +196,14 @@ def startPlugin(packageName):
 
   package = sys.modules[packageName]
 
-  errMsg = QCoreApplication.translate("Python", "Couldn't load plugin %1" ).arg(packageName)
+  errMsg = QCoreApplication.translate("Python", "Couldn't load plugin %s" ) % packageName
 
   # create an instance of the plugin
   try:
     plugins[packageName] = package.classFactory(iface)
   except:
     _unloadPluginModules(packageName)
-    msg = QCoreApplication.translate("Python", "%1 due an error when calling its classFactory() method").arg(errMsg)
+    msg = QCoreApplication.translate("Python", "%s due an error when calling its classFactory() method") % errMsg
     showException(sys.exc_type, sys.exc_value, sys.exc_traceback, msg)
     return False
 
@@ -213,7 +213,7 @@ def startPlugin(packageName):
   except:
     del plugins[packageName]
     _unloadPluginModules(packageName)
-    msg = QCoreApplication.translate("Python", "%1 due an error when calling its initGui() method" ).arg( errMsg )
+    msg = QCoreApplication.translate("Python", "%s due an error when calling its initGui() method" ) % errMsg
     showException(sys.exc_type, sys.exc_value, sys.exc_traceback, msg)
     return False
 
@@ -255,7 +255,7 @@ def unloadPlugin(packageName):
     _unloadPluginModules(packageName)
     return True
   except Exception, e:
-    msg = QCoreApplication.translate("Python", "Error while unloading plugin %1").arg(packageName)
+    msg = QCoreApplication.translate("Python", "Error while unloading plugin %s") % packageName
     showException(sys.exc_type, sys.exc_value, sys.exc_traceback, msg)
     return False
 
@@ -418,7 +418,7 @@ def qgsfunction(args, group, **kwargs):
   helptemplate = Template("""<h3>$name function</h3><br>$doc""")
   class QgsExpressionFunction(QgsExpression.Function):
     def __init__(self, name, args, group, helptext=''):
-      QgsExpression.Function.__init__(self, name, args, group, QString(helptext))
+      QgsExpression.Function.__init__(self, name, args, group, helptext)
 
     def func(self, values, feature, parent):
       pass
diff --git a/src/python/qgspythonutilsimpl.cpp b/src/python/qgspythonutilsimpl.cpp
index 8bee37b..462fcad 100644
--- a/src/python/qgspythonutilsimpl.cpp
+++ b/src/python/qgspythonutilsimpl.cpp
@@ -88,13 +88,26 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
   runString( "sys.path = [" + newpaths.join( "," ) + "] + sys.path" );
 
   // import SIP
-  if ( !runString( "from sip import wrapinstance, unwrapinstance",
+  if ( !runString( "import sip",
                    QObject::tr( "Couldn't load SIP module." ) + "\n" + QObject::tr( "Python support will be disabled." ) ) )
   {
     exitPython();
     return;
   }
 
+  // set PyQt4 api versions
+  QStringList apiV2classes;
+  apiV2classes << "QDate" << "QDateTime" << "QString" << "QTextStream" << "QTime" << "QUrl" << "QVariant";
+  foreach ( const QString& clsName, apiV2classes )
+  {
+    if ( !runString( QString( "sip.setapi('%1', 2)" ).arg( clsName ),
+                     QObject::tr( "Couldn't set SIP API versions.") + "\n" + QObject::tr( "Python support will be disabled." ) ) )
+    {
+      exitPython();
+      return;
+    }
+  }
+
   // import Qt bindings
   if ( !runString( "from PyQt4 import QtCore, QtGui",
                    QObject::tr( "Couldn't load PyQt4." ) + "\n" + QObject::tr( "Python support will be disabled." ) ) )
