diff --git a/src/common/Session.cpp b/src/common/Session.cpp index 19bee1dee895e229b9b6590d379d50af140a1804..c42130970c86838db144eebaa3deab75596f85ec 100644 --- a/src/common/Session.cpp +++ b/src/common/Session.cpp @@ -307,14 +307,8 @@ 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) -#else - for(QMap<QString, QVariant>::const_iterator it = qmap.begin() ; - it != qmap.end() ; ++ it) -#endif - { + for(QMap<QString, QVariant>::const_iterator it = qmap.constBegin() ; + it != qmap.constEnd() ; ++ it) { 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.);