[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/sysadmin/kiosktool
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2010-03-11 22:04:42
Message-ID: 1268345082.021405.12460.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1102145 by lunakl:
job->ui()->setWindow( widget );
M +18 -3 kioskrun.cpp
M +2 -1 kioskrun.h
--- trunk/extragear/sysadmin/kiosktool/kioskrun.cpp #1102144:1102145
@@ -56,6 +56,7 @@
#include "kconfigraweditor.h"
#include <kio/job.h>
+#include <kio/jobuidelegate.h>
#include <kio/copyjob.h>
#include <kio/deletejob.h>
@@ -66,8 +67,8 @@
KioskRun *KioskRun::s_self = 0;
-KioskRun::KioskRun( QObject* parent )
- : QObject(parent), m_instance(0), m_localKdercConfig(0)
+KioskRun::KioskRun( QWidget* parent )
+ : QObject(parent), m_instance(0), m_localKdercConfig(0), m_mainWidget( parent )
{
m_noRestrictions = false;
m_forceSycocaUpdate = false;
@@ -166,6 +167,7 @@
Q_ASSERT(dir.startsWith(m_homeDir));
KIO::DeleteJob *deleteJob = KIO::del( KUrl(dir) );
+ deleteJob->ui()->setWindow( m_mainWidget );
deleteJob->exec();
}
@@ -878,10 +880,12 @@
}
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KIO::SimpleJob *mkdirJob = KIO::mkdir(dest, 0755 );
+ mkdirJob->ui()->setWindow( m_mainWidget );
if (mkdirJob->exec() == true)
return true;
@@ -893,12 +897,14 @@
KioskRun::createRemoteDirRecursive(const KUrl &dest, bool ask)
{
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KUrl parent = parent.upUrl();
KIO::StatJob *parentExistsJob = KIO::stat( parent, KIO::HideProgressInfo );
+ parentExistsJob->ui()->setWindow( m_mainWidget );
if ( parentExistsJob->exec() == true )
{
return createRemoteDir(dest);
@@ -931,10 +937,12 @@
KioskRun::createRemoteDir(const KUrl &dest)
{
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KIO::SimpleJob *mkdirJob = KIO::mkdir(dest, 0755 );
+ mkdirJob->ui()->setWindow( m_mainWidget );
if (mkdirJob->exec() == true)
return true;
@@ -960,9 +968,12 @@
KUrl src;
src.setPath(file);
KIO::CopyJob *result = KIO::copy(src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if (result->exec() == true)
{
- if(KIO::chmod(dest, 0644)->exec())
+ KIO::SimpleJob* chmodJob = KIO::chmod(dest, 0644);
+ chmodJob->ui()->setWindow( m_mainWidget );
+ if(chmodJob->exec())
{
::unlink(QFile::encodeName(file));
return true;
@@ -979,6 +990,7 @@
KUrl src;
src.setPath(file);
KIO::CopyJob *result = KIO::copy(src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if ( result->exec() )
return true;
return false;
@@ -998,6 +1010,7 @@
dest.setPath(destination);
KIO::DeleteJob *delJob = KIO::del(dest,KIO::HideProgressInfo );
+ delJob->ui()->setWindow( m_mainWidget );
return delJob->exec();
}
@@ -1026,6 +1039,7 @@
if (!createRemoteDirRecursive(dest.upUrl(), false))
return false;
KIO::CopyJob *moveJob = KIO::move( src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ moveJob->ui()->setWindow( m_mainWidget );
if ( !moveJob->exec() )
{
return false;
@@ -1095,6 +1109,7 @@
if (QFile::exists(settingsUrl.path()))
{
KIO::CopyJob *result = KIO::copy(settingsUrl, localCopyUrl, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if( result->exec() == false )
return 0;
}
--- trunk/extragear/sysadmin/kiosktool/kioskrun.h #1102144:1102145
@@ -170,7 +170,7 @@
bool uploadRemote(const QString &file, const KUrl &dest);
protected:
- KioskRun( QObject* parent = 0 );
+ KioskRun( QWidget* parent = 0 );
~KioskRun();
bool setupRuntimeEnv();
@@ -205,6 +205,7 @@
QString m_kderc;
QString m_localKderc;
KConfig *m_localKdercConfig;
+ QWidget* m_mainWidget;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic