Commit fe58afb0 authored by Martin Straka's avatar Martin Straka

Renamed some function parameters

parent 2d3096d7
......@@ -27,7 +27,7 @@
@interface DocumentPickerController : UIViewController
- (void)openImportDocumentPicker:(NSArray<NSString*>*)allowedUITs;
- (void)openImportDocumentPicker:(NSArray<NSString*>*)allowedUtis;
- (void)openExportDocumentPicker:(NSArray<NSURL*>*)exportUrls;
@end
......@@ -46,9 +46,9 @@
[self presentViewController:documentPicker animated:YES completion:nil];
}
- (void)openImportDocumentPicker:(NSArray<NSString *> *)allowedUITs {
- (void)openImportDocumentPicker:(NSArray<NSString *> *)allowedUtis {
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:allowedUITs inMode:UIDocumentPickerModeImport];
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:allowedUtis inMode:UIDocumentPickerModeImport];
documentPicker.delegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentPicker animated:NO completion:^{
......
......@@ -81,11 +81,11 @@ public:
/*!
* @brief Create and open document picker controller for import.
*
* @param[in] allowedUITs Allowed iOS mime extensions (can be empty).
* @param[in] allowedUtis Allowed iOS mime extensions (can be empty).
* @return True if document picker controller is created and opened.
*/
static
bool openDocumentPickerControllerForImport(const QStringList &allowedUITs);
bool openDocumentPickerControllerForImport(const QStringList &allowedUtis);
/*!
* @brief Move file from app temporary inbox to local app sandbox.
......
......@@ -80,7 +80,7 @@ ICloudIo::ICloudResult ICloudIo::moveFileToCloud(
}
}
bool ICloudIo::openDocumentPickerControllerForImport(const QStringList &allowedUITs)
bool ICloudIo::openDocumentPickerControllerForImport(const QStringList &allowedUtis)
{
static DocumentPickerController *dpc = nil;
if (dpc != nil) {
......@@ -93,14 +93,14 @@ bool ICloudIo::openDocumentPickerControllerForImport(const QStringList &allowedU
if (rootv != nil) {
dpc = [[DocumentPickerController alloc] init];
[rootv addChildViewController:dpc];
if (allowedUITs.isEmpty()) {
if (allowedUtis.isEmpty()) {
[dpc openImportDocumentPicker:@[@"public.data"]];
} else {
// exportFilesPath is not empty so export Document Picker will open
NSMutableArray<NSString*> *nsUITs = [NSMutableArray array];
// covert export file paths to array of nsurl
for (int i = 0; i < allowedUITs.count(); ++i) {
[nsUITs addObject:allowedUITs.at(i).toNSString()];
for (int i = 0; i < allowedUtis.count(); ++i) {
[nsUITs addObject:allowedUtis.at(i).toNSString()];
}
if ([nsUITs count] > 0) {
[dpc openImportDocumentPicker:nsUITs];
......
......@@ -156,7 +156,7 @@ void IosHelper::clearSendAndTmpDirs(void)
}
void IosHelper::openDocumentPickerControllerForImport(enum IosImportAction action,
const QStringList &allowedUITs)
const QStringList &allowedUtis)
{
debugFuncCall();
......@@ -169,13 +169,13 @@ void IosHelper::openDocumentPickerControllerForImport(enum IosImportAction actio
m_importAction = action;
if (!ICloudIo::openDocumentPickerControllerForImport(allowedUITs)) {
if (!ICloudIo::openDocumentPickerControllerForImport(allowedUtis)) {
m_importAction = IosImportAction::IMPORT_NONE;
}
#else /* !Q_OS_IOS */
Q_UNUSED(action);
Q_UNUSED(allowedUITs);
Q_UNUSED(allowedUtis);
#endif /* Q_OS_IOS */
}
......
......@@ -88,11 +88,11 @@ public:
* @brief Create and open document picker controller for import.
*
* @param[in] action Import action.
* @param[in] allowedUITs Allowed iOS mime extensions (can be empty).
* @param[in] allowedUtis Allowed iOS mime extensions (can be empty).
*/
Q_INVOKABLE
void openDocumentPickerControllerForImport(enum IosImportAction action,
const QStringList &allowedUITs);
const QStringList &allowedUtis);
/*!
* @brief Is activated when files have been selected with iOS file picker.
......@@ -153,5 +153,5 @@ private:
enum IosImportAction m_importAction; /*!< Holds import action type. */
};
/* Declare FileIdType to QML. */
/* Declare IosImportAction to QML. */
Q_DECLARE_METATYPE(IosHelper::IosImportAction)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment