Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2013-11-11 18:20:07 +0400
committerDaniel Molkentin <danimo@owncloud.com>2013-11-11 18:20:07 +0400
commit406ed5a0c07412da38ddcdf533d054b81b23152d (patch)
tree59f49649154c97c8988c62f0722253ad745cef21 /src/mirall/folderwizard.cpp
parentd5081f432855efb01054fceb3d1bc6b32580b0e9 (diff)
Make new folder wizard work again
Diffstat (limited to 'src/mirall/folderwizard.cpp')
-rw-r--r--src/mirall/folderwizard.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mirall/folderwizard.cpp b/src/mirall/folderwizard.cpp
index 99bbc38f3..b4a8f69d7 100644
--- a/src/mirall/folderwizard.cpp
+++ b/src/mirall/folderwizard.cpp
@@ -199,21 +199,24 @@ void FolderWizardTargetPage::slotAddRemoteFolder()
dlg->setAttribute(Qt::WA_DeleteOnClose);
}
-void FolderWizardTargetPage::slotCreateRemoteFolder(QString folder)
+void FolderWizardTargetPage::slotCreateRemoteFolder(const QString &folder)
{
if( folder.isEmpty() ) return;
MkColJob *job = new MkColJob(AccountManager::instance()->account(), folder, this);
/* check the owncloud configuration file and query the ownCloud */
- connect(job, SIGNAL(finished()), SLOT(slotCreateRemoteFolderFinished()));
+ connect(job, SIGNAL(finished(QNetworkReply::NetworkError)),
+ SLOT(slotCreateRemoteFolderFinished(QNetworkReply::NetworkError)));
connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotHandleNetworkError(QNetworkReply*)));
}
-void FolderWizardTargetPage::slotCreateRemoteFolderFinished()
+void FolderWizardTargetPage::slotCreateRemoteFolderFinished(QNetworkReply::NetworkError error)
{
- qDebug() << "** webdav mkdir request finished";
- showWarn(tr("Folder was successfully created on %1.").arg(Theme::instance()->appNameGUI()));
- slotRefreshFolders();
+ if (error == QNetworkReply::NoError) {
+ qDebug() << "** webdav mkdir request finished";
+ showWarn(tr("Folder was successfully created on %1.").arg(Theme::instance()->appNameGUI()));
+ slotRefreshFolders();
+ }
}
void FolderWizardTargetPage::slotHandleNetworkError(QNetworkReply *reply)
@@ -234,11 +237,11 @@ static QTreeWidgetItem* findFirstChild(QTreeWidgetItem *parent, const QString& t
return 0;
}
-static void recursiveInsert(QTreeWidgetItem *parent, QStringList pathTrail, QString path)
+void FolderWizardTargetPage::recursiveInsert(QTreeWidgetItem *parent, QStringList pathTrail, QString path)
{
QFileIconProvider prov;
QIcon folderIcon = prov.icon(QFileIconProvider::Folder);
- if (pathTrail.size() == 0) {
+ if (pathTrail.size() == 0) {
if (path.endsWith('/')) {
path.chop(1);
}
@@ -259,7 +262,7 @@ static void recursiveInsert(QTreeWidgetItem *parent, QStringList pathTrail, QStr
}
}
-void FolderWizardTargetPage::slotUpdateDirectories(QStringList list)
+void FolderWizardTargetPage::slotUpdateDirectories(const QStringList &list)
{
QString webdavFolder = QUrl(AccountManager::instance()->account()->davUrl()).path();
@@ -283,7 +286,7 @@ void FolderWizardTargetPage::slotUpdateDirectories(QStringList list)
void FolderWizardTargetPage::slotRefreshFolders()
{
LsColJob *job = new LsColJob(AccountManager::instance()->account(), "/", this);
- connect(job, SIGNAL(directoryListingUpdated(QStringList)),
+ connect(job, SIGNAL(directoryListing(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
_ui.folderTreeWidget->clear();
}
@@ -292,7 +295,7 @@ void FolderWizardTargetPage::slotItemExpanded(QTreeWidgetItem *item)
{
QString dir = item->data(0, Qt::UserRole).toString();
LsColJob *job = new LsColJob(AccountManager::instance()->account(), dir, this);
- connect(job, SIGNAL(directoryListingUpdated(QStringList)),
+ connect(job, SIGNAL(directoryListing(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
}