Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
cd79dd8f
Commit
cd79dd8f
authored
May 11, 2020
by
Jan
Browse files
Backward compatible ifdefs for Qt Version
parent
655ba178
Changes
2
Hide whitespace changes
Inline
Side-by-side
Core/PluginLoader.cc
View file @
cd79dd8f
...
...
@@ -316,9 +316,12 @@ void Core::loadPlugins()
* Remove static plugins from dynamically loaded list.
*/
{
QStringList
list
=
QString
::
fromUtf8
(
cmake
::
static_plugins
).
split
(
"
\n
"
);
// This warning couöld be fixed when the minimal Qt Version is >= 5.14
QSet
<
QString
>
staticPlugins
=
QSet
<
QString
>::
fromList
(
list
);
QStringList
list
=
QString
::
fromUtf8
(
cmake
::
static_plugins
).
split
(
"
\n
"
);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QSet
<
QString
>
staticPlugins
=
QSet
<
QString
>
(
list
.
begin
(),
list
.
end
());
#else
QSet
<
QString
>
staticPlugins
=
QSet
<
QString
>::
fromList
(
list
);
#endif
for
(
int
i
=
0
;
i
<
pluginlist
.
size
();
)
{
const
QString
bn
=
QFileInfo
(
pluginlist
[
i
]).
fileName
();
if
(
staticPlugins
.
contains
(
bn
))
{
...
...
widgets/coreWidget/viewerControl.cc
View file @
cd79dd8f
...
...
@@ -504,11 +504,14 @@ void CoreWidget::applicationSnapshotDialog() {
OpenFlipperSettings
().
setValue
(
"Core/CurrentDir"
,
QFileInfo
(
newName
).
absolutePath
()
);
snapshotName_
=
newName
;
dialog
.
hide
();
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pic
=
screen
->
grabWindow
(
winId
()
);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pic
=
screen
->
grabWindow
(
winId
()
);
#else
QPixmap
pic
=
QPixmap
::
grabWindow
(
winId
()
);
#endif
QPainter
painter
(
&
pic
);
...
...
@@ -535,8 +538,13 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application
void
CoreWidget
::
applicationSnapshot
()
{
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pix
=
screen
->
grabWindow
(
winId
()
);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pix
=
screen
->
grabWindow
(
winId
()
);
#else
QPixmap
pix
=
QPixmap
::
grabWindow
(
winId
()
).
#endif
// Write image asynchronously
QImage
*
pic
=
new
QImage
(
pix
.
toImage
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment