[Libreoffice-commits] online.git: kit/ChildSession.cpp
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 2 09:47:27 UTC 2020
kit/ChildSession.cpp | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
New commits:
commit 01509b4087904cacc4f71c6758c13a1920334e1f
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Apr 1 17:51:15 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 2 11:47:09 2020 +0200
Tweak the (normally commented-out) experimentation code a bit
Change-Id: I58b9c83a87e6e07421b5a29c13b3b00034c87a1a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91543
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 1289c862c..54d5350b5 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -930,15 +930,13 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int /*length*/, const Stri
completionHandler:^(NSDictionary<NSFileProviderServiceName,NSFileProviderService *> *services,
NSError *error) {
if (services == nil) {
- LOG_TRC("Could not get file provider services for " << [[docURL absoluteString] UTF8String]);
+ std::cerr << "Could not get file provider services for " << [[docURL absoluteString] UTF8String] << "\n";
} else if ([services count] == 0) {
- LOG_TRC("No file provider services returned for " << [[docURL absoluteString] UTF8String]);
+ std::cerr << "No file provider services returned for " << [[docURL absoluteString] UTF8String] << "\n";
} else {
- LOG_TRC("File provider services for " << [[docURL absoluteString] UTF8String]);
- NSEnumerator *keyEnumerator = [services keyEnumerator];
- NSString *key;
- while ((key = (NSString*)[keyEnumerator nextObject])) {
- LOG_TRC(" " << key);
+ std::cerr << "File provider services for " << [[docURL absoluteString] UTF8String] << ":\n";
+ for (auto key in [services allKeys]) {
+ std::cerr << " " << [(NSString*)key UTF8String] << "\n";
}
}
}];
@@ -947,6 +945,16 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int /*length*/, const Stri
// Alas, this seems to work only for documents on iCloud Drive.
NSError *error;
auto resources = [docURL promisedItemResourceValuesForKeys:@[NSURLUbiquitousItemContainerDisplayNameKey] error:&error];
+ if (resources == nil) {
+ std::cerr << "Could not get ubiquitous container names for " << [[docURL absoluteString] UTF8String] << "\n";
+ } else if ([resources count] == 0) {
+ std::cerr << "No ubiquitous container names for " << [[docURL absoluteString] UTF8String] << "\n";
+ } else {
+ std::cerr << "Ubiquitous container names for " << [[docURL absoluteString] UTF8String] << ":\n";
+ for (auto name in [resources allValues]) {
+ std::cerr << " " << [(NSString*)name UTF8String] << "\n";
+ }
+ }
#endif
NSArray<NSString *> *pathComponents = [docURL pathComponents];
More information about the Libreoffice-commits
mailing list