- "<para>This line describes the location of the files and folders "
- "displayed below.</para><para>The name of the currently viewed "
- "folder can be read at the very right. To the left of it is the "
- "name of the folder that contains it. The whole line is called "
- "the <emphasis>path</emphasis> to the current location because "
- "following these folders from left to right leads here.</para>"
- "<para>This interactive path "
- "is more powerful than one would expect. To learn more "
- "about the basic and advanced features of the location bar "
- "<link url='help:/dolphin/location-bar.html'>click here</link>. "
- "This will open the dedicated page in the Handbook.</para>"));
-
- s_instances.push_front(this);
-
- connect(this, &DolphinUrlNavigator::returnPressed,
- this, &DolphinUrlNavigator::slotReturnPressed);
- connect(editor(), &KUrlComboBox::completionModeChanged,
- this, DolphinUrlNavigator::setCompletionMode);
+ "<para>This describes the location of the files and folders "
+ "displayed below.</para><para>The name of the currently viewed "
+ "folder can be read at the very right. To the left of it is the "
+ "name of the folder that contains it. The whole line is called "
+ "the <emphasis>path</emphasis> to the current location because "
+ "following these folders from left to right leads here.</para>"
+ "<para>This interactive path "
+ "is more powerful than one would expect. To learn more "
+ "about the basic and advanced features of the location bar "
+ "<link url='help:/dolphin/location-bar.html'>click here</link>. "
+ "This will open the dedicated page in the Handbook.</para>"));
+
+ DolphinUrlNavigatorsController::registerDolphinUrlNavigator(this);
+
+ connect(this, &KUrlNavigator::returnPressed, this, &DolphinUrlNavigator::slotReturnPressed);
+
+ auto readOnlyBadge = new QLabel();
+ readOnlyBadge->setPixmap(QIcon::fromTheme(QStringLiteral("emblem-readonly")).pixmap(12, 12));
+ readOnlyBadge->setToolTip(i18nc("@info:tooltip of a 'locked' symbol in url navigator", "This folder is not writable for you."));
+ readOnlyBadge->hide();
+ setBadgeWidget(readOnlyBadge);