Git Product home page Git Product logo

libqtxdg's Introduction

LXQt

LXQt is the next generation of LXDE, the Lightweight Desktop Environment. It is the product of the merge between Razor-qt and LXDE-Qt.

About this repository

This is a superproject which contains all LXQt components. After checking out this repo please do the following to initialize git submodules.

git submodule init
git submodule update --remote --rebase

Note: We require git >= 1.8.5

Contributing

If you are interested in helping or joining LXQt, please take a look at our CONTRIBUTING document

Translation

Translations can be done in LXQt-Weblate.

Translation status
Translation status

libqtxdg's People

Contributors

adjamhub avatar agaida avatar amoskvin avatar darkshram avatar g-hacker avatar heliocastro avatar helix84 avatar idarktemplar avatar ilya87 avatar jleclanche avatar jsm222 avatar jubalh avatar kuzmas avatar luis-pereira avatar malrama avatar palinek avatar paulolieuthier avatar pcman avatar peterjespersen avatar plfiorini avatar pmattern avatar pvanek avatar schnitzeltony avatar shlyakpavel avatar sokoloffa avatar stefonarch avatar suicsoft avatar surlykke avatar tsujan avatar uniontech-lilinjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libqtxdg's Issues

Qt4 build failing due to missing Qt5X11Extras

Build fails because it can not find Qt5X11Extras package even though lxqt is being built with qt4.

Building: libqtxdg using externally specified options: -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/storage/src/lxqt-build  

-- Building with Qt 4.8.6
-- qtxdg: writing pkgconfig file /storage/src/lxqt/libqtxdg/build/qtxdg.pc
-- 
-- For building tests use -DBUILD_TESTS=Yes option.
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /storage/src/lxqt/libqtxdg/build
Scanning dependencies of target qtxdg
[  3%] [  7%] [ 10%] [ 14%] [ 17%] [ 21%] [ 25%] [ 28%] Building CXX object CMakeFiles/qtxdg.dir/xdgaction.cpp.o
Building CXX object CMakeFiles/qtxdg.dir/xdgdesktopfile.cpp.o                                                                                                          
Building CXX object CMakeFiles/qtxdg.dir/xdgmenu.cpp.o                                                                                                                 
Building CXX object CMakeFiles/qtxdg.dir/xdgmenureader.cpp.o                                                                                                           
Building CXX object CMakeFiles/qtxdg.dir/xdgicon.cpp.o                                                                                                                 
Building CXX object CMakeFiles/qtxdg.dir/xdgmenuapplinkprocessor.cpp.o                                                                                                 
Building CXX object CMakeFiles/qtxdg.dir/xdgdirs.cpp.o                                                                                                                 
Building CXX object CMakeFiles/qtxdg.dir/xdgmenulayoutprocessor.cpp.o                                                                                                  
[ 32%] Building CXX object CMakeFiles/qtxdg.dir/xdgmenurules.cpp.o                                                                                                     
[ 35%] Building CXX object CMakeFiles/qtxdg.dir/xdgmenuwidget.cpp.o                                                                                                    
[ 39%] Building CXX object CMakeFiles/qtxdg.dir/xmlhelper.cpp.o                                                                                                        
[ 42%] Building CXX object CMakeFiles/qtxdg.dir/xdgautostart.cpp.o                                                                                                     
[ 46%] Building CXX object CMakeFiles/qtxdg.dir/qiconfix/qiconloader_qt4.cpp.o                                                                                         
[ 50%] Building CXX object CMakeFiles/qtxdg.dir/xdgmimetype.cpp.o                                                                                                      
[ 53%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgaction.cxx.o                                                                                                    
[ 57%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenuapplinkprocessor.cxx.o                                                                                      
[ 60%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenu.cxx.o                                                                                                      
[ 64%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenu_p.cxx.o                                                                                                    
[ 67%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenureader.cxx.o                                                                                                
[ 71%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenurules.cxx.o                                                                                                 
[ 75%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenuwidget.cxx.o                                                                                                
Linking CXX shared library libqtxdg.so
[100%] Built target qtxdg
[100%] Built target qtxdg
Install the project...
-- Install configuration: "debug"
-- Installing: /storage/src/lxqt-build/lib/x86_64-linux-gnu/libqtxdg.so.1.0.0
-- Up-to-date: /storage/src/lxqt-build/lib/x86_64-linux-gnu/libqtxdg.so.1
-- Up-to-date: /storage/src/lxqt-build/lib/x86_64-linux-gnu/libqtxdg.so
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgaction.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgdesktopfile.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgdirs.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgicon.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgmenu.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgmenuwidget.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xmlhelper.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgautostart.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgmacros.h
-- Up-to-date: /storage/src/lxqt-build/include/qtxdg/xdgmimetype.h
-- Installing: /storage/src/lxqt-build/share/cmake/qtxdg/qtxdg-config.cmake
-- Up-to-date: /storage/src/lxqt-build/share/cmake/qtxdg/qtxdg_use.cmake
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgAction
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgDesktopFile
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgDirs
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgIcon
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgMenu
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgMenuWidget
-- Installing: /storage/src/lxqt-build/include/qtxdg/XmlHelper
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgAutoStart
-- Installing: /storage/src/lxqt-build/include/qtxdg/XdgMimeType
-- Installing: /storage/src/lxqt-build/lib/x86_64-linux-gnu/pkgconfig/qtxdg.pc


Building: liblxqt using externally specified options: -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/storage/src/lxqt-build  

CMake Error at CMakeLists.txt:130 (find_package):
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.

Could not find a package configuration file provided by "Qt5X11Extras" with
any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
"Qt5X11Extras_DIR" to a directory containing one of the above files.  If
"Qt5X11Extras" provides a separate development package or SDK, be sure it
has been installed.


-- Configuring incomplete, errors occurred!
See also "/storage/src/lxqt/liblxqt/build/CMakeFiles/CMakeOutput.log".

Generic .bin files wrongly identified as "Sega CD disc image" type

Hi,
the issue is visible in pcmanfm-qt, but I assume file type detection is handled by libqtxdg from libfm-qt ? Let me know if this issue should be filed somewhere else.

Expected Behavior

unknown .bin files should show up as "application/octet-stream"

Current Behavior

Most .bin files are wrongly identified as "Sega CD disc image" files.

Possible Solution

I've erased and re-written this section many times, I'm not sure there's an easy solution anymore.

It seems if type detection is only glob-based, then this can't be fixed : the sega formats are the only ones with a "*.bin" glob. When testing with different implementations ( mimeinfo, file (1) ), type detection works as expected only if the tool checks the magic value, see tests below. But checking the magic for every file in a directory may cause excessive I/O in the context of pcmanfm-qt ? I'd like to hear dev's opinions on this.

Steps to Reproduce (for bugs)
  1. Find or create a bogus .bin file , e.g.
    echo -e "\x00" > test.bin
  2. Verify the mimetype with different implementations :
### 'file' uses its own magic database
$ file --brief --mime-type test.bin
application/octet-stream

### mimeinfo uses the system-wide shared MIME-info database, but returns a different type depending on whether the extension is ignored or the magic is verified:

$ mimetype --brief --debug test.bin
> Checking inode type
> Checking globs for basename 'test.bin'
> Checking for extension '.bin'
application/x-sega-cd-rom

$ mimetype --brief --magic-only --debug test.bin
> Checking all magic rules
> File exists, trying default method
> First 10 bytes of the file contain control chars
application/octet-stream
  1. with pcmanfm-qt, browse to the directory containing test.bin : the Type column has "Sega CD disc image" which is wrong. Right-click on file -> Properties : the MIME type says "application/x-sega-cd-rom".
Context

see above

System Information
  • Distribution & Version: Artix / Arch linux rolling
  • Kernel: 4.14.88
  • libfm-qt 0.13.1.308 ec51711
  • Qt Version: 5.12
  • lxqt-build-tools Version: 0.5.0.17-5a489c1
  • libqtxdg Version: 3.2.0.17-1a52e5c

WARNING: libqtxdg needs recompilation with Qt 5.14.2

After Qt 5.14.2 came to Arch, I saw crashes in screengrab. The cause was in libqtxdg. Recompilation of libqtxdg solved the problem.

Usually, there should be no need to recompile fundamental LXQt components when the third version number of Qt changes. This was an exception.

I close this issue immediately after opening it; just wanted to make distro package maintainers know about it.

P.S. I have the latest git LXQt but think that the latest release (which is very old, BTW) should be affected too.

Wrong icons for sizes

Consider an icon theme whose icons are all SVG and whose index contains these keys:

...
[places/16]
Size=16
Context=Places
Type=Fixed

[places/22]
Size=22
Context=Places
Type=Fixed

[places/scalable]
Size=96
Context=Places
Type=Scalable
MinSize=16
MaxSize=512
...

With this arrangement, KDE correctly shows the folder icon from places/scalable for folders ≥ 32px while LXQt gets the folder icon from places/16 for all sizes ≥ 32px.

Specially marked menu entries with X-Red-Hat categories

Custom category marks get ignored. For instance, Yumex and Yumex-DNF are expected to be grouped into Administration menu but they show in Settings menu.
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1217565

Here's a sample:

$ cat /usr/share/applications/yumex-dnf.desktop 
[Desktop Entry]
Name=Yum Extender (DNF)
Comment=Install, update and remove applications
Categories=System;Settings;X-Red-Hat-Base;X-Fedora;
Icon=yumex-dnf
Exec=/usr/bin/yumex-dnf
Type=Application
Terminal=false
Encoding=UTF-8
GenericName=Software Installer

$ grep Red-Hat /etc/xdg/menus/* 2>/dev/null
/etc/xdg/menus/applications.menu:        <Not><Category>X-Red-Hat-ServerConfig</Category></Not>
/etc/xdg/menus/documentation.menu:      <Category>X-Red-Hat-Base</Category>
/etc/xdg/menus/server-settings.menu:      <Category>X-Red-Hat-Base</Category>
/etc/xdg/menus/server-settings.menu:      <Category>X-Red-Hat-ServerConfig</Category>
/etc/xdg/menus/server-settings.menu:        <Not><Category>X-Red-Hat-Base-Only</Category></Not>
/etc/xdg/menus/server-settings.menu:        <Not><Category>X-Red-Hat-Base</Category></Not>
/etc/xdg/menus/server-settings.menu:        <Category>X-Red-Hat-ServerConfig</Category>
/etc/xdg/menus/system-settings.menu:      <Not><Category>X-Red-Hat-ServerConfig</Category></Not>

Drop libmagic support

I haven't touched Qt 4 support yet because libmagic should be dropped along with it and that requires a lot of messing about to get all of it. @luis-pereira see if you can get that one when you get some time.

Poor handling of non-digit scale factors

Our icon handling is poor with non-digit scale factors.

Expected Behavior

Icons should look sharp with non-digit scale factors too.

Current Behavior

Icons may not look sharp with non-digit scale factors. For example, this is with QT_SCALE_FACTOR=1.5 (see the quit icon):

scale

Possible Solution

KDE had this problem before but they fixed it in Plasma 5.15.0 (or a previous version). So, it should be fixable with Qt 5.12, at least.

Context

Non-digit scale factors are useful with HDPI. With some screens, a scale factor of 2 would be too big.

System Information

Latest LXQt.

Performance comparison between fallback_hierarchy and master

Background:
While testing the performance implications of #116 I found three issues solved by commits 48e957b, 44cc641 and bea1939. This issues don't have any relation with #116. #125 contains the same fixes but applied to master.

The comparison will be made between #125 and #126.

Testing hardware:
4GB RAM, Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz, Hitachi Travelstar 5K500.B 5400 rpm SATA 2.6, 3.0 Gb/s.

Testing Software:
Linux 4.10.8-1-ARCH
Openbox, with one QTerminal window.

Testing conditions:
Theme used: Tangerine
No gtk-update-icon-cache cache present.
Run 12 times the tst-loadicon-perf script. Disk caches are flushed.

Results:
loadicon_perf_times
loadicon_perf_average-times
#125: 342 ms, standard deviation: 5.7049 ms
#126: 976.92 ms, standard deviation: 5.4682 ms

In this setup the fallback branch brings an 2.8 increase in load time. On a very fast machine it's not a issue, but in a weaker one it can be an issue. LXQt targets specially less power full machines.

p.s. On an side note I found that the gtk cache was actually increasing the load time. Will investigate what's happening.

qtxdg links to private header of <system> qtxdgiconloader

1.) Compile qtxdg with local qt (not the one in /usr, but /opt/Qt5.12.2)
2.) link to local qtxdg
/usr/bin/ld: /usr/lib64/libQt5XdgIconLoader.so.3: undefined reference to QIconLoader::instance()@Qt_5.12.1_PRIVATE_API
Why does linking to local install qtxdg (Qt5.12.2), try to load the system xdgiconloader library instead of the local one?

Missing icons of WINE apps

Before latest 2 commits I had icons for WINE apps in "Оther" submenu. Now they are gone.
Example:

/home/ilya/.local/share/applications/wine/Programs/Buka/Герои Меча и Магии III Дыхание Смерти/Герои III Дыхание смерти.desktop

[Desktop Entry]
Name=Герои III Дыхание смерти
Exec=env WINEPREFIX="/home/ilya/.wine" wine C:\windows\command\start.exe /Unix /home/ilya/.wine/dosdevices/c:/users/Public/Start\ Menu/Programs/Buka/Герои\ Меча\ и\ Магии\ III\ Дыхание\ Смерти/Герои\ III\ Дыхание\ смерти.lnk
Type=Application
StartupNotify=true
Path=/home/ilya/.wine/dosdevices/z:/D/Games/HoMM3
Icon=2B9B_Heroes3.0

And icon in

/home/ilya/.local/share/icons/hicolor/16x16/apps/2B9B_Heroes3.0.png

FTBFS from IRC

2017/04/11 20:06:42 <vc-01> libqtxdg/xdgiconloader/xdgiconloader.cpp:398:26: error: ‘class QStringRef’ has no member named ‘truncate’
2017/04/11 20:06:42 <vc-01>          iconNameFallback.truncate(indexOfDash);
2017/04/11 20:06:42 <vc-01> This is because ‘truncate’ is available since Qt 5.6.
2017/04/11 20:06:42 <vc-01> Maybe you should redefine CMakeLists.txt or change the source code.

Stop using defaults.list

We need to stop using defaults.list - mimeapps.list is the correct file to check for, afaik.

Though now I'm having second thoughts... Can someone check?

Clarify license of certain files for Debian packaging

We need to clarify the license of all files to make this library into Debian. Please help to add license header for the following files:

desktopenvironment_p.cpp: No copyright UNKNOWN
test/qtxdg_test.cpp: No copyright UNKNOWN
test/qtxdg_test.h: No copyright UNKNOWN
xdgdesktopfile_p.h: No copyright UNKNOWN

Conflicts with QtGui symbols on static link

When linking QtGui and libqtxdg statically to an app, QIconCacheGtkReader and PixmapEntry::pixmap with the ones from qiconloader.cpp

Expected Behavior

libqtxdg should work with static link

Current Behavior

https://github.com/ilya-fedin/tdesktop/runs/645416587?check_suite_focus=true

Possible Solution

Maybe, hide them under namespace? 🤔

Steps to Reproduce (for bugs)
  1. Link an app statcally with QtGui and XDGIconLoader at the same time
Context

I tried to link tdesktop static binary with lxqt-qtplugin to allow it to get lxqt system settings (fonts, icon theme, etc), but it requires xdgiconloader from libqtxdg, that has this issue :(

System Information

I hope, this is unrelated (but you have a link to the GH action job) :)

"files in some directories may conflict with libraries in implicit directories"

When using cmake:

CMake Warning at qtxdg/CMakeLists.txt:68 (add_library):
  Cannot generate a safe runtime search path for target Qt5Xdg because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libQt5Widgets.so.5] in /usr/lib64 may be hidden by files in:
      /home/styling/Qt/5.6/gcc_64/lib
    runtime library [libQt5Xml.so.5] in /usr/lib64 may be hidden by files in:
      /home/styling/Qt/5.6/gcc_64/lib
    runtime library [libQt5Gui.so.5] in /usr/lib64 may be hidden by files in:
      /home/styling/Qt/5.6/gcc_64/lib
    runtime library [libQt5Core.so.5] in /usr/lib64 may be hidden by files in:
      /home/styling/Qt/5.6/gcc_64/lib

  Some of these libraries may not be found correctly.

Then with make

[  3%] Building CXX object xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/xdgiconloader.cpp.o
In file included from /home/styling/repositories/libqtxdg/xdgiconloader/xdgiconloader.cpp:34:0:
/home/styling/repositories/libqtxdg/xdgiconloader/xdgiconloader_p.h:56:29: fatal error: private/qicon_p.h: No such file or directory
compilation terminated.
xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/build.make:62: recipe for target 'xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/xdgiconloader.cpp.o' failed
make[2]: *** [xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/xdgiconloader.cpp.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/all' failed
make[1]: *** [xdgiconloader/CMakeFiles/Qt5XdgIconLoader.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

I couldn't figure out what to do about it.

The Qt version in /home was installed for other projects via:
https://wiki.qt.io/Install_Qt_5_on_openSUSE

I'm on openSUSE Tumbleweed.

libqtxdg build fails to link when qtmimetypes is utilized

tried to switch over to qtmimetypes now libqtxdg fails at linking stage..
maybe a cmake configuration typo somewhere??

ing CXX object CMakeFiles/qtxdg.dir/moc_xdgmenurules.cxx.o
[100%] Building CXX object CMakeFiles/qtxdg.dir/moc_xdgmenuwidget.cxx.o
Linking CXX shared library libqtxdg.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtCore
collect2: error: ld returned 1 exit status
make[2]: *** [libqtxdg.so.1.0.0] Error 1
make[1]: *** [CMakeFiles/qtxdg.dir/all] Error 2
make: *** [all] Error 2

Obviously I have qtcore installed and all other qt programs (including lxqt!) find it without any issue

if i build with USE_QTMIMETYPES=OFF it will link fine

libqtxdg-1.0.0 fails with -DUSE_QTMIMETYPES

I currently have qtmimetypes installed:
libqtxdg success the build with -DUSE_QTMIMETYPES=OFF

drwxr-xr-x root/root         0 2014-09-20 00:08 install/
-rw-r--r-- root/root       346 2014-09-20 00:08 install/doinst.sh
-rw-r--r-- root/root       341 2014-09-20 00:08 install/slack-desc
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/
drwxr-xr-x root/root         0 2014-09-19 23:49 usr/include/
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/include/QtMimeTypes/
-rw-r--r-- root/root        23 2014-09-03 02:54 usr/include/QtMimeTypes/QMimeType
-rw-r--r-- root/root      3554 2014-09-03 02:54 usr/include/QtMimeTypes/qmimetype.h
-rw-r--r-- root/root      3467 2014-09-03 02:54 usr/include/QtMimeTypes/qmimedatabase.h
-rw-r--r-- root/root       985 2014-09-03 02:54 usr/include/QtMimeTypes/qmime_global.h
-rw-r--r-- root/root        27 2014-09-03 02:54 usr/include/QtMimeTypes/QMimeDatabase
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/lib/
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/lib/pkgconfig/
-rw-r--r-- root/root       643 2014-09-20 00:08 usr/lib/pkgconfig/QtMimeTypes.pc
-rwxr-xr-x root/root    457592 2014-09-20 00:08 usr/lib/libQtMimeTypes.so.1.0.1
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/doc/
drwxr-xr-x root/root         0 2014-09-20 00:08 usr/doc/qtmimetypes-0.0.0/
-rw-r--r-- root/root     26434 2014-09-20 00:08 usr/doc/qtmimetypes-0.0.0/LICENSE.LGPL

Here is my error log:

 return ((int*)(&Q_WS_QWS))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec3379417551/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec3379417551.dir/build.make CMakeFiles/cmTryCompileExec3379417551.dir/build
gmake[1]: Entering directory `/tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec3379417551.dir/CheckSymbolExists.cxx.o
/usr/bin/c++    -O2 -fPIC  -I/usr/lib64/qt/include    -o CMakeFiles/cmTryCompileExec3379417551.dir/CheckSymbolExists.cxx.o -c /tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function �^�^�int main(int, char**)�^�^�:
/tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: �^�^�Q_WS_MAC�^�^� was not declared in this scope
   return ((int*)(&Q_WS_MAC))[argc];
                   ^
gmake[1]: *** [CMakeFiles/cmTryCompileExec3379417551.dir/CheckSymbolExists.cxx.o] Error 1
gmake[1]: Leaving directory `/tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec3379417551/fast] Error 2

File /tmp/SBo/libqtxdg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_MAC
  return ((int*)(&Q_WS_MAC))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Absence of application icon

lxqt-config-powermanagement.desktop.in Has line Icon=preferences-system-power-management
and I see icon in source code folder. But lxqt-config-powermanagement.desktop in menu has no icon.

sc1
sc2

P.S. First screen is from pcmanfm-qt

Bump soversion for incompatible between 0.5.2 and 0.5.3

Please help do bump soversion in libqtxdg because 0.5.2 and 0.5.3 are not compatible.

We are currently trying to create debian packages for LXQt. To do so, we need libqtxdg 0.5.3. However, debian already has libqtxdg 0.5.2 for Razor-qt, and we don't want to break Razor-qt when integrating LXQt. The problem is, libqtxdg 0.5.2 and 0.5.3 have incompatible API changed (0.5.2 API is in here, while 0.5.3 API is in here), so we can not just upgrade libqtxdg to 0.5.3, cause it will definitely break Razor-qt, which is something we need to avoid.

Since 0.5.2 and 0.5.3 are incompatible, we suggest to bump soversion of libqtxdg so that 0.5.2 and 0.5.3 are coinstallable for debian, and other distribution. In this way, we can do a smoother transition for Razor-qt and LXQt.

Proposal: Improve XdgIconLoaderEngine so it stores fallback icon names

The problem:
QIcon can only has one icon name. When the icon does not exist in the current theme, it simply breaks.
The qtxdg library provides a method to improve this:
QIcon XdgIcon::fromTheme(const QStringList& iconNames, const QIcon& fallback)
However, this find the fallback icon on QIcon creation only. When the icon theme changes, the previously stored icon name might become invalid in the new theme.

The proposed solution:
Storing the list of all icon names in XdgIconLoaderEngine.
Then when creating a new QIcon via XdgIcon::fromTheme(), create a XdgIconLoaderEngine with a list of possible icon names, and then create QIcon using the ctor that accepts an icon engine instead.
QIcon::QIcon(QIconEngine* engine)

After theme change, clear the pixmap cache used by QIcon so all pixmaps need to be re-generated.
When a pixmap needs to be generated again, we have the full icon name list in the icon engine ,so we can pick the most suitable icon name from the list for the current theme.

@luis-pereira What do you think?
The selection of the most suitable icon name from the list is done when generating the pixmap for the first time rather than when creating the QIcon object. The other parts remain the same and require no changes.

xdg-open does not work correct with magnet links

I am not sure, if this is the right place to post this issue.
If not, please tell me what the right package is to report this issue.

When opening a magnet link from the browser, a new browser window is opened instead of my default application set by xdg-mime.

After some investigation I noticed that the following command gives me the same result.

xdg-open magnet:asdfjasdljffdsaadsf

After some debugging I noticed that there are two versions of xdg-open on my system.

/usr/bin/xdg-open
/usr/lib64/lxqt-xdg-tools/xdg-open

By using the command below I found out that the last one is set as default.

which xdg-open

Unfortunately this version doesn't work for magnet links (and maybe more). The version in /usr/bin works correct.

Does anybody know what the reason is for this copy of xdg-open?

I noticed with a diff that there are quite some differences.
Isn't it better to stick to the original (and maintained) version of xdg-open?

If the answer to the last question is 'no', would you mind to fix the magnet link issue?

Cheers,
Arthur.

launching app, crashes lxqt-panel

Attempting to launch a program crashes the panel and whole session, if:

  1. There is already a running (but frozen / hanging / crashed) instance
  2. In the desktop file it is marked as DBus Activatable

How to reproduce:

  1. Use lxqt
  2. Open terminal
  3. Run e.g gnome-maps (or a program which has DBusActivatable=true in its desktop file)
  4. Hit ctrl + z
  5. Try to open gnome-maps from lxqt-panel-menu
  6. Everything freezes
    (Recent DBusActivatable version required of course)

Changing the value in the desktop file from
DBusActivatable=true
to
DBusActivatable=false

PS: if the program is dbus activatable and just has a slow startup the ui freezes until it starts

confirms this is the issue (the session and panel do not freeze with DBusActivatable=false)

Tests failing

==> Starting build()...
-- Building with Qt 5.4.0
-- Qt5Xdg: writing pkgconfig file /home/adys/lxqt/libqtxdg-git/src/build/Qt5Xdg.pc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adys/lxqt/libqtxdg-git/src/build
[ 90%] Built target Qt5Xdg
Linking CXX executable qtxdg_test
CMakeFiles/qtxdg_test.dir/qtxdg_test.cpp.o: In function `QtXdgTest::testCustomFormat()':                                                                                                                                                                                                                                     
qtxdg_test.cpp:(.text+0x140): undefined reference to `writeDesktopFile(QIODevice&, QMap<QString, QVariant> const&)'
qtxdg_test.cpp:(.text+0x147): undefined reference to `readDesktopFile(QIODevice&, QMap<QString, QVariant>&)'
collect2: error: ld returned 1 exit status
test/CMakeFiles/qtxdg_test.dir/build.make:121: recipe for target 'test/qtxdg_test' failed
make[2]: *** [test/qtxdg_test] Error 1
CMakeFiles/Makefile2:141: recipe for target 'test/CMakeFiles/qtxdg_test.dir/all' failed
make[1]: *** [test/CMakeFiles/qtxdg_test.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: *** [all] Error 2

``

Changing the Icon Theme is broken (in Qt 5.4.1)

When an lxqt application calls

XdgIcon::fromTheme(const QString& iconName, const QIcon& fallback)

with a relative path, this will redirect to

new QIcon(new QtXdg::QIconLoaderEngineFixed(name));

As QIconLoader::setThemeName(...) does not get called, m_userTheme is not set. Therefore, the class is looking for system themes in systemThemeName(). As that function is broken (in my case, Qt 5.4.1), the class will fall back to fallbackTheme() which always yields "hicolor" for me.

As all of this is happening in the qiconloader.cpp and this file seems to be copied from Qt, I guess that my Qt version could be responsible for this issue.

I could resolve this issue by changing the systemThemeName() function like that:

static inline QString systemThemeName()
{
    if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
        const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName);
        bool isEmpty = themeHint.toString().isEmpty(); // In my case, themeHint is always just an empty string: ""
        if (themeHint.isValid() && !isEmpty)
            return themeHint.toString();
    }
    return QIcon::themeName();
}

Finally, I am wondering why this file, which is explicitly not part of the Qt API, was copied to libqtxdg. Isn't that inherently leading to problems with future Qt versions? Could someone explain to me why we need that file and what it does for us? Why can't we just use QIcon::setThemeName(themeName) and QIcon::themeName()?

CMAKE_INSTALL_PREFIX not accounted for in libQt5XdgIconPlugin.so install

Attempts to install into "/usr/lib64/qt5/plugins/iconengines/libQt5XdgIconPlugin.so" even though CMAKE_INSTALL_PREFIX is set to "~/usr". In the same build libQt5XdgIconLoader.so installs correctly into "~/usr/lib64/libQt5XdgIconLoader.so".

Expected Behavior

Install into "~/usr/lib64/libQt5XdgIconPlugin.so".

Current Behavior

Attempts to install into "/usr/lib64/qt5/plugins/iconengines/libQt5XdgIconPlugin.so".

Possible Solution

Update lxqt/libqtxdg/src/xdgiconloader/plugin/CMakeLists.txt to account for CMAKE_INSTALL_PREFIX. I am attempting to do this myself and will update the issue if I can get it working (I am new to CMAKE).

Steps to Reproduce (for bugs)
  1. mkdir build
  2. cd build
  3. cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/home/rwilliamson/usr ..
  4. make
  5. make install

CMake Error at src/xdgiconloader/plugin/cmake_install.cmake:55 (file):
file INSTALL cannot copy file
"/home/rwilliamson/build/lxqt/libqtxdg/build/src/xdgiconloader/plugin/libQt5XdgIconPlugin.so"
to "/usr/lib64/qt5/plugins/iconengines/libQt5XdgIconPlugin.so".

Context

Building without installing into main system.

System Information

Fedora LXQT 30. Using Toolbox.
Qt 5.12.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.2.1 20190827 (Red Hat 9.2.1-1)) on "xcb"
OS: Fedora 30 (Container Image) [linux version 5.3.6-200.fc30.x86_64]

  • Distribution & Version: Head from git.
  • Kernel: Linux 5.3.6-200.fc30.x86_64 x86_64
  • Qt Version: 5.12.5
  • cmake Version: 3.14.5
  • lxqt-build-tools Version: Head from git.
  • Package version: N/A

XDG_CURRENT_DESKTOP is not set to LXQT

Hi,

I am not sure if this is a real bug and neither I am sure if this is the library responsible for it, but while debugging another issue on my system regarding xdg-open, I noticed that the variable XDG_CURRENT_DESKTOP is set to Razor (by executing the 'env' command).

Shouldn't this become something like XDG_CURRENT_DESKTOP=Lxqt ?

Cheers,
Arthur.

Magnet links can't open currently associated application

I'm not sure if this is the right section.

Magnet links opened from inside the browser don't open Transmission Qt. I put this inside '/usr/share/applications/mimeinfo.cache':

[MIME Cache]
x-scheme-handler/magnet=transmission-qt.desktop;

And this inside '/usr/local/share/applications/defaults.list':

[Default Applications]
x-scheme-handler/magnet=transmission-qt.desktop;

It's important to notice that 'transmission-qt.desktop' exists and it's pointing to the right exec command. Also, Transmission Qt is working fine and it downloads magnets link if you paste inside it manually

Improve icon lookup performance

The icon lookup algorithm works by always looking up filenames in directories (stat). The goal here is implement a caching mechanism to reduce the number of required stat's lookup an icon.

I already started doing it 😄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.