openSUSE / kmozillahelper

KDE mozilla integration
MIT License
17 stars 9 forks source link

error: cannot convert ‘QWidget*’ to ‘QWindow* #30

Closed perfect7gentleman closed 3 years ago

perfect7gentleman commented 3 years ago
/usr/include/KF5/KService/kmimetypetrader.h:102:19: note: declared here
  102 |     KService::Ptr preferredService(const QString &mimeType, const QString &genericServiceType = QStringLiteral("Application"));
      |                   ^~~~~~~~~~~~~~~~
/tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999/main.cpp: In member function ‘virtual bool Helper::eventFilter(QObject*, QEvent*)’:
/tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999/main.cpp:692:42: error: cannot convert ‘QWidget*’ to ‘QWindow*’
  692 |             KWindowSystem::setMainWindow(widget, wid);
      |                                          ^~~~~~
      |                                          |
      |                                          QWidget*
In file included from /usr/include/KF5/KWindowSystem/KWindowSystem:1,
                 from /tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999/main.cpp:53:
/usr/include/KF5/KWindowSystem/kwindowsystem.h:229:40: note:   initializing argument 1 of ‘static void KWindowSystem::setMainWindow(QWindow*, WId)’
  229 |     static void setMainWindow(QWindow *subwindow, WId mainwindow);
      |                               ~~~~~~~~~^~~~~~~~~
ninja: subcommand failed
perfect7gentleman commented 3 years ago

KDE Frameworks 5.82 Qt 5.15.3

Vogtinator commented 3 years ago

That can only happen if you disable use of deprecated methods in kwindowsystem explicitly.

Did you pass any flags when building kwindowsystem or kmozillahelper?

perfect7gentleman commented 3 years ago

Kwindowsystem

cmake -C /tmp/portage/kde-frameworks/kwindowsystem-5.82.0/work/kwindowsystem-5.82.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF -DBUILD_QCH=no -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DKDE_INSTALL_DOCBUNDLEDIR=/usr/share/help -DKWINDOWSYSTEM_NO_WIDGETS=ON -DCMAKE_DISABLE_FIND_PACKAGE_X11=OFF -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/tmp/portage/kde-frameworks/kwindowsystem-5.82.0/work/kwindowsystem-5.82.0_build/gentoo_toolchain.cmake  -C /etc/portage/env/cmake_release_cmake /tmp/portage/kde-frameworks/kwindowsystem-5.82.0/work/kwindowsystem-5.82.0

KMozillahelper

cmake -C /tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DKDE_INSTALL_DOCBUNDLEDIR=/usr/share/help -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999_build/gentoo_toolchain.cmake  -C /etc/portage/env/cmake_release_cmake /tmp/portage/kde-misc/kmozillahelper-9999/work/kmozillahelper-9999

So?

perfect7gentleman commented 3 years ago

As I understood from here - https://github.com/KDE/kwindowsystem/blob/master/CMakeLists.txt#L34 QtWidget API would be deprecated soon.

Vogtinator commented 3 years ago

Yes, this is what Warning: this is binary and source incompatible. is about. If that option is set, you need to unset it.

In any case, I did a quick port away from the deprecated method (8085be9)

perfect7gentleman commented 3 years ago

Thanx, now it's okay.