2021-06-19 09:06:52 +02:00
|
|
|
#include "shareUtils/platformshareutils.h"
|
|
|
|
|
|
|
|
PlatformShareUtils::PlatformShareUtils(QObject *parent) : QObject(parent)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PlatformShareUtils::~PlatformShareUtils() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bool PlatformShareUtils::checkMimeTypeView(const QString &mimeType) {
|
|
|
|
qDebug() << "check view for " << mimeType;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
bool PlatformShareUtils::checkMimeTypeEdit(const QString &mimeType) {
|
|
|
|
qDebug() << "check edit for " << mimeType;
|
|
|
|
return true;
|
|
|
|
}
|
2021-06-20 16:51:31 +02:00
|
|
|
QString PlatformShareUtils::getTemporaryFileLocationPath() {
|
|
|
|
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
|
|
|
}
|
2021-06-19 09:06:52 +02:00
|
|
|
void PlatformShareUtils::shareText(const QString &text) {
|
|
|
|
qDebug() << text;
|
|
|
|
}
|
|
|
|
void PlatformShareUtils::sendFile(const QString &filePath, const QString &title, const QString &mimeType, const int &requestId) {
|
|
|
|
qDebug() << filePath << " - " << title << "requestId " << requestId << " - " << mimeType << "altImpl? ";
|
2021-06-20 16:51:31 +02:00
|
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
|
2021-06-19 09:06:52 +02:00
|
|
|
}
|
|
|
|
void PlatformShareUtils::viewFile(const QString &filePath, const QString &title, const QString &mimeType, const int &requestId) {
|
|
|
|
qDebug() << filePath << " - " << title << " requestId: " << requestId << " - " << mimeType << "altImpl? ";
|
2021-06-20 16:51:31 +02:00
|
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
|
2021-06-19 09:06:52 +02:00
|
|
|
}
|
|
|
|
void PlatformShareUtils::editFile(const QString &filePath, const QString &title, const QString &mimeType, const int &requestId) {
|
|
|
|
qDebug() << filePath << " - " << title << " requestId: " << requestId << " - " << mimeType << "altImpl? ";
|
2021-06-20 16:51:31 +02:00
|
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
|
2021-06-19 09:06:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlatformShareUtils::checkPendingIntents(const QString workingDirPath) {
|
|
|
|
qDebug() << "checkPendingIntents " << workingDirPath;
|
|
|
|
}
|