diff options
author | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-22 18:44:02 +0000 |
---|---|---|
committer | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-22 18:44:02 +0000 |
commit | 0e3e202c90e3ccb80310087409936c00189f0cea (patch) | |
tree | a4a38c32e761f024e2dfad6a59097cff15472b9e /helper.cpp | |
parent | 84ed109c159dcbd0c9395717d54599e902060b26 (diff) | |
download | SheMov-0e3e202c90e3ccb80310087409936c00189f0cea.tar.gz SheMov-0e3e202c90e3ccb80310087409936c00189f0cea.tar.bz2 SheMov-0e3e202c90e3ccb80310087409936c00189f0cea.zip |
-Finished CoverArchiveEditor (finally, don't like that piece of code, too complicated)
-It's now possible to manually add a movie w/o a file
-Some usability fixes
git-svn-id: file:///var/svn/repos2/shemov/trunk@394 f440f766-f032-0410-8965-dc7d17de2ca0
Diffstat (limited to 'helper.cpp')
-rw-r--r-- | helper.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -77,19 +77,23 @@ namespace Helper { return retval; } - bool moveToArchive(const QString &path, const QString &md5){ + const QString moveToArchive(const QString &path, const QString &md5){ QFileInfo info(path); if(!info.exists()){ - return false; + return QString(); } QFileInfo destFile = QFileInfo(createArchivePath(path, md5)); if(destFile.exists()){ destFile = QFileInfo(createArchivePath(path, md5, true)); if(destFile.exists()){ - return false; + return QString(); } } - return QFile::rename(path, destFile.absoluteFilePath()); + bool success = QFile::rename(path, destFile.absoluteFilePath()); + if(success){ + return destFile.absoluteFilePath(); + } + return QString(); } bool removeFromArchive(const QString &fileName, const QString &md5){ @@ -113,5 +117,9 @@ namespace Helper { } return retval; } + + bool StringListContains::operator()(const QString s, const QString &part) const{ + return s.contains(part); + } } |