diff --git a/CMakeLists.txt b/CMakeLists.txt index 388928c..7fe40b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(${TARGET} LANGUAGES C CXX) set(CMAKE_AUTOUIC_SEARCH_PATHS ui) set(CMAKE_AUTORCC ON) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_SKIP_RPATH ON) diff --git a/src/crypto.cpp b/src/crypto.cpp index 10d7fef..ab39626 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -218,7 +218,7 @@ void MasterPassword::addIntToString(std::string& str, uint32_t val) std::string MasterPassword::templateForType(MPSiteType type, uint8_t seed_byte) { - if (!(type & MPSiteTypeClassGenerated)) { + if (!(type & ((MPSiteType)MPSiteTypeClassGenerated))) { THROW(EINVALID_PARAMETER); } diff --git a/src/main_window.cpp b/src/main_window.cpp index 2301afc..0ed0190 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -107,8 +107,13 @@ MainWindow::MainWindow(QWidget* parent) #ifndef DISABLE_FILL_FORM_SHORTCUTS m_table_shortcuts[(int)ShortcutAction::FillForm].push_back(QKeySequence(QKeySequence::Paste)); m_table_shortcuts[(int)ShortcutAction::FillForm].push_back(QKeySequence(Qt::Key_P)); - m_table_shortcuts[(int)ShortcutAction::FillFormPasswordOnly].push_back( - QKeySequence(Qt::SHIFT | Qt::Key_P)); + m_table_shortcuts[(int)ShortcutAction::FillFormPasswordOnly].push_back(QKeySequence( +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + Qt::SHIFT + ((Qt::Modifier)Qt::Key_P) +#else + QKeyCombination(Qt::SHIFT, Qt::Key_P) +#endif + )); #endif m_table_shortcuts[(int)ShortcutAction::SelectFilter].push_back(QKeySequence(Qt::Key_Slash)); m_table_shortcuts[(int)ShortcutAction::PreviousItem].push_back(QKeySequence(Qt::Key_K));