Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d371a8e6 authored by Henrik Fehlauer's avatar Henrik Fehlauer

Rename setTargetUrl to setTargetDirUrl

This change was initially meant to be part of D8785, but had been backed
out due to concerns about breaking source compatibility. Meanwhile, in
D8785#176817 it was determined that SC/BC most likely won't be an issue
in Gwenview because of no other users of the code.

Therefore we now can rename a couple of methods and variables to better
reflect what they are about, improving readability.
parent 4a337249
......@@ -94,7 +94,7 @@ static void copyMoveOrLink(Operation operation, const QList<QUrl>& urlList, QWid
dialog.setOption(QFileDialog::ShowDirsOnly, true);
}
dialog.setDirectoryUrl(contextManager->targetUrl());
dialog.setDirectoryUrl(contextManager->targetDirUrl());
if (!dialog.exec()) {
return;
}
......@@ -121,7 +121,7 @@ static void copyMoveOrLink(Operation operation, const QList<QUrl>& urlList, QWid
if (numberOfImages == 1) {
destUrl = destUrl.adjusted(QUrl::RemoveFilename|QUrl::StripTrailingSlash);
}
contextManager->setTargetUrl(destUrl);
contextManager->setTargetDirUrl(destUrl);
}
static void delOrTrash(KIO::JobUiDelegate::DeletionType deletionType, const QList<QUrl>& urlList, QWidget* parent)
......
......@@ -48,7 +48,7 @@ struct ContextManagerPrivate
QUrl mCurrentUrl;
QUrl mUrlToSelect;
QUrl mTargetUrl;
QUrl mTargetDirUrl;
bool mSelectedFileItemListNeedsUpdate;
QSet<QByteArray> mQueuedSignals;
......@@ -137,12 +137,12 @@ ContextManager::~ContextManager()
void ContextManager::loadConfig()
{
setTargetUrl(QUrl(GwenviewConfig::lastTargetDir()));
setTargetDirUrl(QUrl(GwenviewConfig::lastTargetDir()));
}
void ContextManager::saveConfig() const
{
GwenviewConfig::setLastTargetDir(targetUrl().toString());
GwenviewConfig::setLastTargetDir(targetDirUrl().toString());
}
QItemSelectionModel* ContextManager::selectionModel() const
......@@ -302,15 +302,15 @@ void ContextManager::setUrlToSelect(const QUrl &url)
selectUrlToSelect();
}
QUrl ContextManager::targetUrl() const
QUrl ContextManager::targetDirUrl() const
{
return d->mTargetUrl;
return d->mTargetDirUrl;
}
void ContextManager::setTargetUrl(const QUrl &url)
void ContextManager::setTargetDirUrl(const QUrl &url)
{
GV_RETURN_IF_FAIL(url.isValid());
d->mTargetUrl = url;
d->mTargetDirUrl = url;
}
void ContextManager::slotRowsInserted()
......
......@@ -74,9 +74,9 @@ public:
void setUrlToSelect(const QUrl&);
QUrl targetUrl() const;
QUrl targetDirUrl() const;
void setTargetUrl(const QUrl&);
void setTargetDirUrl(const QUrl&);
Q_SIGNALS:
void currentDirUrlChanged(const QUrl&);
......
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