Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision 4c96f9455808960fdb0310ca72057bf926e847fb)
+++ src/mainwindow.cpp	(revision 690f6939a74b1364b999bdf013d5fc2dfd84020e)
@@ -45,4 +45,5 @@
 	connect(actionSettingsLanguageAutodetect,SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool)));
 	connect(groupSettingsLanguageList,SIGNAL(triggered(QAction *)),this,SLOT(groupSettingsLanguageListTriggered(QAction *)));
+	connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
 	connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));
 #ifndef Q_OS_WINCE
@@ -78,4 +79,6 @@
 	taskView->setModel(tspmodel);
 	connect(tspmodel,SIGNAL(numCitiesChanged(int)),this,SLOT(numCitiesChanged(int)));
+	connect(tspmodel,SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),this,SLOT(dataChanged()));
+	connect(tspmodel,SIGNAL(layoutChanged()),this,SLOT(dataChanged()));
 #ifdef Q_OS_WINCE
 	taskView->resizeColumnsToContents();
@@ -149,9 +152,20 @@
 void MainWindow::actionFileNewTriggered()
 {
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("New Task"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask()))
+			return;
+	}
 	tspmodel->clear();
+	setWindowModified(false);
 }
 
 void MainWindow::actionFileOpenTriggered()
 {
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("Task Open"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask()))
+			return;
+	}
 QFileDialog od(this);
 	od.setAcceptMode(QFileDialog::AcceptOpen);
@@ -168,8 +182,13 @@
 		return;
 	tspmodel->loadTask(files.first());
+	setWindowModified(false);
 }
 
 void MainWindow::actionFileSaveTaskTriggered()
 {
+	saveTask();
+}
+
+bool MainWindow::saveTask() {
 QFileDialog sd(this);
 	sd.setAcceptMode(QFileDialog::AcceptSave);
@@ -179,9 +198,13 @@
 	sd.setDefaultSuffix("tspt");
 	if (sd.exec() != QDialog::Accepted)
-		return;
+		return false;
 QStringList files = sd.selectedFiles();
 	if (files.size() < 1)
-		return;
-	tspmodel->saveTask(files.first());
+		return false;
+	if (tspmodel->saveTask(files.first())) {
+		setWindowModified(false);
+		return true;
+	} else
+		return false;
 }
 
@@ -208,4 +231,5 @@
 {
 	tspmodel->randomize();
+	setWindowModified(true);
 #ifdef Q_OS_WINCE
 	taskView->resizeColumnsToContents();
@@ -244,6 +268,6 @@
 QString about = QString::fromUtf8("TSPSG - TSP Solver and Generator\n");
 about += QString::fromUtf8("    Copyright (C) 2007-%1 Lёppa <contacts[at]oleksii[dot]name>\n").arg(QDate::currentDate().toString("yyyy"));
-	about += "Qt library versions:\n";
-	about += QString::fromUtf8("    OS: %1\n").arg(OS);
+	about += QString::fromUtf8("Target OS: %1\n").arg(OS);
+	about += "Qt library:\n";
 	about += QString::fromUtf8("    Compile time: %1\n").arg(QT_VERSION_STR);
 	about += QString::fromUtf8("    Runtime: %1\n").arg(qVersion());
@@ -312,4 +336,11 @@
 void MainWindow::closeEvent(QCloseEvent *event)
 {
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("Application Close"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask())) {
+			event->ignore();
+			return;
+		}
+	}
 	settings->setValue("NumCities",spinCities->value());
 #ifndef Q_OS_WINCE
@@ -328,4 +359,9 @@
 }
 
+void MainWindow::dataChanged()
+{
+	setWindowModified(true);
+}
+
 void MainWindow::numCitiesChanged(int nCities)
 {
Index: src/mainwindow.h
===================================================================
--- src/mainwindow.h	(revision 4c96f9455808960fdb0310ca72057bf926e847fb)
+++ src/mainwindow.h	(revision 690f6939a74b1364b999bdf013d5fc2dfd84020e)
@@ -49,4 +49,5 @@
 	void groupSettingsLanguageListTriggered(QAction *);
 	void actionHelpAboutTriggered();
+	void dataChanged();
 #ifndef Q_OS_WINCE
 	void actionFilePrintSetupTriggered();
@@ -63,4 +64,5 @@
 	bool loadLanguage(QString lang = "");
 	void loadLangList();
+	bool saveTask();
 };
 
Index: src/os.h
===================================================================
--- src/os.h	(revision 4c96f9455808960fdb0310ca72057bf926e847fb)
+++ src/os.h	(revision 690f6939a74b1364b999bdf013d5fc2dfd84020e)
@@ -25,87 +25,95 @@
 #define OS_H
 
+#ifdef _WIN64
+	#define BITS " (64-bit)"
+#elif defined _WIN32
+	#define BITS " (32-bit)"
+#else
+	#define BITS ""
+#endif // BITS
+
 #ifdef Q_OS_AIX
-	#define OS "AIX"
+	#define OS "AIX"BITS
 	#define OSID quint8(1)
 #elif defined Q_OS_BSD4
-	#define OS "BSD 4.4"
+	#define OS "BSD 4.4"BITS
 	#define OSID quint8(2)
 #elif defined Q_OS_BSDI
-	#define OS "BSD/OS"
+	#define OS "BSD/OS"BITS
 	#define OSID quint8(3)
 #elif defined Q_OS_CYGWIN
-	#define OS "Cygwin"
+	#define OS "Cygwin"BITS
 	#define OSID quint8(4)
 #elif defined Q_OS_DARWIN
-	#define OS "Darwin OS"
+	#define OS "Darwin OS"BITS
 	#define OSID quint8(5)
 #elif defined Q_OS_DGUX
-	#define OS "DG/UX"
+	#define OS "DG/UX"BITS
 	#define OSID quint8(6)
 #elif defined Q_OS_DYNIX
-	#define OS "DYNIX/ptx"
+	#define OS "DYNIX/ptx"BITS
 	#define OSID quint8(7)
 #elif defined Q_OS_FREEBSD
-	#define OS "FreeBSD"
+	#define OS "FreeBSD"BITS
 	#define OSID quint8(8)
 #elif defined Q_OS_HPUX
-	#define OS "HP-UX"
+	#define OS "HP-UX"BITS
 	#define OSID quint8(9)
 #elif defined Q_OS_HURD
-	#define OS "GNU Hurd"
+	#define OS "GNU Hurd"BITS
 	#define OSID quint8(10)
 #elif defined Q_OS_IRIX
-	#define OS "SGI Irix"
+	#define OS "SGI Irix"BITS
 	#define OSID quint8(11)
 #elif defined Q_OS_LINUX
-	#define OS "Linux"
+	#define OS "Linux"BITS
 	#define OSID quint8(12)
 #elif defined Q_OS_LYNX
-	#define OS "LynxOS"
+	#define OS "LynxOS"BITS
 	#define OSID quint8(13)
 #elif defined Q_OS_MSDOS
-	#define OS "MS-DOS"
+	#define OS "MS-DOS"BITS
 	#define OSID quint8(14)
 #elif defined Q_OS_NETBSD
-	#define OS "NetBSD"
+	#define OS "NetBSD"BITS
 	#define OSID quint8(15)
 #elif defined Q_OS_OS2
-	#define OS "OS/2"
+	#define OS "OS/2"BITS
 	#define OSID quint8(16)
 #elif defined Q_OS_OPENBSD
-	#define OS "OpenBSD"
+	#define OS "OpenBSD"BITS
 	#define OSID quint8(17)
 #elif defined Q_OS_OS2EMX
-	#define OS "OS/2"
+	#define OS "OS/2"BITS
 	#define OSID quint8(18)
 #elif defined Q_OS_OSF
-	#define OS "HP Tru64 UNIX"
+	#define OS "HP Tru64 UNIX"BITS
 	#define OSID quint8(19)
 #elif defined Q_OS_QNX6
-	#define OS "QNX RTP 6.1"
+	#define OS "QNX RTP 6.1"BITS
 	#define OSID quint8(20)
 #elif defined Q_OS_QNX
-	#define OS "QNX"
+	#define OS "QNX"BITS
 	#define OSID quint8(21)
 #elif defined Q_OS_RELIANT
-	#define OS "Reliant UNIX"
+	#define OS "Reliant UNIX"BITS
 	#define OSID quint8(22)
 #elif defined Q_OS_SCO
-	#define OS "SCO OpenServer 5"
+	#define OS "SCO OpenServer 5"BITS
 	#define OSID quint8(23)
 #elif defined Q_OS_SOLARIS
-	#define OS "Sun Solaris"
+	#define OS "Sun Solaris"BITS
 	#define OSID quint8(24)
 #elif defined Q_OS_ULTRIX
-	#define OS "DEC Ultrix"
+	#define OS "DEC Ultrix"BITS
 	#define OSID quint8(25)
 #elif defined Q_OS_UNIX
-	#define OS "UNIX BSD/SYSV"
+	#define OS "UNIX BSD/SYSV"BITS
 	#define OSID quint8(26)
 #elif defined Q_OS_UNIXWARE
-	#define OS "UnixWare 7/Open UNIX 8"
+	#define OS "UnixWare 7/Open UNIX 8"BITS
 	#define OSID quint8(27)
 #elif defined Q_OS_WIN32
-	#define OS "Windows"
+	#define OS "Windows"BITS
 	#define OSID quint8(28)
 #elif defined Q_OS_WINCE
@@ -113,7 +121,7 @@
 	#define OSID quint8(29)
 #else
-	#define OS "Unknown"
+	#define OS "Unknown"BITS
 	#define OSID quint8(255)
-#endif
+#endif // OS
 
 #endif // OS_H
Index: src/tspmodel.cpp
===================================================================
--- src/tspmodel.cpp	(revision 4c96f9455808960fdb0310ca72057bf926e847fb)
+++ src/tspmodel.cpp	(revision 690f6939a74b1364b999bdf013d5fc2dfd84020e)
@@ -276,10 +276,10 @@
 }
 
-void CTSPModel::saveTask(QString fname)
+bool CTSPModel::saveTask(QString fname)
 {
 QFile f(fname);
 	if (!f.open(QIODevice::WriteOnly)) {
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),QString(trUtf8("Unable to create task file.\nError: %1\nMaybe, file is read-only?")).arg(f.errorString()),QMessageBox::Ok).exec();
-		return;
+		return false;
 	}
 QDataStream ds(&f);
@@ -288,5 +288,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// File signature
@@ -295,5 +295,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// File version
@@ -302,5 +302,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// File metadata version
@@ -309,5 +309,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// Metadata
@@ -316,5 +316,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// Number of cities
@@ -323,5 +323,5 @@
 		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 		f.close();
-		return;
+		return false;
 	}
 	// Costs
@@ -333,8 +333,9 @@
 					QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
 					f.close();
-					return;
+					return false;
 				}
 			}
 	f.close();
+	return true;
 }
 
Index: src/tspmodel.h
===================================================================
--- src/tspmodel.h	(revision 4c96f9455808960fdb0310ca72057bf926e847fb)
+++ src/tspmodel.h	(revision 690f6939a74b1364b999bdf013d5fc2dfd84020e)
@@ -42,5 +42,5 @@
 	void clear();
 	void loadTask(QString);
-	void saveTask(QString);
+	bool saveTask(QString);
 	void randomize();
 signals:
