* [PATCH] kernelshark: Set QApplication::desktopFileName
@ 2022-03-21 22:53 Nicolas Fella
2022-03-22 11:32 ` Yordan Karadzhov
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Fella @ 2022-03-21 22:53 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Nicolas Fella
This is needed for properly associating the window with the desktop file.
This is needed for e.g. showing the correct icon in desktop environments.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
---
src/kernelshark.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/kernelshark.cpp b/src/kernelshark.cpp
index 92bc1f1..c373f54 100644
--- a/src/kernelshark.cpp
+++ b/src/kernelshark.cpp
@@ -56,6 +56,7 @@ int main(int argc, char **argv)
int c;
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setDesktopFileName("kernelshark");
QApplication a(argc, argv);
KsMainWindow ks;
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kernelshark: Set QApplication::desktopFileName
2022-03-21 22:53 [PATCH] kernelshark: Set QApplication::desktopFileName Nicolas Fella
@ 2022-03-22 11:32 ` Yordan Karadzhov
2022-03-22 11:53 ` Nicolas Fella
0 siblings, 1 reply; 4+ messages in thread
From: Yordan Karadzhov @ 2022-03-22 11:32 UTC (permalink / raw)
To: Nicolas Fella, linux-trace-devel
On 22.03.22 г. 0:53 ч., Nicolas Fella wrote:
> This is needed for properly associating the window with the desktop file.
>
> This is needed for e.g. showing the correct icon in desktop environments.
>
> Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
> ---
> src/kernelshark.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/kernelshark.cpp b/src/kernelshark.cpp
> index 92bc1f1..c373f54 100644
> --- a/src/kernelshark.cpp
> +++ b/src/kernelshark.cpp
> @@ -56,6 +56,7 @@ int main(int argc, char **argv)
> int c;
>
> QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
> + QApplication::setDesktopFileName("kernelshark");
Hi Nicolas,
Looking into the Qt documentation, it seems to me that the argument must be the desktop file name without the full path.
And the name of the file is 'kernelshark.desktop'.
Thanks!
Yordan
> QApplication a(argc, argv);
>
> KsMainWindow ks;
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernelshark: Set QApplication::desktopFileName
2022-03-22 11:32 ` Yordan Karadzhov
@ 2022-03-22 11:53 ` Nicolas Fella
2022-03-23 7:37 ` Yordan Karadzhov
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Fella @ 2022-03-22 11:53 UTC (permalink / raw)
To: linux-trace-devel
On 3/22/22 12:32, Yordan Karadzhov wrote:
>
>
> On 22.03.22 г. 0:53 ч., Nicolas Fella wrote:
>> This is needed for properly associating the window with the desktop
>> file.
>>
>> This is needed for e.g. showing the correct icon in desktop
>> environments.
>>
>> Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
>> ---
>> src/kernelshark.cpp | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/src/kernelshark.cpp b/src/kernelshark.cpp
>> index 92bc1f1..c373f54 100644
>> --- a/src/kernelshark.cpp
>> +++ b/src/kernelshark.cpp
>> @@ -56,6 +56,7 @@ int main(int argc, char **argv)
>> int c;
>>
>> QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
>> + QApplication::setDesktopFileName("kernelshark");
>
> Hi Nicolas,
>
> Looking into the Qt documentation, it seems to me that the argument
> must be the desktop file name without the full path. And the name of
> the file is 'kernelshark.desktop'.
Hi,
the .desktop extension is implicit/not needed here. The documentation
says "the _base_ name of the desktop entry for this application"
(emphasis is mine).
Cheers
Nicolas
>
> Thanks!
> Yordan
>
>> QApplication a(argc, argv);
>>
>> KsMainWindow ks;
>> --
>> 2.35.1
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernelshark: Set QApplication::desktopFileName
2022-03-22 11:53 ` Nicolas Fella
@ 2022-03-23 7:37 ` Yordan Karadzhov
0 siblings, 0 replies; 4+ messages in thread
From: Yordan Karadzhov @ 2022-03-23 7:37 UTC (permalink / raw)
To: Nicolas Fella, linux-trace-devel
On 22.03.22 г. 13:53 ч., Nicolas Fella wrote:
> On 3/22/22 12:32, Yordan Karadzhov wrote:
>>
>>
>> On 22.03.22 г. 0:53 ч., Nicolas Fella wrote:
>>> This is needed for properly associating the window with the desktop
>>> file.
>>>
>>> This is needed for e.g. showing the correct icon in desktop
>>> environments.
>>>
>>> Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
>>> ---
>>> src/kernelshark.cpp | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/src/kernelshark.cpp b/src/kernelshark.cpp
>>> index 92bc1f1..c373f54 100644
>>> --- a/src/kernelshark.cpp
>>> +++ b/src/kernelshark.cpp
>>> @@ -56,6 +56,7 @@ int main(int argc, char **argv)
>>> int c;
>>>
>>> QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
>>> + QApplication::setDesktopFileName("kernelshark");
>>
>> Hi Nicolas,
>>
>> Looking into the Qt documentation, it seems to me that the argument
>> must be the desktop file name without the full path. And the name of
>> the file is 'kernelshark.desktop'.
>
> Hi,
>
> the .desktop extension is implicit/not needed here. The documentation
> says "the _base_ name of the desktop entry for this application"
> (emphasis is mine).
>
Hi Nicolas,
Thanks a lot for clarifying this!
I will take the patch, but I want to ask you to do one minor improvement first. I do not like that the name of the
desktop file is hard-coded. It will be better if we can get it directly from the CMAKE build. You will have to add a
#cmakedefine for KS_APP_NAME in build/deff.h.cmake and then used this when calling setDesktopFileName().
cheers,
Yordan
> Cheers
>
> Nicolas
>
>>
>> Thanks!
>> Yordan
>>
>>> QApplication a(argc, argv);
>>>
>>> KsMainWindow ks;
>>> --
>>> 2.35.1
>>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-23 7:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-21 22:53 [PATCH] kernelshark: Set QApplication::desktopFileName Nicolas Fella
2022-03-22 11:32 ` Yordan Karadzhov
2022-03-22 11:53 ` Nicolas Fella
2022-03-23 7:37 ` Yordan Karadzhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).