Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate all plugins to Qt6 compatibility #1880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions avogadro/qtplugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ add_subdirectory(copypaste)
add_subdirectory(cp2kinput)
add_subdirectory(crystal)
add_subdirectory(customelements)
# add_subdirectory(dipole)
add_subdirectory(dipole)
add_subdirectory(editor)
add_subdirectory(fetchpdb)
add_subdirectory(focus)
Expand All @@ -131,9 +131,17 @@ add_subdirectory(networkdatabases)
add_subdirectory(openbabel)
add_subdirectory(openmminput)
add_subdirectory(playertool)
if(USE_LIBARCHIVE)
add_subdirectory(plugindownloader)
endif()
add_subdirectory(ply)
add_subdirectory(povray)
add_subdirectory(propertytables)
if(BUILD_GPL_PLUGINS AND QT_VERSION EQUAL 5)
# todo - update for Qt6
# qtaimcurvature.h/cpp contains GPL licensed code:
add_subdirectory(qtaim)
endif()
add_subdirectory(resetview)
add_subdirectory(select)
add_subdirectory(selectiontool)
Expand All @@ -142,6 +150,9 @@ if(USE_SPGLIB)
endif()
add_subdirectory(surfaces)
add_subdirectory(svg)
if(USE_LIBMSYM)
add_subdirectory(symmetry)
endif()
add_subdirectory(templatetool)
add_subdirectory(vibrations)
add_subdirectory(vrml)
Expand All @@ -164,14 +175,6 @@ add_subdirectory(quantuminput)
add_subdirectory(scriptcharges)
add_subdirectory(scriptfileformats)

if(USE_LIBARCHIVE)
add_subdirectory(plugindownloader)
endif()

if(USE_LIBMSYM AND QT_VERSION EQUAL 5)
# QStyleOptionViewItemV4 is not in Qt6, needs investigation
add_subdirectory(symmetry)
endif()

# The scene plugins
add_subdirectory(ballandstick)
Expand All @@ -187,12 +190,6 @@ if (USE_OPENGL)
add_subdirectory(overlayaxes)
endif()

# other optional plugins
if(BUILD_GPL_PLUGINS AND QT_VERSION EQUAL 5)
# qtaimcurvature.h/cpp contains GPL licensed code:
add_subdirectory(qtaim)
endif()

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${original_library_output_dir}")

# Add all of the static plugins to the initialization file.
Expand Down
6 changes: 4 additions & 2 deletions avogadro/qtplugins/symmetry/symmetryscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <avogadro/rendering/spheregeometry.h>

#include <QtCore/QDebug>
#include <QtCore/QVariant>

#include <QVector3D>

Expand All @@ -36,7 +37,8 @@ using Rendering::SphereGeometry;

SymmetryScene::SymmetryScene(QObject* p)
: QtGui::ScenePlugin(p), m_enabled(true)
{}
{
}

SymmetryScene::~SymmetryScene() {}

Expand Down Expand Up @@ -145,4 +147,4 @@ void SymmetryScene::setEnabled(bool enable)
{
m_enabled = enable;
}
} // namespace Avogadro
} // namespace Avogadro::QtPlugins
4 changes: 2 additions & 2 deletions avogadro/qtplugins/symmetry/symmetryutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ QString pointGroupSymbol(const char* point_group)

// check if we need an infinity symbol
if (pointGroup[1] == '0')
pointGroup = pointGroup.replace(1, 1, QObject::trUtf8("\u221e"));
pointGroup = pointGroup.replace(1, 1, "\u221e");

// After first character, point group should subscript everything
pointGroup.insert(1, "<sub>");
Expand Down Expand Up @@ -70,4 +70,4 @@ QString operationSymbol(const msym::msym_symmetry_operation_t* operation)

return symbol;
}
} // namespace Avogadro
} // namespace Avogadro::QtPlugins::SymmetryUtil
Loading