Transfer to newer connect() usage.
This commit is contained in:
parent
2f7337336e
commit
032f12bacf
@ -488,12 +488,12 @@ bool FeedsModel::addServiceAccount(ServiceRoot *root, bool freshly_activated) {
|
||||
endInsertRows();
|
||||
|
||||
// Connect.
|
||||
connect(root, SIGNAL(itemRemovalRequested(RootItem*)), this, SLOT(removeItem(RootItem*)));
|
||||
connect(root, SIGNAL(itemReassignmentRequested(RootItem*,RootItem*)), this, SLOT(reassignNodeToNewParent(RootItem*,RootItem*)));
|
||||
connect(root, SIGNAL(dataChanged(QList<RootItem*>)), this, SLOT(onItemDataChanged(QList<RootItem*>)));
|
||||
connect(root, SIGNAL(reloadMessageListRequested(bool)), this, SIGNAL(reloadMessageListRequested(bool)));
|
||||
connect(root, SIGNAL(itemExpandRequested(QList<RootItem*>,bool)), this, SIGNAL(itemExpandRequested(QList<RootItem*>,bool)));
|
||||
connect(root, SIGNAL(itemExpandStateSaveRequested(RootItem*)), this, SIGNAL(itemExpandStateSaveRequested(RootItem*)));
|
||||
connect(root, &ServiceRoot::itemRemovalRequested, this, static_cast<void (FeedsModel::*)(RootItem*)>(&FeedsModel::removeItem));
|
||||
connect(root, &ServiceRoot::itemReassignmentRequested, this, &FeedsModel::reassignNodeToNewParent);
|
||||
connect(root, &ServiceRoot::dataChanged, this, &FeedsModel::onItemDataChanged);
|
||||
connect(root, &ServiceRoot::reloadMessageListRequested, this, &FeedsModel::reloadMessageListRequested);
|
||||
connect(root, &ServiceRoot::itemExpandRequested, this, &FeedsModel::itemExpandRequested);
|
||||
connect(root, &ServiceRoot::itemExpandStateSaveRequested, this, &FeedsModel::itemExpandStateSaveRequested);
|
||||
|
||||
root->start(freshly_activated);
|
||||
return true;
|
||||
|
@ -82,9 +82,9 @@ ShortcutCatcher::ShortcutCatcher(QWidget *parent)
|
||||
m_layout->addWidget(m_btnClear);
|
||||
|
||||
// Establish needed connections.
|
||||
connect(m_btnReset, SIGNAL(clicked()), this, SLOT(resetShortcut()));
|
||||
connect(m_btnClear, SIGNAL(clicked()), this, SLOT(clearShortcut()));
|
||||
connect(m_btnChange, SIGNAL(clicked()), this, SLOT(startRecording()));
|
||||
connect(m_btnReset, &QToolButton::clicked, this, &ShortcutCatcher::resetShortcut);
|
||||
connect(m_btnClear, &QToolButton::clicked, this, &ShortcutCatcher::clearShortcut);
|
||||
connect(m_btnChange, &QToolButton::clicked, this, &ShortcutCatcher::startRecording);
|
||||
|
||||
// Prepare initial state of the control.
|
||||
updateDisplayShortcut();
|
||||
|
@ -22,6 +22,9 @@
|
||||
#include "core/feedsmodel.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
|
||||
#include <QListWidget>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
|
||||
FormAddAccount::FormAddAccount(const QList<ServiceEntryPoint*> &entry_points, FeedsModel *model, QWidget *parent)
|
||||
: QDialog(parent), m_ui(new Ui::FormAddAccount), m_model(model), m_entryPoints(entry_points) {
|
||||
@ -31,9 +34,9 @@ FormAddAccount::FormAddAccount(const QList<ServiceEntryPoint*> &entry_points, Fe
|
||||
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint);
|
||||
setWindowIcon(qApp->icons()->fromTheme(QSL("document-new")));
|
||||
|
||||
connect(m_ui->m_listEntryPoints, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(addSelectedAccount()));
|
||||
connect(m_ui->m_buttonBox, SIGNAL(accepted()), this, SLOT(addSelectedAccount()));
|
||||
connect(m_ui->m_listEntryPoints, SIGNAL(itemSelectionChanged()), this, SLOT(displayActiveEntryPointDetails()));
|
||||
connect(m_ui->m_listEntryPoints, &QListWidget::itemDoubleClicked, this, &FormAddAccount::addSelectedAccount);
|
||||
connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &FormAddAccount::addSelectedAccount);
|
||||
connect(m_ui->m_listEntryPoints, &QListWidget::itemSelectionChanged, this, &FormAddAccount::displayActiveEntryPointDetails);
|
||||
loadEntryPoints();
|
||||
}
|
||||
|
||||
|
@ -338,13 +338,8 @@ SettingsProperties Settings::determineProperties() {
|
||||
|
||||
properties.m_settingsSuffix = QDir::separator() + QString(APP_CFG_PATH) + QDir::separator() + QString(APP_CFG_FILE);
|
||||
|
||||
const QString exe_path = qApp->applicationDirPath();
|
||||
const QString app_path = qApp->getUserDataAppPath();
|
||||
const QString home_path = qApp->getUserDataHomePath();
|
||||
const QString home_path_file = home_path + properties.m_settingsSuffix;
|
||||
|
||||
const bool portable_settings_available = IOFactory::isFolderWritable(exe_path);
|
||||
const bool non_portable_settings_exist = QFile::exists(home_path_file);
|
||||
|
||||
// We will use PORTABLE settings only and only if it is available and NON-PORTABLE
|
||||
// settings was not initialized before.
|
||||
@ -352,6 +347,10 @@ SettingsProperties Settings::determineProperties() {
|
||||
// DO NOT use portable settings for Linux, it is really not used on that platform.
|
||||
const bool will_we_use_portable_settings = false;
|
||||
#else
|
||||
const QString exe_path = qApp->applicationDirPath();
|
||||
const QString home_path_file = home_path + properties.m_settingsSuffix;
|
||||
const bool portable_settings_available = IOFactory::isFolderWritable(exe_path);
|
||||
const bool non_portable_settings_exist = QFile::exists(home_path_file);
|
||||
const bool will_we_use_portable_settings = portable_settings_available && !non_portable_settings_exist;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user