+#ifndef IS_KCM
+ DolphinMainWindow *mainWindow = nullptr;
+ const auto topLevelsWidgets = QApplication::topLevelWidgets();
+ for (const auto widget : topLevelsWidgets) {
+ mainWindow = qobject_cast<DolphinMainWindow *>(widget);
+ if (mainWindow) {
+ break;
+ }
+ }
+
+ if (mainWindow) {
+ m_url = mainWindow->activeViewContainer()->url();
+ }
+#endif