Index: src/globals.h
===================================================================
--- src/globals.h	(revision bbac1ebb130412febe406755b04cda6dbffdfa19)
+++ src/globals.h	(revision 2a436ea693ea5c59bf53d0fc77f9bb29924a4b67)
@@ -31,8 +31,14 @@
 // INCLUDES
 #include <QtCore>
+#if QT_VERSION < 0x040500
+	#error You are using Qt version < 4.5 but minimum required version is 4.5.0. Compilation aborted.
+#endif
+#ifdef QT_NO_SVG
+	#define NOSVG
+#endif
 #include <QtGui>
-#if !defined(NOSVG) && (QT_VERSION >= 0x040500)
+#if !defined(NOSVG)
 	#include <QtSvg>
-#endif // NOSVG && QT_VERSION >= 0x040500
+#endif // NOSVG
 
 #if defined(Q_OS_WINCE_WM) || defined(Q_OS_SYMBIAN)
@@ -119,4 +125,10 @@
 #endif // Q_OS_WIN32
 
+#if QT_VERSION >= 0x040600
+	#define GET_ICON(x) QIcon::fromTheme(x, QIcon(":/images/icons/"x".png"))
+#else
+	#define GET_ICON(x) QIcon(":/images/icons/"x".png")
+#endif
+
 // Sanity checks
 // Check that default number of cities is sane (<= MAX_NUM_CITIES)
Index: src/main.cpp
===================================================================
--- src/main.cpp	(revision bbac1ebb130412febe406755b04cda6dbffdfa19)
+++ src/main.cpp	(revision 2a436ea693ea5c59bf53d0fc77f9bb29924a4b67)
@@ -23,11 +23,11 @@
 
 #include "mainwindow.h"
-#if QT_VERSION < 0x040500
-	#ifdef _MSC_VER
-		#pragma message("WARNING: You are using Qt version < 4.5. Application will not support some non-critical features.")
-	#elif (defined(__GNUC__) || defined(__MINGW32__))
-		#warning WARNING: You are using Qt version < 4.5. Application will not support some non-critical features.
+#if QT_VERSION < 0x040600
+	#ifdef Q_CC_MSVC
+		#pragma message("WARNING: You are using Qt version < 4.6. Application will not support some non-critical features.")
+	#elif defined(Q_CC_GNU)
+		#warning WARNING: You are using Qt version < 4.6. Application will not support some non-critical features.
 	#else
-		#error You are using Qt version < 4.5. Application will not support some non-critical features. To continue, please, comment line 31 at main.cpp.
+		#error You are using Qt version < 4.6. Application will not support some non-critical features. To continue, please, comment line 31 at main.cpp.
 	#endif
 #endif
Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision bbac1ebb130412febe406755b04cda6dbffdfa19)
+++ src/mainwindow.cpp	(revision 2a436ea693ea5c59bf53d0fc77f9bb29924a4b67)
@@ -226,7 +226,5 @@
 #endif
 	filters.append(tr("HTML Files") + " (*.html *.htm)");
-#if QT_VERSION >= 0x040500
 	filters.append(tr("OpenDocument Files") + " (*.odt)");
-#endif // QT_VERSION >= 0x040500
 	filters.append(tr("All Files") + " (*)");
 
@@ -258,9 +256,9 @@
 QFileInfo fi(selectedFile);
 QString format = settings->value("Output/GraphImageFormat", DEF_GRAPH_IMAGE_FORMAT).toString();
-#if !defined(NOSVG) && (QT_VERSION >= 0x040500)
+#if !defined(NOSVG)
 	if (!QImageWriter::supportedImageFormats().contains(format.toAscii()) && (format != "svg")) {
-#else // NOSVG && QT_VERSION >= 0x040500
+#else // NOSVG
 	if (!QImageWriter::supportedImageFormats().contains(format.toAscii())) {
-#endif // NOSVG && QT_VERSION >= 0x040500
+#endif // NOSVG
 		format = DEF_GRAPH_IMAGE_FORMAT;
 		settings->remove("Output/GraphImageFormat");
@@ -277,5 +275,5 @@
 
 		// Saving solution graph as SVG or PNG (depending on settings and SVG support)
-#if !defined(NOSVG) && (QT_VERSION >= 0x040500)
+#if !defined(NOSVG)
 		if (format == "svg") {
 QSvgGenerator svg;
@@ -290,5 +288,5 @@
 			p.end();
 		} else {
-#endif // NOSVG && QT_VERSION >= 0x040500
+#endif // NOSVG
 QImage i(graph.width(), graph.height(), QImage::Format_ARGB32);
 			i.fill(0x00FFFFFF);
@@ -311,10 +309,7 @@
 				return;
 			}
-#if !defined(NOSVG) && (QT_VERSION >= 0x040500)
-		}
-#endif // NOSVG && QT_VERSION >= 0x040500
-
-// Qt < 4.5 has no QTextDocumentWriter class
-#if QT_VERSION >= 0x040500
+#if !defined(NOSVG)
+		}
+#endif // NOSVG
 	} else {
 QTextDocumentWriter dw(selectedFile);
@@ -323,5 +318,4 @@
 		if (!dw.write(solutionText->document()))
 			QMessageBox::critical(this, tr("Solution Save"), tr("Unable to save the solution.\nError: %1").arg(dw.device()->errorString()));
-#endif // QT_VERSION >= 0x040500
 	}
 	QApplication::restoreOverrideCursor();
@@ -565,5 +559,5 @@
 
 	bb->button(QDialogButtonBox::Ok)->setCursor(QCursor(Qt::PointingHandCursor));
-	bb->button(QDialogButtonBox::Ok)->setIcon(QIcon::fromTheme("dialog-ok", QIcon(":/images/icons/dialog-ok.png")));
+	bb->button(QDialogButtonBox::Ok)->setIcon(GET_ICON("dialog-ok"));
 
 	hb2->addWidget(bb);
@@ -599,5 +593,5 @@
 	dlg->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
 	dlg->setWindowTitle(tr("About %1").arg(QApplication::applicationName()));
-	dlg->setWindowIcon(QIcon::fromTheme("help-about", QIcon(":/images/icons/help-about.png")));
+	dlg->setWindowIcon(GET_ICON("help-about"));
 	dlg->setLayout(vb);
 
@@ -655,5 +649,5 @@
 	pd.setBar(pb);
 QPushButton *cancel = new QPushButton(&pd);
-	cancel->setIcon(QIcon::fromTheme("dialog-cancel", QIcon(":/images/icons/dialog-cancel.png")));
+	cancel->setIcon(GET_ICON("dialog-cancel"));
 	cancel->setText(QApplication::translate("QProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));
 	pd.setCancelButton(cancel);
@@ -1224,5 +1218,9 @@
 		a = menuSettingsLanguage->addAction(language.at(2));
 		a->setStatusTip(language.at(3));
+#if QT_VERSION >= 0x040600
 		a->setIcon(QIcon::fromTheme(QString("flag-%1").arg(language.at(1)), QIcon(QString(":/images/icons/l10n/flag-%1.png").arg(language.at(1)))));
+#else
+		a->setIcon(QIcon(QString(":/images/icons/l10n/flag-%1.png").arg(language.at(1))));
+#endif
 		a->setData(language.at(0));
 		a->setCheckable(true);
@@ -1479,25 +1477,25 @@
 
 	// File Menu
-	actionFileNew->setIcon(QIcon::fromTheme("document-new", QIcon(":/images/icons/document-new.png")));
-	actionFileOpen->setIcon(QIcon::fromTheme("document-open", QIcon(":/images/icons/document-open.png")));
-	actionFileSave->setIcon(QIcon::fromTheme("document-save", QIcon(":/images/icons/document-save.png")));
-	menuFileSaveAs->setIcon(QIcon::fromTheme("document-save-as", QIcon(":/images/icons/document-save-as.png")));
-	actionFileExit->setIcon(QIcon::fromTheme("application-exit", QIcon(":/images/icons/application-exit.png")));
+	actionFileNew->setIcon(GET_ICON("document-new"));
+	actionFileOpen->setIcon(GET_ICON("document-open"));
+	actionFileSave->setIcon(GET_ICON("document-save"));
+	menuFileSaveAs->setIcon(GET_ICON("document-save-as"));
+	actionFileExit->setIcon(GET_ICON("application-exit"));
 	// Settings Menu
-	menuSettingsLanguage->setIcon(QIcon::fromTheme("preferences-desktop-locale", QIcon(":/images/icons/preferences-desktop-locale.png")));
-	actionSettingsLanguageEnglish->setIcon(QIcon::fromTheme("flag-gb", QIcon(":/images/icons/l10n/flag-gb.png")));
-	menuSettingsStyle->setIcon(QIcon::fromTheme("preferences-desktop-theme", QIcon(":/images/icons/preferences-desktop-theme.png")));
-	actionSettingsPreferences->setIcon(QIcon::fromTheme("preferences-system", QIcon(":/images/icons/preferences-system.png")));
+	menuSettingsLanguage->setIcon(GET_ICON("preferences-desktop-locale"));
+	actionSettingsLanguageEnglish->setIcon(GET_ICON("flag-gb"));
+	menuSettingsStyle->setIcon(GET_ICON("preferences-desktop-theme"));
+	actionSettingsPreferences->setIcon(GET_ICON("preferences-system"));
 	// Help Menu
-	actionHelpContents->setIcon(QIcon::fromTheme("help-contents", QIcon(":/images/icons/help-contents.png")));
-	actionHelpContextual->setIcon(QIcon::fromTheme("help-contextual", QIcon(":/images/icons/help-contextual.png")));
-	actionHelpAbout->setIcon(QIcon::fromTheme("help-about", QIcon(":/images/icons/help-about.png")));
+	actionHelpContents->setIcon(GET_ICON("help-contents"));
+	actionHelpContextual->setIcon(GET_ICON("help-contextual"));
+	actionHelpAbout->setIcon(GET_ICON("help-about"));
 	// Buttons
-	buttonRandom->setIcon(QIcon::fromTheme("roll", QIcon(":/images/icons/roll.png")));
-	buttonSolve->setIcon(QIcon::fromTheme("dialog-ok", QIcon(":/images/icons/dialog-ok.png")));
-	buttonSaveSolution->setIcon(QIcon::fromTheme("document-save-as", QIcon(":/images/icons/document-save-as.png")));
-	buttonBackToTask->setIcon(QIcon::fromTheme("go-previous", QIcon(":/images/icons/go-previous.png")));
-
-//	action->setIcon(QIcon::fromTheme("", QIcon(":/images/icons/.png")));
+	buttonRandom->setIcon(GET_ICON("roll"));
+	buttonSolve->setIcon(GET_ICON("dialog-ok"));
+	buttonSaveSolution->setIcon(GET_ICON("document-save-as"));
+	buttonBackToTask->setIcon(GET_ICON("go-previous"));
+
+//	action->setIcon(GET_ICON(""));
 
 #if QT_VERSION >= 0x040600
@@ -1541,10 +1539,10 @@
 	actionFilePrintPreview->setObjectName("actionFilePrintPreview");
 	actionFilePrintPreview->setEnabled(false);
-	actionFilePrintPreview->setIcon(QIcon::fromTheme("document-print-preview", QIcon(":/images/icons/document-print-preview.png")));
+	actionFilePrintPreview->setIcon(GET_ICON("document-print-preview"));
 
 	actionFilePrint = new QAction(this);
 	actionFilePrint->setObjectName("actionFilePrint");
 	actionFilePrint->setEnabled(false);
-	actionFilePrint->setIcon(QIcon::fromTheme("document-print", QIcon(":/images/icons/document-print.png")));
+	actionFilePrint->setIcon(GET_ICON("document-print"));
 
 	menuFile->insertAction(actionFileExit,actionFilePrintPreview);
@@ -1566,10 +1564,10 @@
 #ifndef HANDHELD
 	actionSettingsToolbarsConfigure = new QAction(this);
-	actionSettingsToolbarsConfigure->setIcon(QIcon::fromTheme("configure-toolbars", QIcon(":/images/icons/configure-toolbars.png")));
+	actionSettingsToolbarsConfigure->setIcon(GET_ICON("configure-toolbars"));
 #endif // HANDHELD
 
 #ifdef Q_OS_WIN32
 	actionHelpCheck4Updates = new QAction(this);
-	actionHelpCheck4Updates->setIcon(QIcon::fromTheme("system-software-update", QIcon(":/images/icons/system-software-update.png")));
+	actionHelpCheck4Updates->setIcon(GET_ICON("system-software-update"));
 	actionHelpCheck4Updates->setEnabled(hasUpdater());
 	menuHelp->insertAction(actionHelpAboutQt, actionHelpCheck4Updates);
Index: src/settingsdialog.cpp
===================================================================
--- src/settingsdialog.cpp	(revision bbac1ebb130412febe406755b04cda6dbffdfa19)
+++ src/settingsdialog.cpp	(revision 2a436ea693ea5c59bf53d0fc77f9bb29924a4b67)
@@ -35,16 +35,16 @@
 	setupUi(this);
 
-	setWindowIcon(QIcon::fromTheme("preferences-system", QIcon(":/images/icons/preferences-system.png")));
-
-	buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon::fromTheme("dialog-ok", QIcon(":/images/icons/dialog-ok.png")));
+	setWindowIcon(GET_ICON("preferences-system"));
+
+	buttonBox->button(QDialogButtonBox::Ok)->setIcon(GET_ICON("dialog-ok"));
 	buttonBox->button(QDialogButtonBox::Ok)->setStatusTip(tr("Save new preferences"));
 	buttonBox->button(QDialogButtonBox::Ok)->setCursor(QCursor(Qt::PointingHandCursor));
-	buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QIcon::fromTheme("dialog-cancel", QIcon(":/images/icons/dialog-cancel.png")));
+	buttonBox->button(QDialogButtonBox::Cancel)->setIcon(GET_ICON("dialog-cancel"));
 	buttonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Close without saving preferences"));
 	buttonBox->button(QDialogButtonBox::Cancel)->setCursor(QCursor(Qt::PointingHandCursor));
 
-	buttonColor->setIcon(QIcon::fromTheme("format-text-color", QIcon(":/images/icons/format-text-color.png")));
-	buttonFont->setIcon(QIcon::fromTheme("preferences-desktop-font", QIcon(":/images/icons/preferences-desktop-font.png")));
-	buttonHelp->setIcon(QIcon::fromTheme("help-hint", QIcon(":/images/icons/help-hint.png")));
+	buttonColor->setIcon(GET_ICON("format-text-color"));
+	buttonFont->setIcon(GET_ICON("preferences-desktop-font"));
+	buttonHelp->setIcon(GET_ICON("help-hint"));
 
 QPalette p = bgWhite->palette();
@@ -131,5 +131,5 @@
 	imgIcon->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding);
 	imgIcon->setFrameShape(QFrame::NoFrame);
-	imgIcon->setPixmap(QIcon::fromTheme("preferences-system", QIcon(":/images/icons/preferences-system.png")).pixmap(128, 128));
+	imgIcon->setPixmap(GET_ICON("preferences-system").pixmap(128, 128));
 	imgIcon->setStyleSheet("background-color: #0080C0; padding-top: 11px;");
 	imgIcon->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
