Re: Can my application, which contains dirty code, become an official kde application?

Sune Vuorela <[email protected]>
Newsgroups gmane.comp.kde.devel.core
Organization pusling.com internet technologies
Message-ID <[email protected]>
On 2024-01-17, Danilo Agostini <[email protected]> wrote:
> It allows the user, through the use of a keyboard shortcut or a dolphin
> servicemenu, to have a quick preview of the files that are shown in the
> folder without having to open the default application.
>
> Similar applications are Gnome Sushi and Quick Look (Mac os).

Isn't this in the similar realm as what we can do with thumbnailers
and/or kparts ?

> Technical Limitations/Defects:
>
> 1) The way it integrates with dolphin is not clean due to dolphin's
> limitations: I currently use dbus to copy the path of the selected file

I'd suggest to fix whatever limitations there is in Dolphin to not  have
to do workarounds.

> 2) The preview of some files (odt,doc,docx,xlsx,etc) is obtained by
> converting the documents to pdf using the "libreoffice --headless
> --nolockcheck --norestore --convert-to pdf" command. This obviously
> requires libreoffice installed on the system and the conversion may fail/be
> slow in some cases.

I don't think this as such is a bad idea except maybe ... doesn't this
negate the whatever speedup you are trying to do with a 'quick preview'
instead of launching the app when you now actually launch the app
headless in the background ?


I just browsed around in the code and I do think there is quite some
cleanups to do. I'm sure cppcheck, clazy, clang-tidy and other static
analyzers can find a lot.

oh. Don't use rand(). And consider using something to create a temporary
working directory rather than work directly in tmpdir. 

Some members are m_ prefixed. others aren't. Some member vars shouldn't
be member vars. 
Consider using much more const refs or views.

I'm confused about when you use std::string and QString. It seems to be
a bit random which one you pull out of the tool chest.
And std::thread and QThread.

Why are you using std::filesystem::__cxx11::path ? (Especially the
__cxx11 part)

Also there seems to be a pattern of 
|QString foo;
|foo = someFunction();
Just having 
|QString foo = someFunction();
Is normally easier to work with.


Also note that we are about to move everything to Qt6/KF6; This seems to
be stuck on quite ancient frameworks and qt versions.

/Sune
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.