Bug 431126 - KNotes cannot be configured using the GUI
Summary: KNotes cannot be configured using the GUI
Status: RESOLVED FIXED
Alias: None
Product: knotes
Classification: Applications
Component: general (show other bugs)
Version: 5.16.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-03 23:05 UTC by Dante Igashu
Modified: 2021-01-10 16:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.2


Attachments
A screenshot showing the problem. (75.12 KB, image/png)
2021-01-03 23:05 UTC, Dante Igashu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dante Igashu 2021-01-03 23:05:40 UTC
Created attachment 134524 [details]
A screenshot showing the problem.

SUMMARY
Recently, apparently after the last December kernel update (or at least that's when I noticed it, as I had just installed it a couple of days before), I am unable to configure Knotes using the GUI (I don't know how to configure it manually). All I get is what is shown in the attachment. Doesn't matter what option I try, I get the same message.It happens in the Arch Linux Kernel (using EnvevourOS) and it also happens in the Manjaro's ARM kernel. In ARM (Manjaro) the error didn't happen before they released the lastest kernel update from 2020 but it does now that it also is using the latest kernel (not sure if it is actually a problem related to the kernel though).

STEPS TO REPRODUCE
1. Right click Knotes
2. Select "Configure Knotes..."
3. Select any of the available options.

OBSERVED RESULT
Cannot configure anything.There are no options available.

EXPECTED RESULT
Being able to configure everything in the Knotes' settings menu.

SOFTWARE/OS VERSIONS
Linux: 5.10.4-arch2-1 64-bit/(I will check which Manjaro ARM Kernel version I am using)
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
The notes seem to work just fine but the options to configure them are unavailable.
Comment 1 Dante Igashu 2021-01-03 23:10:02 UTC
The archive "/usr/lib/qt/plugins/kcm_knote.so" is there but it still doesn't work. Maybe just a slight problem with a configuration in the package?.
Comment 2 Justin Zobel 2021-01-03 23:32:17 UTC
Confirmed on:
Operating System: Solus 4.1
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2
Kernel Version: 5.10.4-165.current
Comment 3 Laurent Montel 2021-01-04 06:02:28 UTC
I rebuild it here and it works fine.
Perhaps a distro problem here.
Regards
Comment 4 Dante Igashu 2021-01-04 23:51:12 UTC
Hello! :D
Or maybe a kernel thing?
Justin Zobel confirmed the issue on Solus OS.
By the way, which distro are you using Laurent Montel?
Are you using the latest stable kernel? (5.10.4 apparently)
Comment 5 Antonio Rojas 2021-01-06 19:42:55 UTC
Not a distro problem (and nothing to do with the kernel), this is caused by https://invent.kde.org/pim/knotes/-/commit/0e470b8fc8339da31050400e415f75ba80ef6698
Comment 6 Laurent Montel 2021-01-06 20:46:03 UTC
(In reply to Antonio Rojas from comment #5)
> Not a distro problem (and nothing to do with the kernel), this is caused by
> https://invent.kde.org/pim/knotes/-/commit/
> 0e470b8fc8339da31050400e415f75ba80ef6698

configdialog/knoteconfigdialog.cpp is exported:
"class KNOTES_EXPORT KNoteConfigDialog : public KCMultiDialog"
it's includes in 

set(libknotesprivate_config_lib_SRCS
    configdialog/knotesimpleconfigdialog.cpp
    configdialog/knoteconfigdialog.cpp
    configdialog/knotedisplayconfigwidget.cpp
    configdialog/knoteeditorconfigwidget.cpp
    configdialog/knotecollectionconfigwidget.cpp
    )

set(libknotesprivate_lib_SRCS
    ${libknotesprivate_config_lib_SRCS}
    ${libknotesprivate_print_lib_SRCS}
    knoteedit.cpp
    knotes_debug.cpp
    notes/knotedisplaysettings.cpp
    utils/knoteutils.cpp
    notes/knoteinterface.cpp
    notes/knotesmigrateapplication.cpp
    finddialog/knotefinddialog.cpp
    )

add_library(knotesprivate ${libknotesprivate_lib_SRCS} ${libknotesprivate_kcfg_lib_SRCS} )

target_link_libraries(kcm_knote knotesprivate KF5::AkonadiCore  KF5::KCMUtils KF5::NewStuff notesharedprivate KF5::AkonadiNotes KF5::PimCommon KF5::I18n KF5::AkonadiWidgets)


(and it builds/works fine from a fresh build).

And on windows it complains as it's in already in lib.

So perhaps there is an explaination but for the moment I didn't see it.
Comment 7 Antonio Rojas 2021-01-07 19:23:47 UTC
(In reply to Laurent Montel from comment #6)
> So perhaps there is an explaination but for the moment I didn't see it.

The problem is that the linker will remove the libknotesprivate link from kcm_knote.so when using --as-needed (as it's done in most distros to prevent massive overlinking) because it doesn't use any of its public symbols.
Comment 8 Laurent Montel 2021-01-07 19:32:35 UTC
(In reply to Antonio Rojas from comment #7)
> (In reply to Laurent Montel from comment #6)
> > So perhaps there is an explaination but for the moment I didn't see it.
> 
> The problem is that the linker will remove the libknotesprivate link from
> kcm_knote.so when using --as-needed (as it's done in most distros to prevent
> massive overlinking) because it doesn't use any of its public symbols.

class KNOTES_EXPORT KNoteConfigDialog it's exported so it's public symbol for me no ?
Comment 9 Antonio Rojas 2021-01-07 19:38:52 UTC
(In reply to Laurent Montel from comment #8)
> class KNOTES_EXPORT KNoteConfigDialog it's exported so it's public symbol
> for me no ?

But it's not used in any of the kcm_knote sources:

$ grep KNoteConfigDialog configdialog/knotedisplayconfigwidget.cpp configdialog/knoteeditorconfigwidget.cpp configdialog/knotecollectionconfigwidget.cpp

[nothing]
Comment 10 Laurent Montel 2021-01-08 06:18:37 UTC
(In reply to Antonio Rojas from comment #9)
> (In reply to Laurent Montel from comment #8)
> > class KNOTES_EXPORT KNoteConfigDialog it's exported so it's public symbol
> > for me no ?
> 
> But it's not used in any of the kcm_knote sources:
> 
> $ grep KNoteConfigDialog configdialog/knotedisplayconfigwidget.cpp
> configdialog/knoteeditorconfigwidget.cpp
> configdialog/knotecollectionconfigwidget.cpp
> 
> [nothing]

so knotesprivate is not useful and KNoteConfigDialog is not useful here :) 
So it's not useful => remove by distro/compile (so not a knotes bugs as if I readd it it will failed on windows) but it's useful :)
It's fun.

For sure there is a problem but not readding this file as it breaks compile on windows.
Comment 11 Laurent Montel 2021-01-08 06:20:47 UTC
extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_display(QWidget *parent)
{
    return new KNoteDisplayConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_collection(QWidget *parent)
{
    return new KNoteCollectionConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_editor(QWidget *parent)
{
    return new KNoteEditorConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_action(QWidget *parent)
{
    return new NoteShared::NoteActionConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_network(QWidget *parent)
{
    return new NoteShared::NoteNetworkConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_print(QWidget *parent)
{
    return new KNotePrintConfig(parent);
}
}

extern "C"
{
Q_DECL_EXPORT KCModule *create_knote_config_misc(QWidget *parent)
{
    return new KNoteMiscConfig(parent);
}
}

in KNoteConfigDialog.cpp
so --as-needed remove libknoteprivate but it needs for it.

I will move these line outside this file.
Comment 12 Justin Zobel 2021-01-08 08:11:35 UTC
Is it possible to bring the versioning of KNotes in line with other KDE Applications?
Comment 13 Laurent Montel 2021-01-08 08:48:08 UTC
(In reply to Justin Zobel from comment #12)
> Is it possible to bring the versioning of KNotes in line with other KDE
> Applications?

it will be release with 20.12.2
Comment 14 Antonio Rojas 2021-01-08 09:46:42 UTC
All good now, thanks for the quick fix
Comment 15 Laurent Montel 2021-01-08 10:44:06 UTC
(In reply to Antonio Rojas from comment #14)
> All good now, thanks for the quick fix

Thanks for confirming it.
Regards
Comment 16 Dante Igashu 2021-01-10 04:41:30 UTC
Great! That was fast! :D
Thanks guys! The menu works now, but, now that I am able to customize my new notes, I've noticed a "deadly" bug and an annoying bug. The deadly bug deleted my lonely note, or the contents in it actually, after turning the computer off and, the next day, on again, all I had there was just gone. The second bug, the annoying one, deletes the customized name for my note, kind of often.
The question here is, should I open a new bug report for each of those, or both (or more if I find more in the next few days) in one report?.
Cheers! :D
Comment 17 Christoph Feck 2021-01-10 16:13:29 UTC
Yes, please report each remaining issue with a separate ticket.