Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/kdecore/tests/kdirwatch_unittest.cpp b/kdecore/tests/kdirwatch_unittest.cpp
- index f743cf2..8fd602e 100644
- --- a/kdecore/tests/kdirwatch_unittest.cpp
- +++ b/kdecore/tests/kdirwatch_unittest.cpp
- @@ -22,7 +22,7 @@
- #include <kconfiggroup.h>
- #include <QDir>
- #include <kdebug.h>
- -#include <ktempdir.h>
- +#include <qtemporarydir.h>
- #include <qtest_kde.h>
- #include <qtestevent.h>
- #include <kdirwatch.h>
- @@ -60,8 +60,7 @@ class KDirWatch_UnitTest : public QObject
- public:
- KDirWatch_UnitTest()
- {
- - m_path = m_tempDir.name();
- - Q_ASSERT(m_path.endsWith('/'));
- + m_path = m_tempDir.path() + '/';
- KConfigGroup config(KGlobal::config(), "DirWatch");
- const QByteArray testMethod = qgetenv("KDIRWATCHTEST_METHOD");
- @@ -116,7 +115,7 @@ private:
- void appendToFile(const QString& path);
- void appendToFile(int num);
- - KTempDir m_tempDir;
- + QTemporaryDir m_tempDir;
- QString m_path;
- bool m_slow;
- };
- @@ -517,14 +516,14 @@ void KDirWatch_UnitTest::testDeleteAndRecreateDir()
- {
- // Like KDirModelTest::testOverwriteFileWithDir does at the end.
- // The linux-2.6.31 bug made kdirwatch emit deletion signals about the -new- dir!
- - KTempDir* tempDir1 = new KTempDir(KStandardDirs::locateLocal("tmp", "olddir-"));
- + QTemporaryDir* tempDir1 = new QTemporaryDir(QDir::tempPath() + QLatin1Char('/') + "olddir-");
- KDirWatch watch;
- - const QString path1 = tempDir1->name();
- + const QString path1 = tempDir1->path() + '/';
- watch.addDir(path1);
- delete tempDir1;
- - KTempDir* tempDir2 = new KTempDir(KStandardDirs::locateLocal("tmp", "newdir-"));
- - const QString path2 = tempDir2->name();
- + QTemporaryDir* tempDir2 = new QTemporaryDir(QDir::tempPath() + QLatin1Char('/') + "newdir-");
- + const QString path2 = tempDir2->path() + '/';
- watch.addDir(path2);
- QVERIFY(waitForOneSignal(watch, SIGNAL(deleted(QString)), path1));
- diff --git a/kutils/CMakeLists.txt b/kutils/CMakeLists.txt
- index bfbc698..12d6e41 100644
- --- a/kutils/CMakeLists.txt
- +++ b/kutils/CMakeLists.txt
- @@ -6,6 +6,8 @@ include_directories( ${KDE4_KDEUI_INCLUDES}
- ${karchive_BINARY_DIR}/src
- ${CMAKE_SOURCE_DIR}/tier1/libkauth/
- ${CMAKE_BINARY_DIR}/tier1/libkauth/
- + ${CMAKE_SOURCE_DIR}/libinqt5/src
- + ${CMAKE_BINARY_DIR}/libinqt5/src
- )
- ########### kemoticons ################
- diff --git a/kutils/kprintpreview.cpp b/kutils/kprintpreview.cpp
- index 4aa4e29..fc997f6 100644
- --- a/kutils/kprintpreview.cpp
- +++ b/kutils/kprintpreview.cpp
- @@ -23,13 +23,13 @@
- #include <QtGui/QLabel>
- #include <QtGui/QPrinter>
- #include <QtGui/QShowEvent>
- +#include <qtemporarydir.h>
- #include <kmimetypetrader.h>
- #include <kparts/part.h>
- #include <kpluginfactory.h>
- #include <kpluginloader.h>
- #include <kservice.h>
- -#include <ktempdir.h>
- #include <kdebug.h>
- @@ -43,8 +43,8 @@ public:
- , previewPart(0)
- , failMessage(0)
- {
- - if ( tempdir.exists() ) {
- - filename = tempdir.name() + "print_preview.pdf";
- + if ( tempdir.isValid() ) {
- + filename = tempdir.path() + '/' + "print_preview.pdf";
- } else {
- // XXX: not portable!
- kWarning() << "Failed to create temporary directory";
- @@ -61,7 +61,7 @@ public:
- QPrinter *printer;
- QWidget *mainWidget;
- - KTempDir tempdir;
- + QTemporaryDir tempdir;
- QString filename;
- KParts::ReadOnlyPart *previewPart;
- diff --git a/nepomuk/test/CMakeLists.txt b/nepomuk/test/CMakeLists.txt
- index e7ece33..e771425 100644
- --- a/nepomuk/test/CMakeLists.txt
- +++ b/nepomuk/test/CMakeLists.txt
- @@ -4,6 +4,9 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
- include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}/..
- + ${CMAKE_SOURCE_DIR}/libinqt5/src
- + ${CMAKE_BINARY_DIR}/libinqt5/src
- +
- )
- add_definitions(-DDISABLE_NEPOMUK_LEGACY=1)
- diff --git a/nepomuk/test/dynamicresourcefacettest.cpp b/nepomuk/test/dynamicresourcefacettest.cpp
- index 6dd2cb0..1d6eae4 100644
- --- a/nepomuk/test/dynamicresourcefacettest.cpp
- +++ b/nepomuk/test/dynamicresourcefacettest.cpp
- @@ -122,8 +122,10 @@ void DynamicResourceFacetTest::initTestCase()
- // We create a dummy model with some simple test data in it
- const Soprano::Backend* backend = Soprano::PluginManager::instance()->discoverBackendByName( "virtuosobackend" );
- QVERIFY( backend );
- - m_storageDir = new KTempDir();
- - m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, m_storageDir->name()) );
- + m_storageDir = new QTemporaryDir();
- + QString storageDir = m_storageDir->path() + '/' ;
- +
- + m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, storageDir ) );
- QVERIFY( m_model );
- Nepomuk::ResourceManager::instance()->setOverrideMainModel( m_model );
- diff --git a/nepomuk/test/dynamicresourcefacettest.h b/nepomuk/test/dynamicresourcefacettest.h
- index 33497e6..4ec9db2 100644
- --- a/nepomuk/test/dynamicresourcefacettest.h
- +++ b/nepomuk/test/dynamicresourcefacettest.h
- @@ -23,7 +23,8 @@
- #define DYNAMICRESOURCEFACETTEST_H
- #include <QObject>
- -#include "ktempdir.h"
- +#include <qtemporarydir.h>
- +
- #include "tag.h"
- #include "dynamicresourcefacet.h"
- @@ -60,7 +61,7 @@ private slots:
- void testSetClientQuery();
- private:
- - KTempDir* m_storageDir;
- + QTemporaryDir* m_storageDir;
- Soprano::Model* m_model;
- Nepomuk::Tag tag1, tag2, tag3, tag4;
- };
- diff --git a/nepomuk/test/queryparsertest.cpp b/nepomuk/test/queryparsertest.cpp
- index 6c059cf..74d9372 100644
- --- a/nepomuk/test/queryparsertest.cpp
- +++ b/nepomuk/test/queryparsertest.cpp
- @@ -33,8 +33,7 @@
- #include <QtTest>
- #include <qtest_kde.h>
- -
- -#include "ktempdir.h"
- +#include <qtemporarydir.h>
- #include <Soprano/LiteralValue>
- #include <Soprano/Node>
- @@ -60,8 +59,10 @@ void QueryParserTest::initTestCase()
- // that are used by libnepomuk below
- const Soprano::Backend* backend = Soprano::PluginManager::instance()->discoverBackendByName( "virtuosobackend" );
- QVERIFY( backend );
- - m_storageDir = new KTempDir();
- - m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, m_storageDir->name()) );
- + m_storageDir = new QTemporaryDir();
- + QString storageDir = m_storageDir->path() + '/' ;
- +
- + m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, storageDir) );
- QVERIFY( m_model );
- // we create one fake ontology
- diff --git a/nepomuk/test/queryparsertest.h b/nepomuk/test/queryparsertest.h
- index 920d856..75fe574 100644
- --- a/nepomuk/test/queryparsertest.h
- +++ b/nepomuk/test/queryparsertest.h
- @@ -23,7 +23,7 @@
- #define _NEPOMUK_QUERY_PARSER_TEST_H_
- #include <QtCore/QObject>
- -#include "ktempdir.h"
- +#include <qtemporarydir.h>
- #include <Soprano/Model>
- @@ -42,7 +42,7 @@ private Q_SLOTS:
- void testQueryParserDetectFilenamePattern();
- private:
- - KTempDir* m_storageDir;
- + QTemporaryDir* m_storageDir;
- Soprano::Model* m_model;
- };
- diff --git a/nepomuk/test/testbase.cpp b/nepomuk/test/testbase.cpp
- index 8dbd012..7ad30cf 100644
- --- a/nepomuk/test/testbase.cpp
- +++ b/nepomuk/test/testbase.cpp
- @@ -19,16 +19,17 @@
- #include <Soprano/Soprano>
- -#include <ktempdir.h>
- +#include <qtemporarydir.h>
- void TestBase::initTestCase()
- {
- - m_tmpDir = new KTempDir();
- + m_tmpDir = new QTemporaryDir();
- const Soprano::Backend* backend = Soprano::PluginManager::instance()->discoverBackendByName("virtuoso");
- if( !backend ) {
- QSKIP( "Unable to load Virtuoso backend, skipping test.", SkipAll );
- }
- - m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, m_tmpDir->name() ));
- + QString tmpDir = m_tmpDir->path() + '/' ;
- + m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, tmpDir ));
- Nepomuk::ResourceManager::instance()->setOverrideMainModel( m_model );
- }
- diff --git a/nepomuk/test/testbase.h b/nepomuk/test/testbase.h
- index 471aa89..43777b1 100644
- --- a/nepomuk/test/testbase.h
- +++ b/nepomuk/test/testbase.h
- @@ -17,7 +17,8 @@
- #include <QtTest/QtTest>
- -class KTempDir;
- +
- +class QTemporaryDir;
- namespace Soprano {
- class Model;
- }
- @@ -33,7 +34,7 @@ private Q_SLOTS:
- virtual void cleanup();
- private:
- - KTempDir* m_tmpDir;
- + QTemporaryDir* m_tmpDir;
- Soprano::Model* m_model;
- };
- diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt
- index bc4a225..5fef3b8 100644
- --- a/plasma/CMakeLists.txt
- +++ b/plasma/CMakeLists.txt
- @@ -32,6 +32,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch/qtjolie
- ${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch
- ${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch/includes
- + ${CMAKE_SOURCE_DIR}/libinqt5/src
- + ${CMAKE_BINARY_DIR}/libinqt5/src
- )
- if(NOT PLASMA_NO_KIO)
- diff --git a/plasma/package.cpp b/plasma/package.cpp
- index ef29b5e..4123756 100644
- --- a/plasma/package.cpp
- +++ b/plasma/package.cpp
- @@ -28,6 +28,7 @@
- #include <QIODevice>
- #include <QRegExp>
- #include <QtNetwork/QHostInfo>
- +#include <qtemporarydir.h>
- #include <karchive.h>
- #include <kdebug.h>
- @@ -36,7 +37,6 @@
- #include <kservicetypetrader.h>
- #include <kstandarddirs.h>
- #include <ktar.h>
- -#include <ktempdir.h>
- #include <kzip.h>
- #include "config-plasma.h"
- @@ -289,9 +289,9 @@ KPluginInfo Package::metadata() const
- if (archive && archive->open(QIODevice::ReadOnly)) {
- const KArchiveDirectory *source = archive->directory();
- - KTempDir tempdir;
- - source->copyTo(tempdir.name());
- - d->createPackageMetadata(tempdir.name());
- + QTemporaryDir tempdir;
- + source->copyTo(tempdir.path() + '/');
- + d->createPackageMetadata(tempdir.path() + '/');
- } else {
- kWarning() << "Could not open package file:" << d->path;
- }
- @@ -730,7 +730,7 @@ bool PackagePrivate::installPackage(const QString &package, const QString &packa
- }
- QString path;
- - KTempDir tempdir;
- + QTemporaryDir tempdir;
- bool archivedPackage = false;
- if (fileInfo.isDir()) {
- @@ -763,7 +763,7 @@ bool PackagePrivate::installPackage(const QString &package, const QString &packa
- }
- archivedPackage = true;
- - path = tempdir.name();
- + path = tempdir.path() + '/';
- const KArchiveDirectory *source = archive->directory();
- source->copyTo(path);
- diff --git a/plasma/remote/accessappletjob.cpp b/plasma/remote/accessappletjob.cpp
- index dbd4271..26da7f6 100644
- --- a/plasma/remote/accessappletjob.cpp
- +++ b/plasma/remote/accessappletjob.cpp
- @@ -20,11 +20,11 @@
- #include "accessappletjob.h"
- #include <qtimer.h>
- +#include <qtemporarydir.h>
- #include <kdebug.h>
- #include <kdesktopfile.h>
- #include <kmessagebox.h>
- -#include <ktempdir.h>
- #include <kzip.h>
- #include "config-plasma.h"
- @@ -108,9 +108,9 @@ public:
- const KArchiveDirectory *source = archive.directory();
- - KTempDir tempDir;
- + QTemporaryDir tempDir;
- tempDir.setAutoRemove(false);
- - QString path = tempDir.name();
- + QString path = tempDir.path() + '/';
- source->copyTo(path);
- KDesktopFile metadata(path + "/metadata.desktop");
Add Comment
Please, Sign In to add comment