diff --git a/src/common/Session.cpp b/src/common/Session.cpp
index 534cfa19de9c90f57aefdb3859513a92f4951940..19bee1dee895e229b9b6590d379d50af140a1804 100644
--- a/src/common/Session.cpp
+++ b/src/common/Session.cpp
@@ -307,8 +307,14 @@ Palette *Session::get_palette(const std::string &type, const std::string &palett
 
         p = new Palette(string(type+"/"+palette_name));
         *where_from = p;
+#if defined(USE_QT5)
         for(QMap<QString, QVariant>::const_iterator it = qmap.cbegin() ;
-            it != qmap.cend() ; ++ it) {
+            it != qmap.cend() ; ++ it)
+#else
+        for(QMap<QString, QVariant>::const_iterator it = qmap.begin() ;
+            it != qmap.end() ; ++ it)
+#endif
+        {
             const QColor qc = it.value().value<QColor>();
             Color c = Color(qc.red()/255., qc.green()/255., qc.blue()/255.);
             p->add_state(it.key().toStdString(), c, qc.alpha()==255.);
diff --git a/src/render/Shader.cpp b/src/render/Shader.cpp
index 489b05965030c1c4bad5c65c12105b8faa748d5f..630b4eab499b182e333169d8045a7079450be889 100644
--- a/src/render/Shader.cpp
+++ b/src/render/Shader.cpp
@@ -201,7 +201,7 @@ bool Shader::charger()
 }
 
 
-bool Shader::compilerShader(GLuint &shader, GLenum type, const std::string code)
+bool Shader::compilerShader(GLuint &shader, GLenum type, const std::string &code)
 {
     // Create shader
     shader = glCreateShader(type);