summaryrefslogtreecommitdiffstats
path: root/archivebrowser.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-02-15 04:55:46 +0100
committerArno <am@disconnect.de>2014-02-15 04:55:46 +0100
commit816b84b7a4263c587c661e4c7178f3b6721e4cfe (patch)
treed5d6bd412d26b29f053ba7f3135f85b01dae08a7 /archivebrowser.cpp
parentdcbf9244f0ed147a5f3c412b9e83c581b58fa1b2 (diff)
downloadSheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.tar.gz
SheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.tar.bz2
SheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.zip
Replace ArchiveModel::FileType with #define
These constants are used all over the place and aren't really specific to ArchiveModel, so use the preprocessor.
Diffstat (limited to 'archivebrowser.cpp')
-rw-r--r--archivebrowser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/archivebrowser.cpp b/archivebrowser.cpp
index 8f715c8..ceabc1f 100644
--- a/archivebrowser.cpp
+++ b/archivebrowser.cpp
@@ -127,7 +127,7 @@ void ArchiveBrowser::moveToBurn() {
QFileInfo current(child.data(ArchiveBrowserModel::FullPathRole).toString());
int type = child.data(ArchiveBrowserModel::FileTypeRole).toInt();
QString destination = QString("%1/%2").arg(burnDirS).arg(current.fileName());
- if(type == 1){ //movie
+ if(type == FT_MOVIE){
QFile::rename(current.absoluteFilePath(), destination);
filesToUpdate << child.data(ArchiveBrowserModel::GenericIdRole).toInt();
}else{
@@ -175,10 +175,10 @@ void ArchiveBrowser::itemDoubleClicked(QModelIndex cur){
if(cur.data(ArchiveBrowserModel::NodeTypeRole).toInt() == ArchiveBrowserModel::FileNode){
int fileType = cur.data(ArchiveBrowserModel::FileTypeRole).toInt();
PictureViewer2 *picView = SmGlobals::instance()->pictureViewer();
- if(fileType == 1){ //movie
+ if(fileType == FT_MOVIE){
QPixmap pm = Helper::preview(cur.data(ArchiveBrowserModel::FullPathRole).toString());
picView->setPixmap(pm);
- }else if(fileType == 2 || fileType == 3){ //pic
+ }else{
picView->setFile(cur.data(ArchiveBrowserModel::FullPathRole).toString());
}
picView->show();