app/sources/shareUtils/platformshareutils.cpp
Dorian Zedler 0b8c253564
- fix sharing callback
- some more minor adjustments
2021-06-20 16:51:31 +02:00

41 lines
1.7 KiB
C++

#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;
}
QString PlatformShareUtils::getTemporaryFileLocationPath() {
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
}
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? ";
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
}
void PlatformShareUtils::viewFile(const QString &filePath, const QString &title, const QString &mimeType, const int &requestId) {
qDebug() << filePath << " - " << title << " requestId: " << requestId << " - " << mimeType << "altImpl? ";
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
}
void PlatformShareUtils::editFile(const QString &filePath, const QString &title, const QString &mimeType, const int &requestId) {
qDebug() << filePath << " - " << title << " requestId: " << requestId << " - " << mimeType << "altImpl? ";
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
}
void PlatformShareUtils::checkPendingIntents(const QString workingDirPath) {
qDebug() << "checkPendingIntents " << workingDirPath;
}