Commit fe58afb0 authored by Martin Straka's avatar Martin Straka

Renamed some function parameters

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