xdg-open doesn't seem to work anymore on SFOS 4.4
This commit is contained in:
parent
1f589cc2da
commit
679426abc1
3 changed files with 9 additions and 8 deletions
|
@ -40,6 +40,13 @@ ApplicationWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: tdLibWrapper
|
||||||
|
onOpenFileExternally: {
|
||||||
|
Qt.openUrlExternally(filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AppNotification {
|
AppNotification {
|
||||||
id: appNotification
|
id: appNotification
|
||||||
parent: pageStack.currentPage
|
parent: pageStack.currentPage
|
||||||
|
|
|
@ -1511,14 +1511,7 @@ void TDLibWrapper::copyFileToDownloads(const QString &filePath, bool openAfterCo
|
||||||
void TDLibWrapper::openFileOnDevice(const QString &filePath)
|
void TDLibWrapper::openFileOnDevice(const QString &filePath)
|
||||||
{
|
{
|
||||||
LOG("Open file on device:" << filePath);
|
LOG("Open file on device:" << filePath);
|
||||||
QStringList argumentsList;
|
emit openFileExternally(filePath);
|
||||||
argumentsList.append(filePath);
|
|
||||||
bool successfullyStarted = QProcess::startDetached("xdg-open", argumentsList);
|
|
||||||
if (successfullyStarted) {
|
|
||||||
LOG("Successfully opened file " << filePath);
|
|
||||||
} else {
|
|
||||||
LOG("Error opening file " << filePath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDLibWrapper::controlScreenSaver(bool enabled)
|
void TDLibWrapper::controlScreenSaver(bool enabled)
|
||||||
|
|
|
@ -311,6 +311,7 @@ signals:
|
||||||
void messageInteractionInfoUpdated(qlonglong chatId, qlonglong messageId, const QVariantMap &updatedInfo);
|
void messageInteractionInfoUpdated(qlonglong chatId, qlonglong messageId, const QVariantMap &updatedInfo);
|
||||||
void okReceived(const QString &request);
|
void okReceived(const QString &request);
|
||||||
void sessionsReceived(const QVariantList &sessions);
|
void sessionsReceived(const QVariantList &sessions);
|
||||||
|
void openFileExternally(const QString &filePath);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void handleVersionDetected(const QString &version);
|
void handleVersionDetected(const QString &version);
|
||||||
|
|
Loading…
Reference in a new issue