Skip to content

Commit

Permalink
Merge pull request #515 from matterhorn103/qt6
Browse files Browse the repository at this point in the history
Qt6: restore QRegExp port, remove Qt6Core5Compat dependency
  • Loading branch information
ghutchis authored Oct 24, 2024
2 parents 462d32a + 5b33947 commit 8777759
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ jobs:
os: ubuntu-20.04,
cc: "gcc", cxx: "g++",
build_type: "Release",
cmake_flags: "-G Ninja -DINSTALL_BUNDLE_FILES=ON -DCMAKE_BUILD_TYPE=Release",
cmake_flags: "-G Ninja -DBUILD_MOLEQUEUE=OFF -DINSTALL_BUNDLE_FILES=ON -DCMAKE_BUILD_TYPE=Release",
cpack: "",
}
- {
name: "macOS Latest Clang", artifact: "macOS.dmg",
os: macos-latest,
cc: "clang", cxx: "clang++",
build_type: "Release",
cmake_flags: "-G Ninja",
cmake_flags: "-G Ninja -DBUILD_MOLEQUEUE=OFF",
cpack_flags: "-G DragNDrop",
}
- {
name: "Windows Latest MSVC", artifact: "Win64.exe",
os: windows-latest,
cc: "cl", cxx: "cl",
build_type: "Release",
cmake_flags: "",
cmake_flags: "-DBUILD_MOLEQUEUE=OFF",
build_flags: "-j 2",
cpack_flags: "-G NSIS",
ssl_env: "D:\\a\\avogadroapp\\Qt\\Tools\\OpenSSLv3\\Win_x64",
Expand Down
10 changes: 7 additions & 3 deletions avogadro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ if(QT_VERSION EQUAL 6)
Concurrent
Widgets
Network
Core5Compat
OpenGL
OpenGLWidgets
REQUIRED)
else()
find_package(Qt5 COMPONENTS Concurrent Widgets Network REQUIRED)
find_package(Qt5
COMPONENTS
Concurrent
Widgets
Network
REQUIRED)
endif()

configure_file(avogadroappconfig.h.in avogadroappconfig.h)
Expand Down Expand Up @@ -212,7 +216,7 @@ if(ENABLE_TESTING)
target_link_libraries(avogadro QtTesting)
endif()
if(QT_VERSION EQUAL 6)
target_link_libraries(avogadro Qt6::Core5Compat Qt6::OpenGL Qt6::OpenGLWidgets)
target_link_libraries(avogadro Qt6::OpenGL Qt6::OpenGLWidgets)
endif()

if(USE_3DCONNEXION AND (WIN32 OR APPLE))
Expand Down
8 changes: 5 additions & 3 deletions avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2359,10 +2359,12 @@ void MainWindow::registerMoleQueue()
StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File);

// Create patterns list
QList<QRegExp> patterns;
QList<QRegularExpression> patterns;
for (auto it = exts.begin(), itEnd = exts.end(); it != itEnd; ++it) {
patterns << QRegExp(extensionToWildCard(QString::fromStdString(*it)),
Qt::CaseInsensitive, QRegExp::Wildcard);
patterns << QRegularExpression(
QRegularExpression::wildcardToRegularExpression(
extensionToWildCard(QString::fromStdString(*it))),
QRegularExpression::CaseInsensitive);
}

// Register the executable:
Expand Down

0 comments on commit 8777759

Please sign in to comment.