Commit be41f0e7 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Sébastien Blin
Browse files

misc: Qt 6.2.0 initial migration

Remove unsupported QtQuick One component and it will be
added back in the following patches

Change-Id: Iad206a880096cf956a4220a81dca85a993721fbd
parent 1a476218
......@@ -153,27 +153,39 @@ set(COMMON_HEADERS
${SRC_DIR}/previewengine.h)
set(QML_LIBS
Qt5::Quick
Qt5::QuickWidgets
Qt5::Network
Qt5::Svg
Qt5::Sql
Qt5::Concurrent
Qt5::QuickControls2
Qt5::WebEngine
Qt5::Core
Qt5::WebEngineWidgets)
Qt::Quick
Qt::Network
Qt::NetworkAuth
Qt::Svg
Qt::Gui
Qt::Qml
Qt::QmlModels
Qt::Positioning
Qt::Sql
Qt::Concurrent
Qt::Core
Qt::Core5Compat
Qt::WebEngineCore
Qt::WebEngineQuick
Qt::WebChannel
Qt::WebEngineWidgets)
set(QML_LIBS_LIST
Core
Concurrent
Quick
QuickWidgets
Network
NetworkAuth
Svg
Gui
Qml
QmlModels
Positioning
Sql
QuickControls2
WebEngine
Concurrent
Core
Core5Compat
WebEngineCore
WebEngineQuick
WebChannel
WebEngineWidgets)
set(WINDOWS_SYS_LIBS Shell32.lib
......@@ -185,6 +197,14 @@ set(WINDOWS_SYS_LIBS Shell32.lib
Crypt32.lib
Strmiids.lib)
# Here we let find_package(<PackageName>...) try to find Qt 6,
# If it is found, find_package will succeed, and the CMake variable
# QT_VERSION_MAJOR will be defined 6.
find_package(QT NAMES Qt6 COMPONENTS ${QML_LIBS_LIST} REQUIRED)
if (${QT_VERSION_MAJOR} STRLESS 6)
message(FATAL_ERROR "We currently only support Qt6" )
endif()
if(MSVC)
# preprocessor defines
add_definitions(-DUNICODE -DQT_NO_DEBUG -DNDEBUG)
......@@ -240,7 +260,7 @@ else()
list(APPEND COMMON_HEADERS
${SRC_DIR}/dbuserrorhandler.h
${SRC_DIR}/xrectsel.h)
list(APPEND QML_LIBS Qt5::DBus)
list(APPEND QML_LIBS Qt::DBus)
list(APPEND QML_LIBS_LIST DBus)
find_package(PkgConfig REQUIRED)
......@@ -318,21 +338,16 @@ else()
endif()
# Qt find package
if(QT5_VER AND QT5_PATH)
string(REPLACE "." ";" VERSION_LIST ${QT5_VER})
list(GET VERSION_LIST 0 QT5_VER_MAJOR)
list(GET VERSION_LIST 1 QT5_VER_MINOR)
list(GET VERSION_LIST 2 QT5_VER_PATCH)
if((${QT5_VER_MAJOR} GREATER_EQUAL 5) AND (${QT5_VER_MINOR} GREATER_EQUAL 14))
message(STATUS "Using custom Qt version")
find_package(Qt5 ${QT5_VER} REQUIRED COMPONENTS ${QML_LIBS_LIST}
PATHS ${QT5_PATH} NO_DEFAULT_PATH)
find_package(Qt5LinguistTools ${QT5_VER} PATHS ${QT5_PATH} NO_DEFAULT_PATH)
endif()
if(QT6_VER AND QT6_PATH)
message(STATUS "Using custom Qt version")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QML_LIBS_LIST}
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
# Linguist tools is not required.
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
else()
find_package(Qt5 REQUIRED COMPONENTS ${QML_LIBS_LIST})
find_package(Qt5LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QML_LIBS_LIST})
find_package(Qt${QT_VERSION_MAJOR}LinguistTools)
endif()
# common include
......@@ -340,19 +355,19 @@ include_directories(${PROJECT_SOURCE_DIR}
${SRC_DIR})
# common executable sources
add_executable(${PROJECT_NAME}
${SRC_DIR}/main.cpp
${COMMON_HEADERS}
${COMMON_SOURCES}
${QML_RESOURCES}
${QML_RESOURCES_QML}
${LRC_SRC_PATH}/webresource.qrc)
qt_add_executable(${PROJECT_NAME} MANUAL_FINALIZATION
${SRC_DIR}/main.cpp
${COMMON_HEADERS}
${COMMON_SOURCES}
${QML_RESOURCES}
${QML_RESOURCES_QML}
${LRC_SRC_PATH}/webresource.qrc)
if(MSVC)
# Makes it a GUI executable instead of a console application
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} PRIVATE
${QML_LIBS}
${QRENCODE_LIB}
${WINDOWS_SYS_LIBS})
......@@ -367,14 +382,14 @@ if(MSVC)
# executable icon
target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/ico.rc)
target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} PRIVATE
${RINGCLIENT_STATIC_LIB}
${QTWRAPPER_LIB}
${DRING_LIB}
${GNUTLS_LIB})
# translations
if(Qt5LinguistTools_FOUND)
if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND)
message("Releasing and copying translation files")
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations/")
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations/")
......@@ -384,8 +399,9 @@ if(MSVC)
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations")
set_source_files_properties(${TS_LRC_FILES} PROPERTIES OUTPUT_LOCATION
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations")
qt5_add_translation(QM_CLIENT_FILES ${TS_CLIENT_FILES})
qt5_add_translation(QM_LRC_FILES ${TS_LRC_FILES})
qt_add_translation(QM_CLIENT_FILES ${TS_CLIENT_FILES})
qt_add_translation(QM_LRC_FILES ${TS_LRC_FILES})
target_sources(${PROJECT_NAME} PRIVATE ${QM_CLIENT_FILES})
target_sources(${PROJECT_NAME} PRIVATE ${QM_LRC_FILES})
endif()
......@@ -426,7 +442,7 @@ if(MSVC)
# executable name
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "Jami")
else()
target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} PRIVATE
${QML_LIBS}
${LRC_LIB_NAME}
${qrencode}
......@@ -516,12 +532,13 @@ else()
endif()
# translations
if(Qt5LinguistTools_FOUND)
if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND)
message("Releasing and copying translation files")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/")
file(GLOB TS_FILES ${PROJECT_SOURCE_DIR}/translations/*.ts)
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "share/ring/translations")
qt5_add_translation(QM_FILES ${TS_FILES})
qt_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations ALL DEPENDS ${QM_FILES})
install(DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/"
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ring/translations)
......@@ -537,6 +554,10 @@ else()
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
qt_import_qml_plugins(${PROJECT_NAME})
qt_finalize_executable(${PROJECT_NAME})
# test
if(ENABLE_TESTS)
message("Add Jami tests")
......
......@@ -12,7 +12,7 @@ from enum import Enum
# vs help
win_sdk_default = '10.0.16299.0'
win_toolset_default = '142'
qt_version_default = '5.15.0'
qt_version_default = '6.2.0'
vs_where_path = os.path.join(
os.environ['ProgramFiles(x86)'], 'Microsoft Visual Studio', 'Installer', 'vswhere.exe'
......@@ -22,6 +22,7 @@ host_is_64bit = (False, True)[platform.machine().endswith('64')]
this_dir = os.path.dirname(os.path.realpath(__file__))
build_dir = os.path.join(this_dir, 'build')
temp_path = os.environ['TEMP']
openssl_include_dir = 'C:\\Qt\\Tools\\OpenSSL\\Win_x64\\include\\openssl'
# project path
jami_qt_project = os.path.join(build_dir, 'jami-qt.vcxproj')
......@@ -214,20 +215,37 @@ def build(arch, toolset, sdk_version, config_str, project_path_under_current_pat
qt_dir = os.path.join("C:\\", 'Qt', qtver)
cmake_gen = getCMakeGenerator(getLatestVSVersion())
msvc_folder = 'msvc2019_64'
qt_major_version = getQtVersionNumber(qtver, QtVerison.Major)
qt_general_macro = 'Qt' + qt_major_version
msvc_folder = '\\msvc2019_64'
qt_cmake_dir = qt_dir + msvc_folder + '\\lib\\cmake\\'
cmake_prefix_path = qt_dir + msvc_folder
qt_cmake_dir = os.path.join(qt_dir, msvc_folder, 'lib', 'cmake')
cmake_prefix_path = os.path.join(qt_dir, msvc_folder)
cmake_options = [
'-DCMAKE_PREFIX_PATH=' + cmake_prefix_path,
'-DQt5_DIR=' + qt_cmake_dir + 'Qt5',
'-DQt5Core_DIR=' + qt_cmake_dir + 'Qt5Core',
'-DQt5Sql_DIR=' + qt_cmake_dir + 'Qt5Sql',
'-DQt5LinguistTools_DIR=' + qt_cmake_dir + 'Qt5LinguistTools',
'-DQt5Concurrent_DIR=' + qt_cmake_dir + 'Qt5Concurrent',
'-DQt5Gui_DIR=' + qt_cmake_dir + 'Qt5Gui',
'-DQt5Test_DIR=' + qt_cmake_dir + 'Qt5Test',
'-DQt5QuickTest_DIR=' + qt_cmake_dir + 'Qt5QuickTest',
'-DOPENSSL_INCLUDE_DIR=' + openssl_include_dir,
'-DQT_DIR=' + qt_dir + msvc_folder,
'-D' + qt_general_macro + '_DIR=' + qt_cmake_dir + qt_general_macro,
'-D' + qt_general_macro + 'Core_DIR=' + qt_cmake_dir + qt_general_macro + 'Core',
'-D' + qt_general_macro + 'Core5Compat_DIR=' + qt_cmake_dir + qt_general_macro + 'Core5Compat',
'-D' + qt_general_macro + 'WebEngineCore_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineCore',
'-D' + qt_general_macro + 'WebEngineQuick_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineQuick',
'-D' + qt_general_macro + 'WebChannel_DIR=' + qt_cmake_dir + qt_general_macro + 'WebChannel',
'-D' + qt_general_macro + 'WebEngineWidgets_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineWidgets',
'-D' + qt_general_macro + 'Sql_DIR=' + qt_cmake_dir + qt_general_macro + 'Sql',
'-D' + qt_general_macro + 'LinguistTools_DIR=' + qt_cmake_dir + qt_general_macro + 'LinguistTools',
'-D' + qt_general_macro + 'Concurrent_DIR=' + qt_cmake_dir + qt_general_macro + 'Concurrent',
'-D' + qt_general_macro + 'Network_DIR=' + qt_cmake_dir + qt_general_macro + 'Network',
'-D' + qt_general_macro + 'NetworkAuth_DIR=' + qt_cmake_dir + qt_general_macro + 'NetworkAuth',
'-D' + qt_general_macro + 'Gui_DIR=' + qt_cmake_dir + qt_general_macro + 'Gui',
'-D' + qt_general_macro + 'Qml_DIR=' + qt_cmake_dir + qt_general_macro + 'Qml',
'-D' + qt_general_macro + 'QmlModels_DIR=' + qt_cmake_dir + qt_general_macro + 'QmlModels',
'-D' + qt_general_macro + 'Positioning_DIR=' + qt_cmake_dir + qt_general_macro + 'Positioning',
'-D' + qt_general_macro + 'Test_DIR=' + qt_cmake_dir + qt_general_macro + 'Test',
'-D' + qt_general_macro + 'QuickTest_DIR=' + qt_cmake_dir + qt_general_macro + 'QuickTest',
'-DENABLE_TESTS=' + (str("ENABLE_TESTS") if test_building_type != TestBuilding.NoTests else ''),
'-DCMAKE_SYSTEM_VERSION=' + sdk_version
]
......@@ -384,6 +402,10 @@ def main():
parsed_args = parse_args()
if int(getQtVersionNumber(parsed_args.qtver, QtVerison.Major)) < 6:
print('We currently only support Qt6')
sys.exit(1)
test_building_type = TestBuilding.NoTests
if parsed_args.withtest:
......
......@@ -10,7 +10,7 @@
<file>src/commoncomponents/PasswordDialog.qml</file>
<file>src/commoncomponents/MaterialLineEdit.qml</file>
<file>src/commoncomponents/PhotoboothView.qml</file>
<file>src/commoncomponents/ListViewJami.qml</file>
<file>src/commoncomponents/JamiListView.qml</file>
<file>src/commoncomponents/DeleteAccountDialog.qml</file>
<file>src/commoncomponents/CustomBorder.qml</file>
<file>src/commoncomponents/PushButton.qml</file>
......@@ -41,8 +41,6 @@
<file>src/settingsview/components/AudioSettings.qml</file>
<file>src/settingsview/components/VideoSettings.qml</file>
<file>src/settingsview/components/GeneralSettingsPage.qml</file>
<file>src/settingsview/components/KeyBoardShortcutTable.qml</file>
<file>src/settingsview/components/KeyBoardShortcutKey.qml</file>
<file>src/settingsview/components/PluginSettingsPage.qml</file>
<file>src/settingsview/components/PluginListSettingsView.qml</file>
<file>src/settingsview/components/PluginListPreferencesView.qml</file>
......@@ -172,5 +170,8 @@
<file>src/commoncomponents/DataTransferMessageDelegate.qml</file>
<file>src/mainview/components/ScrollToBottomButton.qml</file>
<file>src/commoncomponents/TypingDots.qml</file>
<file>src/commoncomponents/JamiScrollBar.qml</file>
<file>qtquickcontrols2.conf</file>
<file>src/commoncomponents/JamiFlickable.qml</file>
</qresource>
</RCC>
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html
[Controls]
Style=Universal
[Universal]
Theme=Light
......@@ -16,11 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Universal 2.15
import QtGraphicalEffects 1.15
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import net.jami.Constants 1.1
import net.jami.Models 1.1
......@@ -33,8 +32,6 @@ ApplicationWindow {
property bool connectionFailed: false
property int preferredMargin: 15
Universal.theme: Universal.Light
title: "Jami"
width: 600
......@@ -201,7 +198,7 @@ ApplicationWindow {
}
}
overlay.modal: ColorOverlay {
Overlay.modal: ColorOverlay {
source: root.contentItem
color: "transparent"
......
......@@ -20,12 +20,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Universal 2.15
import QtGraphicalEffects 1.15
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import net.jami.Models 1.1
import net.jami.Adapters 1.1
......@@ -40,56 +39,19 @@ import "commoncomponents"
ApplicationWindow {
id: root
property ApplicationWindow appWindow : root
// To facilitate reparenting of the callview during
// fullscreen mode, we need QQuickItem based object.
Item {
id: appContainer
anchors.fill: parent
}
property bool isFullScreen: false
visibility: !visible ?
Window.Hidden : (isFullScreen ?
Window.FullScreen :
Window.Windowed)
function toggleFullScreen() {
isFullScreen = !isFullScreen
}
enum LoadedSource {
WizardView = 0,
MainView,
None
}
Universal.theme: Universal.Light
title: JamiStrings.appTitle
property ApplicationWindow appWindow : root
property bool isFullScreen: false
width: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinWidth
return JamiTheme.mainViewPreferredWidth
}
height: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinHeight
return JamiTheme.mainViewPreferredHeight
}
minimumWidth: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinWidth
return JamiTheme.mainViewMinWidth
}
minimumHeight: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinHeight
return JamiTheme.mainViewMinHeight
function toggleFullScreen() {
isFullScreen = !isFullScreen
}
visible: mainApplicationLoader.status === Loader.Ready
function checkLoadedSource() {
var sourceString = mainApplicationLoader.source.toString()
......@@ -123,7 +85,45 @@ ApplicationWindow {
hide()
}
AccountMigrationDialog{
visibility: !visible ?
Window.Hidden : (isFullScreen ?
Window.FullScreen :
Window.Windowed)
title: JamiStrings.appTitle
width: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinWidth
return JamiTheme.mainViewPreferredWidth
}
height: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinHeight
return JamiTheme.mainViewPreferredHeight
}
minimumWidth: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinWidth
return JamiTheme.mainViewMinWidth
}
minimumHeight: {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
return JamiTheme.wizardViewMinHeight
return JamiTheme.mainViewMinHeight
}
visible: mainApplicationLoader.status === Loader.Ready
// To facilitate reparenting of the callview during
// fullscreen mode, we need QQuickItem based object.
Item {
id: appContainer
anchors.fill: parent
}
AccountMigrationDialog {
id: accountMigrationDialog
visible: false
......@@ -165,17 +165,6 @@ ApplicationWindow {
}
}
overlay.modal: ColorOverlay {
source: root.contentItem
color: "transparent"
// Color animation for overlay when pop up is shown.
ColorAnimation on color {
to: Qt.rgba(0, 0, 0, 0.33)
duration: 500
}
}
Connections {
target: LRCInstance
......@@ -220,6 +209,17 @@ ApplicationWindow {
}
}
Overlay.modal: ColorOverlay {
source: root.contentItem
color: "transparent"
// Color animation for overlay when pop up is shown.
ColorAnimation on color {
to: Qt.rgba(0, 0, 0, 0.33)
duration: 500
}
}
onClosing: root.close()
onScreenChanged: JamiQmlUtils.mainApplicationScreen = root.screen
......
......@@ -144,7 +144,7 @@ AccountAdapter::createJamiAccount(QString registeredName,
connectFailure();
QtConcurrent::run([this, settings] {
auto futureResult = QtConcurrent::run([this, settings] {
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::JAMI,
settings["alias"].toString(),
settings["archivePath"].toString(),
......@@ -189,7 +189,7 @@ AccountAdapter::createSIPAccount(const QVariantMap& settings)
connectFailure();
QtConcurrent::run([this, settings] {
auto futureResult = QtConcurrent::run([this, settings] {
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::SIP,
settings["alias"].toString(),
settings["archivePath"].toString(),
......@@ -233,7 +233,7 @@ AccountAdapter::createJAMSAccount(const QVariantMap& settings)
connectFailure();
QtConcurrent::run([this, settings] {
auto futureResult = QtConcurrent::run([this, settings] {
lrcInstance_->accountModel().connectToAccountManager(settings["username"].toString(),
settings["password"].toString(),
settings["manager"].toString());
......@@ -278,7 +278,7 @@ AccountAdapter::setCurrAccDisplayName(const QString& text)
void
AccountAdapter::setCurrentAccountAvatarFile(const QString& source)
{
QtConcurrent::run([this, source]() {
auto futureResult = QtConcurrent::run([this, source]() {
QPixmap image;
if (!image.load(source)) {
qWarning() << "Not a valid image file";
......@@ -298,7 +298,7 @@ AccountAdapter::setCurrentAccountAvatarFile(const QString& source)
void
AccountAdapter::setCurrentAccountAvatarBase64(const QString& data)
{
QtConcurrent::run([this, data]() {
auto futureResult = QtConcurrent::run([this, data]() {
auto accountId = lrcInstance_->get_currentAccountId();
lrcInstance_->accountModel().setAvatar(accountId, data);
});
......@@ -346,7 +346,7 @@ AccountAdapter::exportToFile(const QString& accountId,
void
AccountAdapter::setArchivePasswordAsync(const QString& accountID, const QString& password)
{
QtConcurrent::run([this, accountID, password] {
auto futureResult = QtConcurrent::run([this, accountID, password] {
auto config = lrcInstance_->accountModel().getAccountConfig(accountID);
config.archivePassword = password;
lrcInstance_->accountModel().setAccountConfig(accountID, config);
......
......@@ -129,7 +129,7 @@ AvAdapter::shareAllScreens()
void
AvAdapter::captureScreen(int screenNumber)
{
QtConcurrent::run([this, screenNumber]() {
auto futureResult = QtConcurrent::run([this, screenNumber]() {
QScreen* screen = QGuiApplication::screens().at(screenNumber);
if (!screen)
return;
......@@ -149,7 +149,7 @@ AvAdapter::captureScreen(int screenNumber)
void
AvAdapter::captureAllScreens()
{
QtConcurrent::run([this]() {
auto futureResult = QtConcurrent::run([this]() {
auto screens = QGuiApplication::screens();
QList<QPixmap> scrs;
......@@ -338,7 +338,7 @@ AvAdapter::getScreenNumber() const
// Get display
QString display_env {getenv("DISPLAY")};
if (!display_env.isEmpty()) {
auto list = display_env.split(':', QString::SplitBehavior::SkipEmptyParts);
auto list = display_env.split(':', Qt::SkipEmptyParts);
// Should only be one display, so get the first one
if (list.size() > 0) {
display = list.at(0).toInt();
......
......@@ -344,10 +344,9 @@ CallOverlayModel::eventFilter(QObject* object, QEvent* event)
{
if (event->type() == QEvent::MouseMove) {
auto mouseEvent = static_cast<QMouseEvent*>(event);
QPoint eventPos(mouseEvent->x(), mouseEvent->y());
auto windowItem = static_cast<QQuickWindow*>(object)->contentItem();
Q_FOREACH (const auto& item, watchedItems_) {
if (item->contains(windowItem->mapToItem(item, eventPos))) {
if (item->contains(windowItem->mapToItem(item, mouseEvent->pos()))) {
Q_EMIT mouseMoved(item);
}
}
......
......@@ -16,10 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import net.jami.Models 1.1
import net.jami.Adapters 1.1
......@@ -194,7 +194,6 @@ Window {
visible: false
title: JamiStrings.authenticate
modality: Qt.WindowModal
flags: Qt.WindowStaysOnTopHint