Proper error checking.
svn path=/trunk/kdebase/kwin/; revision=78357icc-effect-5.14.5
parent
684fa4983f
commit
6576b45348
|
@ -42,14 +42,15 @@ int main(int argc, char **argv)
|
||||||
KCmdLineArgs::addCmdLineOptions( options );
|
KCmdLineArgs::addCmdLineOptions( options );
|
||||||
KApplication app(argc, argv);
|
KApplication app(argc, argv);
|
||||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||||
QString srcStr = QString(QFile::decodeName(args->arg(0)));
|
|
||||||
QFile f(srcStr);
|
|
||||||
QString tmpStr;
|
|
||||||
|
|
||||||
if(!args->count()){
|
if(!args->count()){
|
||||||
qWarning("You need to specify the path to a theme config file!");
|
qWarning("You need to specify the path to a theme config file!");
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString srcStr = QString(QFile::decodeName(args->arg(0)));
|
||||||
|
QFile f(srcStr);
|
||||||
|
QString tmpStr;
|
||||||
|
|
||||||
if(!f.exists()){
|
if(!f.exists()){
|
||||||
qWarning("Specified theme config file doesn't exist!");
|
qWarning("Specified theme config file doesn't exist!");
|
||||||
return(2);
|
return(2);
|
||||||
|
|
Loading…
Reference in New Issue