bool EmuFrontObject::operator ==(const EmuFrontObject &sup)
{
- return (id >= 0 && id == sup.id);
+ return (id >= 0 && id == sup.id && sup.name == name);
}
bool EmuFrontObject::operator !=(const EmuFrontObject &sup)
QString DbFilePath::constructSelect(QString where) const
{
- return QString("SELECT filepath.id AS FilePathId, "
+ return QString("SELECT "
+ "filepath.id AS FilePathId, "
"filepath.name AS Name, "
"datetime(filepath.lastscanned, 'unixepoch') AS LastScanned, "
"setup.id AS SetupId, "
+emufront (0.1.8) unstable; urgency=low
+
+ * Fixed a bug in the edit dialog fields: the fields were not cleared
+ if an object was first edited or added and then add dialog was started.
+ * Fixed bug in main window: selected platform and media types remain selected
+ after update button is pressed.
+
+ -- Mikko Keinänen <mikko.keinanen@gmail.com> Fri, 20 Nov 2010 23:16:00 +0200
+
emufront (0.1.7) unstable; urgency=low
* Database file renamed to 'emufront.db.sqlite'
* The 'last scanned' time stamp is updated for media image paths after
scanning
- -- Mikko Keinänen <mikko.keinanen@gmail.com> Fri, 19 Oct 2010 22:52:00 +0200
+ -- Mikko Keinänen <mikko.keinanen@gmail.com> Fri, 19 Nov 2010 22:52:00 +0200
emufront (0.1.6) unstable; urgency=low
* UI update: Label and tooltip to set up configuration editor.
* UI update: Added a confirmation dialog to file paths scanning.
- -- Mikko Keinänen <mikko.keinanen@gmail.com> Tue, 16 Oct 2010 00:18:00 +0200
+ -- Mikko Keinänen <mikko.keinanen@gmail.com> Tue, 16 Nov 2010 00:18:00 +0200
emufront (0.1.5) unstable; urgency=low
* Bug fixed: files were not removed from temporary file directory.
- -- Mikko Keinänen <mikko.keinanen@gmail.com> Sun, 14 Oct 2010 23:22:21 +0200
+ -- Mikko Keinänen <mikko.keinanen@gmail.com> Sun, 14 Nov 2010 23:22:21 +0200
emufront (0.1.4) unstable; urgency=low
* Initial Official Release.
- -- Mikko Keinänen <mikko.keinanen@gmail.com> Thu, 13 Oct 2010 22:30:31 +0200
+ -- Mikko Keinänen <mikko.keinanen@gmail.com> Thu, 13 Nov 2010 22:30:31 +0200
--- /dev/null
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-11-21T22:52:33
+#
+#-------------------------------------------------
+
+QT += core
+QT += testlib
+QT -= gui
+
+#INCLUDEPATH += "../../src/dataobjects"
+#include("../../src/emufront.pro")
+
+#INCLUDEPATH += . "../../src/"
+TARGET = EmuFrontTesting
+CONFIG += console
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+
+SOURCES += main.cpp \
+ platformtest.cpp \
+ ../../src/dataobjects/platform.cpp \
+ ../../src/dataobjects/emufrontobject.cpp \
+ ../../src/dataobjects/emufrontfileobject.cpp \
+ ../../src/dataobjects/emufrontfile.cpp
+
+HEADERS += \
+ platformtest.h \
+ ../../src/dataobjects/platform.h \
+ ../../src/dataobjects/emufrontobject.h \
+ ../../src/dataobjects/emufrontfileobject.h \
+ ../../src/dataobjects/emufrontfile.h
--- /dev/null
+#include "platformtest.h"
+
+int main(int argc, char *argv[])
+{
+ PlatformTest plfTest;
+ QTest::qExec(&plfTest, argc, argv);
+
+ // More tests here...
+
+ return 0;
+}
--- /dev/null
+#include "platformtest.h"
+#include "../../src/dataobjects/platform.h"
+
+/* Platforms are equal if the following fields match:
+ - id (int)
+ - name (QString)
+ - filename (QString)
+*/
+void PlatformTest::equals()
+{
+ Platform p1(1, "testa");
+ Platform p2(1, "test");
+ // This should return true
+ QVERIFY(p1 != p2);
+}
--- /dev/null
+#ifndef PLATFORMTEST_H
+#define PLATFORMTEST_H
+
+#include <QObject>
+#include <QtTest/QtTest>
+
+class PlatformTest : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void equals();
+
+};
+
+#endif // PLATFORMTEST_H