connect(_tray.data(), &Systray::shutdown,
this, &ownCloudGui::slotShutdown);
connect(_tray.data(), &Systray::openShareDialog,
- this, [=](const QString &sharePath, const QString &localPath, const bool publicLink = false)
- {
-
+ this, [=](const QString &sharePath, const QString &localPath, bool publicLink = false) {
if (publicLink) {
- this->slotShowShareDialog(sharePath,localPath, ShareDialogStartPage::PublicLinks);
+ slotShowShareDialog(sharePath,localPath, ShareDialogStartPage::PublicLinks);
} else {
- this->slotShowShareDialog(sharePath,localPath, ShareDialogStartPage::UsersAndGroups);
+ slotShowShareDialog(sharePath,localPath, ShareDialogStartPage::UsersAndGroups);
}
});
Q_INVOKABLE void hideWindow();
Q_INVOKABLE void showWindow();
- Q_INVOKABLE void openShareDialog(const QString &sharepath, const QString &localPath);
+ Q_INVOKABLE void openShareDialog(const QString &sharePath, const QString &localPath);
public slots:
void slotNewUserSelected();
QHash<int, QByteArray> ActivityListModel::roleNames() const
{
QHash<int, QByteArray> roles;
- roles[DisplayPathRole] = "displaypath";
+ roles[DisplayPathRole] = "displayPath";
roles[PathRole] = "path";
- roles[AbsolutePathRole] = "abspath";
+ roles[AbsolutePathRole] = "absolutePath";
roles[LinkRole] = "link";
roles[MessageRole] = "message";
roles[ActionRole] = "type";
}
return QString();
case AbsolutePathRole: {
- auto folder = FolderMan::instance()->folder(a._folder);
+ const auto folder = FolderMan::instance()->folder(a._folder);
QString relPath(a._file);
if (!a._file.isEmpty()) {
if (folder) {
relPath.prepend(folder->remotePath());
}
list = FolderMan::instance()->findFileInLocalFolders(relPath, ast->account());
- if (list.count() > 0) {
- return QString(list.at(0));
+ if (!list.empty()) {
+ return list.at(0);
} else {
qWarning("File not local folders while processing absolute path request.");
return QString();
spacing: 0\r
\r
MouseArea {\r
- enabled: (path !== "") ? true : false\r
+ enabled: (path !== "")\r
anchors.left: activityItem.left\r
anchors.right: ((shareButton.visible) ? shareButton.left : activityItem.right)\r
height: parent.height\r
\r
Text {\r
id: activityTextInfo\r
- text: (type === "Activity" || type === "Sync") ? displaypath : ((type === "File") ? subject : message)\r
+ text: (type === "Activity" || type === "Sync") ? displayPath : ((type === "File") ? subject : message)\r
height: (text === "") ? 0 : activityTextTitle.height\r
width: Style.activityLabelBaseWidth + ((path === "") ? activityItem.height : 0) + ((link === "") ? activityItem.height : 0) - 8\r
elide: Text.ElideRight\r
ToolTip.visible: hovered\r
ToolTip.delay: 1000\r
ToolTip.text: qsTr("Open share dialog")\r
- onClicked: systrayBackend.openShareDialog(displaypath,abspath)\r
+ onClicked: systrayBackend.openShareDialog(displayPath,absolutePath)\r
}\r
}\r
\r