Updated the git clone command.
[emufront] / src / db / dbfile.cpp
index 64884be..9d087af 100644 (file)
@@ -1,22 +1,23 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation and appearing in the file gpl.txt included in the
-// packaging of this file.
-//
-// EmuFront is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
+/*
+** EmuFront
+** Copyright 2010 Mikko Keinänen
+**
+** This file is part of EmuFront.
+**
+**
+** EmuFront is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License version 2 as published by
+** the Free Software Foundation and appearing in the file gpl.txt included in the
+** packaging of this file.
+**
+** EmuFront is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #include <QDebug>
 #include <QSqlRecord>
 #include <QSqlQuery>
@@ -63,6 +64,7 @@ bool DbFile::updateDataObjectToModel(const EmuFrontObject *ob)
     return ret;
 }
 
+/* Returns id of inserted data item after succesful insert, -1 if insert failed */
 int DbFile::insertDataObjectToModel(const EmuFrontObject *ob)
 {
     const EmuFrontFile *fi = dynamic_cast<const EmuFrontFile*>(ob);
@@ -134,6 +136,7 @@ QSqlQueryModel* DbFile::getData()
     return model;
 }
 
+/* Throws EmuFrontException */
 EmuFrontObject* DbFile::getFileByChecksum(QString checksum)
 {
     return getDataObject(QString("checksum LIKE '%1'").arg(checksum));