Porting kwin main, data and compositingprefs to Qt5/KF5: QStandardPaths

REVIEW: 111971
icc-effect-5.14.5
Anselmo L. S. Melo 2013-08-03 17:30:42 -03:00
parent 9c225200bf
commit c9b079e628
3 changed files with 6 additions and 6 deletions

View File

@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KLocalizedString>
#include <kdeversion.h>
#include <ksharedconfig.h>
#include <kstandarddirs.h>
#include <QStandardPaths>
#include <qprocess.h>
@ -148,7 +148,7 @@ void CompositingPrefs::detect()
// environment variable.
// Direct rendering is preferred, since not all OpenGL extensions are
// available with indirect rendering.
const QString opengl_test = KStandardDirs::findExe(QStringLiteral("kwin_opengl_test"));
const QString opengl_test = QStandardPaths::findExecutable(QStringLiteral("kwin_opengl_test"));
if (QProcess::execute(opengl_test) != 0) {
mEnableDirectRendering = false;
setenv("LIBGL_ALWAYS_INDIRECT", "1", true);

View File

@ -24,11 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kconfiggroup.h>
#include <kdebug.h>
#include <kcomponentdata.h>
#include <kstandarddirs.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kglobal.h>
#include <QtDBus/QtDBus>
#include <QtCore/QStandardPaths>
int main( int argc, char* argv[] )
{
@ -38,7 +38,7 @@ int main( int argc, char* argv[] )
KCmdLineArgs::init( argc, argv, &about );
KComponentData inst( &about );
Q_UNUSED( KGlobal::locale() ); // jump-start locales to get to translated descriptions
QString file = KStandardDirs::locate( "data", QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] ));
QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] ));
if( file.isEmpty())
{
kWarning(1212) << "File " << argv[ 1 ] << " not found!" ;

View File

@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QEvent>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <QStandardPaths>
#include <kdebug.h>
#include <kde_file.h>
#include <QLabel>
@ -179,7 +179,7 @@ public:
void addWM(const QString& wm) {
// TODO: Check if WM is installed
if (!KStandardDirs::findExe(wm).isEmpty())
if (!QStandardPaths::findExecutable(wm).isEmpty())
wmList->addItem(wm);
}
QString selectedWM() const {