Android: allow file dialog to use remote locations
Allow the native file dialog to use remote locations like OneDrive, Google Drive, etc. Pick-to: 5.15 Change-Id: I67027f0da8e6bd759a4936e03b6c9e95f3f90e1a Reviewed-by: Andy Shaw <andy.shaw@qt.io>bb10
parent
4edcf3ddb8
commit
fbd0e66705
|
|
@ -118,14 +118,6 @@ void QAndroidPlatformFileDialogHelper::takePersistableUriPermission(const QJNIOb
|
|||
uri.object(), modeFlags);
|
||||
}
|
||||
|
||||
void QAndroidPlatformFileDialogHelper::setLocalFilesOnly(bool localOnly)
|
||||
{
|
||||
const QJNIObjectPrivate extraLocalOnly = QJNIObjectPrivate::getStaticObjectField(
|
||||
JniIntentClass, "EXTRA_LOCAL_ONLY", "Ljava/lang/String;");
|
||||
m_intent.callObjectMethod("putExtra", "(Ljava/lang/String;Z)Landroid/content/Intent;",
|
||||
extraLocalOnly.object(), localOnly);
|
||||
}
|
||||
|
||||
void QAndroidPlatformFileDialogHelper::setIntentTitle(const QString &title)
|
||||
{
|
||||
const QJNIObjectPrivate extraTitle = QJNIObjectPrivate::getStaticObjectField(
|
||||
|
|
@ -237,7 +229,6 @@ bool QAndroidPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::Win
|
|||
}
|
||||
|
||||
setIntentTitle(options()->windowTitle());
|
||||
setLocalFilesOnly(true);
|
||||
|
||||
QtAndroidPrivate::registerActivityResultListener(this);
|
||||
m_activity.callMethod<void>("startActivityForResult", "(Landroid/content/Intent;I)V",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ public:
|
|||
private:
|
||||
QJNIObjectPrivate getFileDialogIntent(const QString &intentType);
|
||||
void takePersistableUriPermission(const QJNIObjectPrivate &uri);
|
||||
void setLocalFilesOnly(bool localOnly);
|
||||
void setIntentTitle(const QString &title);
|
||||
void setOpenableCategory();
|
||||
void setAllowMultipleSelections(bool allowMultiple);
|
||||
|
|
|
|||
Loading…
Reference in New Issue