Skip to content

Commit

Permalink
Current version of Psi+ is 1.5.2071
Browse files Browse the repository at this point in the history
It is based on:
* psi: 13f30206
* plugins: 778a4a7
* psimedia: 478567e
* resources: 61d7d6d
  • Loading branch information
tehnick committed Feb 9, 2025
1 parent 7f5ff61 commit 5162ac6
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exclude: '^3rdparty|COPYING|.gitmodules|src/libpsi/tools/zip/minizip'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -18,7 +18,7 @@ repos:
- id: clang-format
files: \.(cpp|h)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
Expand Down
5 changes: 5 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ endif()

option( BUILD_DEV_PLUGINS "Build plugins from dev directory" OFF )
set(MAIN_PROGRAM_NAME "psi" CACHE STRING "Main program name: psi or psi-plus")
option( USE_QT6 "Enable Qt6 support" OFF )

if(USE_QT6)
set(QT_DEFAULT_MAJOR_VERSION 6)
endif()

if(NOT (DEFINED USE_X11))
option( USE_X11 "Enable X11 features support" ON )
Expand Down
3 changes: 3 additions & 0 deletions plugins/cmake/modules/variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ get_filename_component(ABS_INCLUDES_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" A

set(CMAKE_CXX_STANDARD 17)

if(USE_QT6)
set(QT_DEFAULT_MAJOR_VERSION 6)
endif()
if("${QT_DEFAULT_MAJOR_VERSION}" STREQUAL "")
set(QT_DEFAULT_MAJOR_VERSION 5)
endif()
Expand Down
4 changes: 4 additions & 0 deletions plugins/generic/clientswitcherplugin/clientswitcherplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ QWidget *ClientSwitcherPlugin::options()
}

//--
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
connect(ui_options.cb_allaccounts, &QCheckBox::stateChanged, this, &ClientSwitcherPlugin::enableAccountsList);
#else
connect(ui_options.cb_allaccounts, &QCheckBox::checkStateChanged, this, &ClientSwitcherPlugin::enableAccountsList);
#endif
// TODO: update after stopping support of Ubuntu Xenial:
connect(ui_options.cb_accounts, SIGNAL(currentIndexChanged(int)), this, SLOT(restoreOptionsAcc(int)));
connect(ui_options.cmb_lockrequ, SIGNAL(currentIndexChanged(int)), this, SLOT(enableMainParams(int)));
Expand Down
4 changes: 4 additions & 0 deletions plugins/generic/otrplugin/src/psiotrconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ ConfigOtrWidget::ConfigOtrWidget(OptionAccessingHost *optionHost, OtrMessaging *
// TODO: update after stopping support of Ubuntu Xenial:
connect(m_policy, SIGNAL(buttonClicked(int)), this, SLOT(updateOptions()));

#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
connect(m_endWhenOffline, &QCheckBox::stateChanged, this, &ConfigOtrWidget::updateOptions);
#else
connect(m_endWhenOffline, &QCheckBox::checkStateChanged, this, &ConfigOtrWidget::updateOptions);
#endif
}

// ---------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions plugins/generic/stopspamplugin/stopspamplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,15 @@ QWidget *StopSpam::options()
tv_rules->init();
ui_.tvRulesLayout->addWidget(tv_rules);

#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
connect(ui_.cb_send_block_all_mes, &QCheckBox::stateChanged, this, &StopSpam::changeWidgetsState);
connect(ui_.cb_enable_muc, &QCheckBox::stateChanged, this, &StopSpam::changeWidgetsState);
connect(ui_.cb_block_privates, &QCheckBox::stateChanged, this, &StopSpam::changeWidgetsState);
#else
connect(ui_.cb_send_block_all_mes, &QCheckBox::checkStateChanged, this, &StopSpam::changeWidgetsState);
connect(ui_.cb_enable_muc, &QCheckBox::checkStateChanged, this, &StopSpam::changeWidgetsState);
connect(ui_.cb_block_privates, &QCheckBox::checkStateChanged, this, &StopSpam::changeWidgetsState);
#endif

connect(ui_.pb_add, &QPushButton::released, this, &StopSpam::addRow);
connect(ui_.pb_del, &QPushButton::released, this, &StopSpam::removeRow);
Expand Down
3 changes: 3 additions & 0 deletions plugins/variables.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set( MAIN_PROGRAM_NAME "@SHARE_SUFF@" CACHE STRING "Name of main client" )
add_definitions( -DQT_PLUGIN )
include_directories("@plugins_includes_dir@")
set(CMAKE_CXX_STANDARD 17)
if(USE_QT6)
set(QT_DEFAULT_MAJOR_VERSION 6)
endif()
if("${QT_DEFAULT_MAJOR_VERSION}" STREQUAL "")
set(QT_DEFAULT_MAJOR_VERSION 5)
endif()
4 changes: 4 additions & 0 deletions src/widgets/psirichtext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,11 @@ static QString convertIconsToObjectReplacementCharacters(const QStringView &text

std::optional<QTextCharFormat::VerticalAlignment> valign;

#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
QRegularExpressionMatchIterator i = rxName.globalMatch(fragment);
#else
QRegularExpressionMatchIterator i = rxName.globalMatchView(fragment);
#endif
while (i.hasNext()) {
auto match = i.next();
if (match.capturedView(1) == QLatin1String("name")) {
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/psitextview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ class PsiTextView::Private : public QObject {
{
static QRegularExpression attrStart("([a-zA-Z0-9]+)=([\"'])((.(?!\\2))*.)\\2");
// static QRegularExpression attrStart("([a-zA-Z0-9]+)=([\"'])([^\"']*)\\2");
auto it = attrStart.globalMatch(html);
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
auto it = attrStart.globalMatch(html);
#else
auto it = attrStart.globalMatchView(html);
#endif
QMap<QString, QString> attrs;
while (it.hasNext()) {
auto match = it.next();
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.2070 (2025-01-21, 2465ab6e)
1.5.2071 (2025-02-09, 13f30206)

0 comments on commit 5162ac6

Please sign in to comment.