[qt] Fix deprecation warnings
parent
f72f5993c6
commit
3836d4cf23
|
@ -10,8 +10,7 @@ if(APPLE AND EXISTS /usr/local/opt/qt5)
|
|||
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
|
||||
endif()
|
||||
|
||||
set(QT_LIBS Widgets OpenGL)
|
||||
find_package(Qt5 COMPONENTS ${QT_LIBS} CONFIG REQUIRED)
|
||||
find_package(Qt5 COMPONENTS Widgets OpenGL CONFIG REQUIRED)
|
||||
|
||||
set(QT_SOURCES
|
||||
qtappwin.cpp
|
||||
|
@ -68,8 +67,7 @@ endif()
|
|||
add_executable(celestia-qt WIN32 ${QT_SOURCES} ${RC_SRC} ${RES})
|
||||
add_dependencies(celestia-qt celestia)
|
||||
cotire(celestia-qt)
|
||||
qt5_use_modules(celestia-qt ${QT_LIBS})
|
||||
target_link_libraries(celestia-qt celestia)
|
||||
target_link_libraries(celestia-qt Qt5::Widgets Qt5::OpenGL celestia)
|
||||
if(APPLE)
|
||||
set_property(TARGET celestia-qt APPEND_STRING PROPERTY LINK_FLAGS " -framework CoreFoundation")
|
||||
set_property(TARGET celestia-qt APPEND_STRING PROPERTY LINK_FLAGS " -framework CoreServices")
|
||||
|
|
|
@ -401,7 +401,7 @@ BookmarkTreeModel::headerData(int section, Qt::Orientation /* orientation */, in
|
|||
Qt::ItemFlags
|
||||
BookmarkTreeModel::flags(const QModelIndex& index) const
|
||||
{
|
||||
Qt::ItemFlags flags = 0;
|
||||
Qt::ItemFlags flags{QFlag{0}};
|
||||
if (index.isValid())
|
||||
{
|
||||
const BookmarkItem* item = getItem(index);
|
||||
|
|
|
@ -179,7 +179,7 @@ void CelestiaGlWidget::mouseMoveEvent(QMouseEvent* m)
|
|||
int buttons = 0;
|
||||
if (m->buttons() & LeftButton)
|
||||
buttons |= CelestiaCore::LeftButton;
|
||||
if (m->buttons() & MidButton)
|
||||
if (m->buttons() & MiddleButton)
|
||||
buttons |= CelestiaCore::MiddleButton;
|
||||
if (m->buttons() & RightButton)
|
||||
buttons |= CelestiaCore::RightButton;
|
||||
|
@ -237,7 +237,7 @@ void CelestiaGlWidget::mousePressEvent( QMouseEvent* m )
|
|||
|
||||
if (m->button() == LeftButton)
|
||||
appCore->mouseButtonDown(x, y, CelestiaCore::LeftButton);
|
||||
else if (m->button() == MidButton)
|
||||
else if (m->button() == MiddleButton)
|
||||
appCore->mouseButtonDown(x, y, CelestiaCore::MiddleButton);
|
||||
else if (m->button() == RightButton)
|
||||
appCore->mouseButtonDown(x, y, CelestiaCore::RightButton);
|
||||
|
@ -261,7 +261,7 @@ void CelestiaGlWidget::mouseReleaseEvent( QMouseEvent* m )
|
|||
}
|
||||
appCore->mouseButtonUp(x, y, CelestiaCore::LeftButton);
|
||||
}
|
||||
else if (m->button() == MidButton)
|
||||
else if (m->button() == MiddleButton)
|
||||
{
|
||||
appCore->mouseButtonUp(x, y, CelestiaCore::MiddleButton);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue