Proper error checking.

svn path=/trunk/kdebase/kwin/; revision=78357
icc-effect-5.14.5
Waldo Bastian 2001-01-16 06:17:18 +00:00
parent 684fa4983f
commit 6576b45348
1 changed files with 5 additions and 4 deletions

View File

@ -42,14 +42,15 @@ int main(int argc, char **argv)
KCmdLineArgs::addCmdLineOptions( options );
KApplication app(argc, argv);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QString srcStr = QString(QFile::decodeName(args->arg(0)));
QFile f(srcStr);
QString tmpStr;
if(!args->count()){
qWarning("You need to specify the path to a theme config file!");
return(1);
}
QString srcStr = QString(QFile::decodeName(args->arg(0)));
QFile f(srcStr);
QString tmpStr;
if(!f.exists()){
qWarning("Specified theme config file doesn't exist!");
return(2);