use new public API to open an edit locally URL
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 31 Oct 2022 09:28:47 +0000 (10:28 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 31 Oct 2022 09:28:47 +0000 (10:28 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/cocoainitializer_mac.mm

index 155aa8b1619efcb00544bcbf5691ba162228896a..5ddb985e2c0802e47b4e3b60dd9ac4493979fff2 100644 (file)
@@ -18,6 +18,7 @@
 #import <AppKit/NSApplication.h>
 
 #include "application.h"
+#include "editlocallymanager.h"
 
 /* In theory, we should be able to just capture QFileOpenEvents
  * when we open our custom URLs in our Application class and be
@@ -59,7 +60,7 @@
     NSURL* url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]];
     const auto app = qobject_cast<OCC::Application *>(QApplication::instance());
     const auto qtUrl = QUrl::fromNSURL(url);
-    app->handleEditLocally(qtUrl);
+    EditLocallyManager::instance()->editLocally(qtUrl);
 }
 
 @end