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
9277a0d7
Commit
9277a0d7
authored
May 11, 2020
by
Jan Möbius
Browse files
Merge branch 'Fix_warnings_Qt' into 'master'
Fix warnings qt See merge request
!185
parents
b415bedd
e246a14e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Core/Core.cc
View file @
9277a0d7
...
...
@@ -270,7 +270,8 @@ Core::init() {
connect
(
coreWidget_
->
logWidget_
->
openMeshFilterAction_
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
enableOpenMeshErrorLog
(
bool
))
);
QRect
rect
=
QApplication
::
desktop
()
->
screenGeometry
();
QScreen
*
screen
=
QGuiApplication
::
primaryScreen
();
QRect
rect
=
screen
->
geometry
();
uint
width
=
rect
.
width
();
if
(
width
>
1000
)
{
...
...
Core/PluginLoader.cc
View file @
9277a0d7
...
...
@@ -316,8 +316,12 @@ void Core::loadPlugins()
* Remove static plugins from dynamically loaded list.
*/
{
QSet
<
QString
>
staticPlugins
=
QSet
<
QString
>::
fromList
(
QString
::
fromUtf8
(
cmake
::
static_plugins
).
split
(
"
\n
"
));
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
))
{
...
...
OpenFlipper.cc
View file @
9277a0d7
...
...
@@ -590,7 +590,7 @@ QSurfaceFormat createFormat(QSurfaceFormat::OpenGLContextProfile _profile, int _
if
(
_profile
!=
QSurfaceFormat
::
CoreProfile
)
format
.
setOption
(
QSurfaceFormat
::
DeprecatedFunctions
);
if
(
_debugContext
)
format
.
setOption
(
format
.
options
()
|
QSurfaceFormat
::
DebugContext
);
format
.
setOption
(
QSurfaceFormat
::
DebugContext
);
return
format
;
}
...
...
@@ -739,7 +739,6 @@ int main(int argc, char **argv)
// OpenGL check
QApplication
::
setAttribute
(
Qt
::
AA_ShareOpenGLContexts
);
QApplication
::
setColorSpec
(
QApplication
::
CustomColor
);
// Try creating a valid OpenGL context
/******************************/
...
...
libs_required/ACG/QtWidgets/QtWheel.cc
View file @
9277a0d7
...
...
@@ -303,7 +303,7 @@ void QtWheel::redrawPixmap() {
QPainter
paint
;
paint
.
begin
(
&
pixmap_
);
pixmap_
.
fill
(
palette
().
background
().
color
()
);
pixmap_
.
fill
(
palette
().
window
().
color
()
);
// coords of wheel frame
QRect
contents
=
contentsRect
();
...
...
widgets/coreWidget/viewerControl.cc
View file @
9277a0d7
...
...
@@ -504,10 +504,14 @@ void CoreWidget::applicationSnapshotDialog() {
OpenFlipperSettings
().
setValue
(
"Core/CurrentDir"
,
QFileInfo
(
newName
).
absolutePath
()
);
snapshotName_
=
newName
;
dialog
.
hide
();
//grabs only the widget (espacially in windows)
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap
pic
=
QPixmap
::
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
);
...
...
@@ -534,8 +538,16 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application
void
CoreWidget
::
applicationSnapshot
()
{
#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
(
QPixmap
::
grabWindow
(
winId
()
)
.
toImage
());
QImage
*
pic
=
new
QImage
(
pix
.
toImage
()
);
writeImageAsynchronously
(
pic
,
suggestSnapshotFilename
(
snapshotName_
));
}
...
...
widgets/helpWidget/helpWidget.cc
View file @
9277a0d7
...
...
@@ -231,7 +231,7 @@ void HelpWidget::linkActivated(const QUrl& _url) {
void
HelpWidget
::
startSearch
()
{
searchEngine_
->
search
(
searchEngine_
->
queryWidget
()
->
query
());
searchEngine_
->
search
(
searchEngine_
->
queryWidget
()
->
searchInput
());
}
void
HelpWidget
::
setHomeSite
(
const
QString
&
_homeSite
)
{
...
...
widgets/postProcessorWidget/postProcessorWidget.cc
View file @
9277a0d7
...
...
@@ -217,7 +217,7 @@ void PostProcessorDialog::slotMovePostProcessor(unsigned _from,unsigned _to)
QFrame
*
frame
=
createFrame
(
*
postProcessorManager
()[
activeRowToRow_
[
_from
]]);
activeItem
->
setSizeHint
(
frame
->
sizeHint
());
activeList
->
setItemWidget
(
activeItem
,
frame
);
active
List
->
set
Item
Selected
(
activeItem
,
true
);
active
Item
->
setSelected
(
true
);
//swap postprocessor
const
int
chainPos
=
_from
;
...
...
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