Commit cfd27b55 authored by Allen Winter's avatar Allen Winter

-Wunused

parent 70fa09e9
......@@ -42,7 +42,6 @@ StorageAuthViewWidget::StorageAuthViewWidget(QWidget *parent)
StorageAuthViewWidget::~StorageAuthViewWidget()
{
}
void StorageAuthViewWidget::setUrl(const QUrl &url)
......@@ -57,5 +56,6 @@ void StorageAuthViewWidget::slotLoadStarted()
void StorageAuthViewWidget::slotLoadFinished(bool success)
{
Q_UNUSED(success);
mProgressBar->hide();
}
......@@ -522,25 +522,29 @@ void BoxJob::shareLink(const QString &root, const QString &fileId)
void BoxJob::parseDeleteFolder(const QString &data)
{
/*
#if 0
QJson::Parser parser;
bool ok;
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG)<<" info"<<info;
*/
#else
Q_UNUSED(data);
#endif
Q_EMIT deleteFolderDone(QString());
}
void BoxJob::parseDeleteFile(const QString &data)
{
/*
#if 0
QJson::Parser parser;
bool ok;
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG)<<" info"<<info;
*/
#else
Q_UNUSED(data);
#endif
Q_EMIT deleteFileDone(QString());
}
......@@ -552,6 +556,8 @@ void BoxJob::parseCreateServiceFolder(const QString &data)
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG) << " info" << info;
#else
Q_UNUSED(data);
#endif
Q_EMIT actionFailed(QStringLiteral("Not Implemented"));
deleteLater();
......
......@@ -707,6 +707,7 @@ void DropBoxJob::parseListFolder(const QString &data)
void DropBoxJob::parseDownLoadFile(const QString &data)
{
Q_UNUSED(data);
//qCDebug(PIMCOMMON_LOG)<<" data "<<data;
Q_EMIT downLoadFileDone(QString());
deleteLater();
......
......@@ -306,54 +306,70 @@ void HubicJob::refreshToken()
void HubicJob::deleteFile(const QString &filename)
{
Q_UNUSED(filename);
mActionType = PimCommon::StorageServiceAbstract::DeleteFileAction;
mError = false;
}
void HubicJob::deleteFolder(const QString &foldername)
{
Q_UNUSED(foldername);
mActionType = PimCommon::StorageServiceAbstract::DeleteFolderAction;
mError = false;
}
void HubicJob::renameFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::RenameFolderAction;
mError = false;
}
void HubicJob::renameFile(const QString &oldName, const QString &newName)
{
Q_UNUSED(oldName);
Q_UNUSED(newName);
mActionType = PimCommon::StorageServiceAbstract::RenameFileAction;
mError = false;
}
void HubicJob::moveFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::MoveFolderAction;
mError = false;
}
void HubicJob::moveFile(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::MoveFileAction;
mError = false;
}
void HubicJob::copyFile(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::CopyFileAction;
mError = false;
}
void HubicJob::copyFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::CopyFolderAction;
mError = false;
}
QNetworkReply *HubicJob::uploadFile(const QString &filename, const QString &uploadAsName, const QString &destination)
{
Q_UNUSED(uploadAsName);
Q_UNUSED(destination);
QFile *file = new QFile(filename);
if (file->exists()) {
mActionType = PimCommon::StorageServiceAbstract::UploadFileAction;
......@@ -402,6 +418,8 @@ void HubicJob::listFolder(const QString &folder)
request.setRawHeader("Authorization", "Bearer " + mToken.toLatin1());
QNetworkReply *reply = mNetworkAccessManager->get(request);
connect(reply, static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error), this, &HubicJob::slotError);
#else
Q_UNUSED(folder);
#endif
}
......@@ -420,6 +438,8 @@ void HubicJob::accountInfo()
void HubicJob::createFolder(const QString &foldername, const QString &destination)
{
Q_UNUSED(foldername);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::CreateFolderAction;
mError = false;
}
......@@ -427,31 +447,36 @@ void HubicJob::createFolder(const QString &foldername, const QString &destinatio
void HubicJob::shareLink(const QString &root, const QString &fileId)
{
Q_UNUSED(root);
Q_UNUSED(fileId);
mActionType = PimCommon::StorageServiceAbstract::ShareLinkAction;
mError = false;
}
void HubicJob::parseDeleteFolder(const QString &data)
{
/*
#if 0
QJson::Parser parser;
bool ok;
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG)<<" info"<<info;
*/
#else
Q_UNUSED(data);
#endif
Q_EMIT deleteFolderDone(QString());
}
void HubicJob::parseDeleteFile(const QString &data)
{
/*
#if 0
QJson::Parser parser;
bool ok;
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG)<<" info"<<info;
*/
#else
Q_UNUSED(data);
#endif
Q_EMIT deleteFileDone(QString());
}
......@@ -463,6 +488,8 @@ void HubicJob::parseCreateServiceFolder(const QString &data)
const QMap<QString, QVariant> info = parser.parse(data.toUtf8(), &ok).toMap();
qCDebug(PIMCOMMON_LOG) << " info" << info;
#else
Q_UNUSED(data);
#endif
Q_EMIT actionFailed(QStringLiteral("Not Implemented"));
deleteLater();
......@@ -576,6 +603,9 @@ void HubicJob::parseDownloadFile(const QString &data)
QNetworkReply *HubicJob::downloadFile(const QString &name, const QString &fileId, const QString &destination)
{
Q_UNUSED(name);
Q_UNUSED(fileId);
Q_UNUSED(destination);
mActionType = PimCommon::StorageServiceAbstract::DownLoadFileAction;
mError = false;
#if 0
......@@ -629,4 +659,3 @@ void HubicJob::parseAccessToken(const QString &data)
Q_EMIT authorizationDone(mRefreshToken, mToken, expireInTime);
deleteLater();
}
......@@ -522,6 +522,7 @@ StorageServiceAbstract::Capabilities HubicStorageService::capabilities() const
QString HubicStorageService::fillListWidget(StorageServiceTreeWidget *listWidget, const QVariant &data, const QString &currentFolder)
{
Q_UNUSED(data);
Q_UNUSED(currentFolder);
listWidget->clear();
listWidget->createMoveUpItem();
......@@ -530,16 +531,18 @@ QString HubicStorageService::fillListWidget(StorageServiceTreeWidget *listWidget
QMap<QString, QString> HubicStorageService::itemInformation(const QVariantMap &variantMap)
{
Q_UNUSED(variantMap);
return QMap<QString, QString>();
}
QString HubicStorageService::fileIdentifier(const QVariantMap &variantMap)
{
Q_UNUSED(variantMap);
return QString();
}
QString HubicStorageService::fileShareRoot(const QVariantMap &variantMap)
{
Q_UNUSED(variantMap);
return QString();
}
......@@ -21,96 +21,102 @@ using namespace PimCommon;
StorageServiceInterface::StorageServiceInterface(QObject *parent)
: QObject(parent)
{
}
StorageServiceInterface::~StorageServiceInterface()
{
}
void StorageServiceInterface::downloadFile(const QString &name, const QString &fileId, const QString &destination)
{
Q_UNUSED(name);
Q_UNUSED(fileId);
Q_UNUSED(destination);
}
void StorageServiceInterface::uploadFile(const QString &filename, const QString &uploadAsName, const QString &destination)
{
Q_UNUSED(filename);
Q_UNUSED(uploadAsName);
Q_UNUSED(destination);
}
void StorageServiceInterface::accountInfo()
{
}
void StorageServiceInterface::createFolder(const QString &foldername, const QString &destination)
{
Q_UNUSED(foldername);
Q_UNUSED(destination);
}
void StorageServiceInterface::listFolder(const QString &folder)
{
Q_UNUSED(folder);
}
void StorageServiceInterface::authentication()
{
}
void StorageServiceInterface::shareLink(const QString &root, const QString &path)
{
Q_UNUSED(root);
Q_UNUSED(path);
}
void StorageServiceInterface::createServiceFolder()
{
}
void StorageServiceInterface::deleteFile(const QString &filename)
{
Q_UNUSED(filename);
}
void StorageServiceInterface::deleteFolder(const QString &foldername)
{
Q_UNUSED(foldername);
}
void StorageServiceInterface::renameFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::renameFile(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::moveFile(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::moveFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::copyFile(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::copyFolder(const QString &source, const QString &destination)
{
Q_UNUSED(source);
Q_UNUSED(destination);
}
void StorageServiceInterface::removeConfig()
{
//TODO
}
......@@ -29,10 +29,11 @@ class PimCommon::StorageServiceMenusPrivate
public:
StorageServiceMenusPrivate()
{
}
KActionMenu *menuWithCapability(PimCommon::StorageServicePlugin::Capability mainCapability, const QList<PimCommon::StorageServicePlugin::Capability> &lstCapability, QWidget *parent) const
{
Q_UNUSED(mainCapability);
Q_UNUSED(lstCapability);
KActionMenu *menuService = new KActionMenu(i18n("Storage service"), parent);
if (PimCommon::StorageServicePluginManager::self()->pluginsList().isEmpty()) {
QAction *act = new QAction(i18n("No Storage service configured"), menuService);
......@@ -79,4 +80,3 @@ KActionMenu *StorageServiceMenus::uploadServices(QWidget *parent) const
lstCapability << PimCommon::StorageServicePlugin::UploadFileCapability;
return d->menuWithCapability(PimCommon::StorageServicePlugin::UploadFileCapability, lstCapability, parent);
}
......@@ -154,6 +154,7 @@ void ServiceTestWidget::slotUploadFileDone(const QString &serviceName, const QSt
void ServiceTestWidget::slotListFolderDone(const QString &serviceName, const QVariant &listFolder)
{
Q_UNUSED(listFolder);
mEdit->insertPlainText(serviceName + QLatin1String(" list folder done \n")/*.arg(listFolder)*/);
}
......
......@@ -35,10 +35,10 @@
* Boston, MA 02110-1301, USA.
*/
#include <QUrl>
#include "webdav_url_info.h"
#include "pimcommon_debug.h"
#include "webdav_url_info.h"
#include <QUrl>
using namespace PimCommon;
......@@ -212,6 +212,8 @@ void QWebdavUrlInfo::davParsePropstats(const QString &path, const QDomNodeList &
} else {
setPermissions(0600);
}
#else
Q_UNUSED(foundExecutable);
#endif
if (!isDirectory && !mimeType.isEmpty()) {
setMimeType(mimeType);
......
......@@ -416,6 +416,7 @@ QString WebDavStorageService::fileIdentifier(const QVariantMap &variantMap)
QString WebDavStorageService::fileShareRoot(const QVariantMap &variantMap)
{
Q_UNUSED(variantMap);
return QString();
}
......@@ -552,4 +553,3 @@ bool WebDavStorageService::hasValidSettings() const
{
return true;
}
......@@ -77,6 +77,10 @@ void YouSendItJob::createServiceFolder()
QNetworkReply *YouSendItJob::downloadFile(const QString &name, const QString &fileId, const QString &destination)
{
Q_UNUSED(name);
Q_UNUSED(fileId);
Q_UNUSED(destination);
qCDebug(PIMCOMMON_LOG) << " not implemented";
Q_EMIT actionFailed(QStringLiteral("Not Implemented"));
deleteLater();
......@@ -205,7 +209,10 @@ void YouSendItJob::requestTokenAccess()
QNetworkReply *YouSendItJob::uploadFile(const QString &filename, const QString &uploadAsName, const QString &destination)
{
//FIXME filename
Q_UNUSED(uploadAsName);
Q_UNUSED(destination);
//FIXME use filename
Q_UNUSED(filename);
mActionType = PimCommon::StorageServiceAbstract::UploadFileAction;
mError = false;
QUrl url(mDefaultUrl + QLatin1String("/dpi/v1/folder/file/initUpload"));
......@@ -519,6 +526,7 @@ void YouSendItJob::parseDownloadFile(const QString &data)
void YouSendItJob::parseDeleteFile(const QString &data)
{
Q_UNUSED(data);
Q_EMIT deleteFileDone(QString());
deleteLater();
}
......@@ -534,6 +542,7 @@ void YouSendItJob::parseDeleteFolder(const QString &data)
void YouSendItJob::parseCreateServiceFolder(const QString &data)
{
Q_UNUSED(data);
qCDebug(PIMCOMMON_LOG) << " create service folder not implmented";
Q_EMIT actionFailed(QStringLiteral("Not Implemented"));
deleteLater();
......@@ -651,10 +660,12 @@ void YouSendItJob::startUploadFile(const QString &fileId)
void YouSendItJob::shareLink(const QString &root, const QString &path)
{
Q_UNUSED(root);
Q_UNUSED(path);
mError = false;
mActionType = PimCommon::StorageServiceAbstract::ShareLinkAction;
Q_EMIT actionFailed(QStringLiteral("Not Implemented"));
qCDebug(PIMCOMMON_LOG) << " not implemented";
deleteLater();
}
......@@ -453,11 +453,13 @@ QMap<QString, QString> YouSendItStorageService::itemInformation(const QVariantMa
QString YouSendItStorageService::fileIdentifier(const QVariantMap &variantMap)
{
//TODO
Q_UNUSED(variantMap);
return QString();
}
QString YouSendItStorageService::fileShareRoot(const QVariantMap &variantMap)
{
Q_UNUSED(variantMap);
return QString();
}
......@@ -468,6 +470,7 @@ StorageServiceAbstract::Capabilities YouSendItStorageService::capabilities() con
QString YouSendItStorageService::fillListWidget(StorageServiceTreeWidget *listWidget, const QVariant &data, const QString &currentFolder)
{
Q_UNUSED(data);
Q_UNUSED(currentFolder);
listWidget->clear();
listWidget->createMoveUpItem();
......@@ -537,4 +540,3 @@ QIcon YouSendItStorageService::icon() const
{
return QIcon();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment