win: don't repaint superflus
This commit is contained in:
parent
3ed04dedeb
commit
aa489b25d0
|
@ -40,9 +40,6 @@ foreach(_component ${@PROJECT_NAME@_FIND_COMPONENTS})
|
||||||
if(EXISTS "${__targets_file}")
|
if(EXISTS "${__targets_file}")
|
||||||
include("${__targets_file}")
|
include("${__targets_file}")
|
||||||
add_library(${__target} ALIAS @PROJECT_NAME@::${__target_full})
|
add_library(${__target} ALIAS @PROJECT_NAME@::${__target_full})
|
||||||
if(NOT "x${_component}" STREQUAL "xCore")
|
|
||||||
list(APPEND _@PROJECT_NAME@_available_components ${_component})
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(@PROJECT_NAME@_FOUND FALSE)
|
set(@PROJECT_NAME@_FOUND FALSE)
|
||||||
set(@PROJECT_NAME@_NOT_FOUND_MESSAGE "Can't find necessary configuration file for ${__target}, please make sure this component is built successfully and installed properly.")
|
set(@PROJECT_NAME@_NOT_FOUND_MESSAGE "Can't find necessary configuration file for ${__target}, please make sure this component is built successfully and installed properly.")
|
||||||
|
@ -76,6 +73,7 @@ set_package_properties(@PROJECT_NAME@ PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${@PROJECT_NAME@_FOUND})
|
if(${@PROJECT_NAME@_FOUND})
|
||||||
|
list(REMOVE_DUPLICATES _@PROJECT_NAME@_available_components)
|
||||||
find_dependency(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS ${_@PROJECT_NAME@_available_components})
|
find_dependency(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS ${_@PROJECT_NAME@_available_components})
|
||||||
find_dependency(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${_@PROJECT_NAME@_available_components})
|
find_dependency(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${_@PROJECT_NAME@_available_components})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -409,6 +409,11 @@ void FramelessQuickHelperPrivate::repaintAllChildren()
|
||||||
|
|
||||||
void FramelessQuickHelperPrivate::doRepaintAllChildren()
|
void FramelessQuickHelperPrivate::doRepaintAllChildren()
|
||||||
{
|
{
|
||||||
|
repaintTimer.stop();
|
||||||
|
static bool firstTime = true;
|
||||||
|
if (firstTime) {
|
||||||
|
firstTime = false;
|
||||||
|
} else {
|
||||||
Q_Q(const FramelessQuickHelper);
|
Q_Q(const FramelessQuickHelper);
|
||||||
QQuickWindow *window = q->window();
|
QQuickWindow *window = q->window();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
|
@ -441,7 +446,7 @@ void FramelessQuickHelperPrivate::doRepaintAllChildren()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
repaintTimer.stop();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 FramelessQuickHelperPrivate::readyWaitTime() const
|
quint32 FramelessQuickHelperPrivate::readyWaitTime() const
|
||||||
|
|
|
@ -374,15 +374,20 @@ void FramelessWidgetsHelperPrivate::repaintAllChildren()
|
||||||
|
|
||||||
void FramelessWidgetsHelperPrivate::doRepaintAllChildren()
|
void FramelessWidgetsHelperPrivate::doRepaintAllChildren()
|
||||||
{
|
{
|
||||||
|
repaintTimer.stop();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
static bool firstTime = true;
|
||||||
|
if (firstTime) {
|
||||||
|
firstTime = false;
|
||||||
|
} else {
|
||||||
forceWidgetRepaint(window);
|
forceWidgetRepaint(window);
|
||||||
const QList<QWidget *> widgets = window->findChildren<QWidget *>();
|
const QList<QWidget *> widgets = window->findChildren<QWidget *>();
|
||||||
for (auto &&widget : std::as_const(widgets)) {
|
for (auto &&widget : std::as_const(widgets)) {
|
||||||
forceWidgetRepaint(widget);
|
forceWidgetRepaint(widget);
|
||||||
}
|
}
|
||||||
repaintTimer.stop();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 FramelessWidgetsHelperPrivate::readyWaitTime() const
|
quint32 FramelessWidgetsHelperPrivate::readyWaitTime() const
|
||||||
|
|
Loading…
Reference in New Issue