Commit 5db71adc authored by David Faure's avatar David Faure
Browse files

Use KParts::Part instead of ReadOnlyPart. We are not opening a document, just...

Use KParts::Part instead of ReadOnlyPart. We are not opening a document, just providing a XMLGUI-based plugin.
parent 770228b0
......@@ -78,7 +78,7 @@ KAddressBookPlugin::~KAddressBookPlugin()
void KAddressBookPlugin::slotNewContact()
{
KParts::ReadOnlyPart *part = createPart();
KParts::Part *part = createPart();
if (!part) {
return;
}
......@@ -93,7 +93,7 @@ void KAddressBookPlugin::slotNewContact()
void KAddressBookPlugin::slotNewContactGroup()
{
KParts::ReadOnlyPart *part = createPart();
KParts::Part *part = createPart();
if (!part) {
return;
}
......@@ -106,9 +106,9 @@ void KAddressBookPlugin::slotNewContactGroup()
QMetaObject::invokeMethod(part, "newGroup");
}
KParts::ReadOnlyPart *KAddressBookPlugin::createPart()
KParts::Part *KAddressBookPlugin::createPart()
{
KParts::ReadOnlyPart *part = loadPart();
KParts::Part *part = loadPart();
if (!part) {
return nullptr;
}
......@@ -143,7 +143,7 @@ QStringList KAddressBookPlugin::invisibleToolbarActions() const
void KAddressBookPlugin::shortcutChanged()
{
KParts::ReadOnlyPart *localPart = part();
KParts::Part *localPart = part();
if (localPart) {
if (localPart->metaObject()->indexOfMethod("updateQuickSearchText()") == -1) {
qCWarning(KADDRESSBOOKPLUGIN_LOG) << "KAddressBook part is missing slot updateQuickSearchText()";
......
......@@ -55,7 +55,7 @@ public:
void shortcutChanged() override;
protected:
KParts::ReadOnlyPart *createPart() override;
KParts::Part *createPart() override;
private:
void slotNewContact();
......
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