summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-01-27 15:55:39 +0100
committerArno <arno@disconnect.de>2018-01-27 15:55:39 +0100
commit5df1e778010b5529e9ea37d901c2ce6063abccb3 (patch)
tree7977b848edbbac43b23c8e50dd9533391841a65e
parent9a6a0bbaaf1fd12a4d91d2ad0d5f1a3658228390 (diff)
downloadSheMov-5df1e778010b5529e9ea37d901c2ce6063abccb3.tar.gz
SheMov-5df1e778010b5529e9ea37d901c2ce6063abccb3.tar.bz2
SheMov-5df1e778010b5529e9ea37d901c2ce6063abccb3.zip
Fix bug guessing origin files
baseName() only returns the filename unto the *first* dot, but we want the *last* dot, so use completeBaseName().
-rw-r--r--newmoviewizard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp
index 8a4e961..f8c373f 100644
--- a/newmoviewizard.cpp
+++ b/newmoviewizard.cpp
@@ -515,14 +515,14 @@ void MovieInfoPage::addOld(){
void MovieInfoPage::guessOld(const QString &fullPath){
QFileInfo fi(fullPath);
- QString baseName = fi.baseName();
+ QString baseName = fi.completeBaseName();
QRegularExpression fnRe(baseName);
QModelIndex parent;
QDirIterator it(fi.dir());
QList<QVariant> itemData;
while(it.hasNext()){
QFileInfo curFi = it.next();
- QString curBaseName = curFi.baseName();
+ QString curBaseName = curFi.completeBaseName();
for(int i = 0; i < mFileModel->rowCount(mFileModel->rootIndex()); ++i){
QModelIndex curIdx = mFileModel->index(i, WizardTreeModel::FileName, mFileModel->rootIndex());
if(curIdx.isValid()){