2015-02-04 15:54 GMT-03:00 Guy Maurel <guy.mau...@kde.org>: > Hello! > > I wonder about the code of kdesktopfile.cpp at line 80: > ... > QString KDesktopFile::locateLocal(const QString &path) > { > QString relativePath; > // Relative to config? (e.g. for autostart) > Q_FOREACH (const QString &dir, > QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) { > if (path.startsWith(dir) + '/') { > > because path.startsWith(dir) returns "bool" and '/' is a character. > HOW can be the "+" be made and what is the type of the result?
The result is an int that is always non-zero, so the if condition is always true. Looks like a bug to me :) Probably the intention was if (path.startsWith(dir + '/')) -- Nicolás _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel