diff options
Diffstat (limited to 'src/modules/theme/ThemeFunctions.cpp')
| -rw-r--r-- | src/modules/theme/ThemeFunctions.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/modules/theme/ThemeFunctions.cpp b/src/modules/theme/ThemeFunctions.cpp index a24684c7b..271fef739 100644 --- a/src/modules/theme/ThemeFunctions.cpp +++ b/src/modules/theme/ThemeFunctions.cpp @@ -64,6 +64,7 @@ namespace ThemeFunctions if(!r.readHeader(szThemePackageFileName)) { + qDebug("The selected file does not seem to be a valid KVIrc package"); QString szErr = r.lastError(); szError = QString(__tr2qs_ctx("The selected file does not seem to be a valid KVIrc package: %1","theme")).arg(szErr); return false; @@ -72,8 +73,10 @@ namespace ThemeFunctions pInfoFields = r.stringInfoFields(); pValue = pInfoFields->find("PackageType"); - if(!pValue) + if(!pValue){ + qDebug("no package type"); return notAValidThemePackage(szError); + } if(!KviQString::equalCI(*pValue,"ThemePack")) return notAValidThemePackage(szError); @@ -91,16 +94,22 @@ namespace ThemeFunctions } pValue = pInfoFields->find("ThemeCount"); - if(!pValue) + if(!pValue){ + qDebug("no theme count"); return notAValidThemePackage(szError); + } bool bOk; int iThemeCount = pValue->toInt(&bOk); - if(!bOk) + if(!bOk){ + qDebug("no theme count 2"); return notAValidThemePackage(szError); + } + if(iThemeCount < 1){ - if(iThemeCount < 1) + qDebug("no theme count 2"); return notAValidThemePackage(szError); + } // ok.. it should be really valid at this point |
