mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-04-29 00:02:13 +08:00
ubuntu: use application directory for images
This commit is contained in:
committed by
Steven Gill
parent
6e93ebbf90
commit
8ff4d3f16e
@@ -54,6 +54,16 @@ public slots:
|
||||
|
||||
void onImageSaved(QString path);
|
||||
|
||||
QString generateLocation(const QString &extension) {
|
||||
int i = 1;
|
||||
for (;;++i) {
|
||||
QString path = QString("%1/.local/share/%2/persistent/%3.%4").arg(QDir::homePath())
|
||||
.arg(QCoreApplication::applicationName()).arg(i).arg(extension);
|
||||
|
||||
if (!QFileInfo(path).exists())
|
||||
return path;
|
||||
}
|
||||
}
|
||||
private:
|
||||
bool preprocessImage(QString &path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user