mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
[dolphin] Don't rely on QByteArray -> const char * implicit conversion
Signed-off-by: Kevin Ottens <ervin@kde.org>
This commit is contained in:
parent
ea101adbf4
commit
17b913c3a7
2 changed files with 6 additions and 6 deletions
|
@ -77,12 +77,12 @@ public:
|
|||
action->setDisabled(true);
|
||||
auto call = args.value(1).toLatin1();
|
||||
connect(action, &QAction::triggered, [helper, call, files] {
|
||||
helper->sendCommand(QByteArray(call + ":" + files + "\n"));
|
||||
helper->sendCommand(QByteArray(call + ":" + files + "\n").constData());
|
||||
});
|
||||
}
|
||||
});
|
||||
QTimer::singleShot(100, &loop, &QEventLoop::quit); // add a timeout to be sure we don't freeze dolphin
|
||||
helper->sendCommand(QByteArray("GET_MENU_ITEMS:" + files + "\n"));
|
||||
helper->sendCommand(QByteArray("GET_MENU_ITEMS:" + files + "\n").constData());
|
||||
loop.exec(QEventLoop::ExcludeUserInputEvents);
|
||||
disconnect(con);
|
||||
if (menu->actions().isEmpty()) {
|
||||
|
@ -111,20 +111,20 @@ public:
|
|||
|
||||
auto shareAction = menu->addAction(helper->shareActionTitle());
|
||||
connect(shareAction, &QAction::triggered, this, [localFile, helper] {
|
||||
helper->sendCommand(QByteArray("SHARE:" + localFile.toUtf8() + "\n"));
|
||||
helper->sendCommand(QByteArray("SHARE:" + localFile.toUtf8() + "\n").constData());
|
||||
});
|
||||
|
||||
if (!helper->copyPrivateLinkTitle().isEmpty()) {
|
||||
auto copyPrivateLinkAction = menu->addAction(helper->copyPrivateLinkTitle());
|
||||
connect(copyPrivateLinkAction, &QAction::triggered, this, [localFile, helper] {
|
||||
helper->sendCommand(QByteArray("COPY_PRIVATE_LINK:" + localFile.toUtf8() + "\n"));
|
||||
helper->sendCommand(QByteArray("COPY_PRIVATE_LINK:" + localFile.toUtf8() + "\n").constData());
|
||||
});
|
||||
}
|
||||
|
||||
if (!helper->emailPrivateLinkTitle().isEmpty()) {
|
||||
auto emailPrivateLinkAction = menu->addAction(helper->emailPrivateLinkTitle());
|
||||
connect(emailPrivateLinkAction, &QAction::triggered, this, [localFile, helper] {
|
||||
helper->sendCommand(QByteArray("EMAIL_PRIVATE_LINK:" + localFile.toUtf8() + "\n"));
|
||||
helper->sendCommand(QByteArray("EMAIL_PRIVATE_LINK:" + localFile.toUtf8() + "\n").constData());
|
||||
});
|
||||
}
|
||||
return { menuaction };
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
QDir localPath(url.toLocalFile());
|
||||
const QByteArray localFile = localPath.canonicalPath().toUtf8();
|
||||
|
||||
helper->sendCommand(QByteArray("RETRIEVE_FILE_STATUS:" + localFile + "\n"));
|
||||
helper->sendCommand(QByteArray("RETRIEVE_FILE_STATUS:" + localFile + "\n").constData());
|
||||
|
||||
StatusMap::iterator it = m_status.find(localFile);
|
||||
if (it != m_status.constEnd()) {
|
||||
|
|
Loading…
Reference in a new issue