Commit 5cd3170b authored by David Edmundson's avatar David Edmundson
Browse files

Port old style connects

Done by clazy
parent af39f0ae
......@@ -85,7 +85,7 @@ void Backend::setToolTipItem(QQuickItem *item)
if (item != m_toolTipItem) {
m_toolTipItem = item;
connect(item, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(toolTipWindowChanged(QQuickWindow*)));
connect(item, &QQuickItem::windowChanged, this, &Backend::toolTipWindowChanged);
emit toolTipItemChanged();
}
......
......@@ -1226,11 +1226,11 @@ void FolderModel::drop(QQuickItem *target, QObject* dropEvent, int row)
};
// remember drop target position for target URL and forget about the source URL
connect(copyJob, &KIO::CopyJob::copyingDone,
this, [this, map](KIO::Job *, const QUrl &, const QUrl &targetUrl, const QDateTime &, bool, bool) {
this, [ map](KIO::Job *, const QUrl &, const QUrl &targetUrl, const QDateTime &, bool, bool) {
map(targetUrl);
});
connect(copyJob, &KIO::CopyJob::copyingLinkDone,
this, [this, map](KIO::Job *, const QUrl &, const QString &, const QUrl &targetUrl) {
this, [ map](KIO::Job *, const QUrl &, const QString &, const QUrl &targetUrl) {
map(targetUrl);
});
});
......
......@@ -76,9 +76,9 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent) : QObject(parent)
action->setData(int(KDirModel::ModifiedTime));
m_sortMode->addAction(action);
menu->addSeparator();
m_sortDesc = menu->addAction(i18n("Descending"), this, SIGNAL(sortDescChanged()));
m_sortDesc = menu->addAction(i18n("Descending"), this, &ViewPropertiesMenu::sortDescChanged);
m_sortDesc->setCheckable(true);
m_sortDirsFirst = menu->addAction(i18n("Folders First"), this, SIGNAL(sortDirsFirstChanged()));
m_sortDirsFirst = menu->addAction(i18n("Folders First"), this, &ViewPropertiesMenu::sortDirsFirstChanged);
m_sortDirsFirst->setCheckable(true);
m_iconSizeMenu = m_menu->addMenu(i18n("Icon Size"));
......@@ -97,7 +97,7 @@ ViewPropertiesMenu::ViewPropertiesMenu(QObject *parent) : QObject(parent)
m_previews = m_menu->addAction(QIcon::fromTheme(QStringLiteral("view-preview")), i18n("Show Previews"), this, &ViewPropertiesMenu::previewsChanged);
m_previews->setCheckable(true);
m_locked = m_menu->addAction(QIcon::fromTheme(QStringLiteral("lock")), i18n("Locked"), this, SIGNAL(lockedChanged()));
m_locked = m_menu->addAction(QIcon::fromTheme(QStringLiteral("lock")), i18n("Locked"), this, &ViewPropertiesMenu::lockedChanged);
m_locked->setCheckable(true);
}
......
......@@ -77,7 +77,7 @@ PanelAgent::PanelAgent(QObject *parent)
QDBusConnection(QStringLiteral("kimpanel_bus")).connect(QString(), QString(), QStringLiteral("org.kde.kimpanel.inputmethod"),
QStringLiteral("ExecMenu"), this, SLOT(ExecMenu(QStringList)));
connect(watcher, SIGNAL(serviceUnregistered(QString)), this, SLOT(serviceUnregistered(QString)));
connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &PanelAgent::serviceUnregistered);
}
PanelAgent::~PanelAgent()
......
......@@ -26,24 +26,24 @@ KimpanelInputPanelContainer::KimpanelInputPanelContainer(QObject* parent, PanelA
DataContainer(parent),
m_panelAgent(panelAgent)
{
connect(m_panelAgent, SIGNAL(updateAux(QString, QList<TextAttribute>)), this, SLOT(updateAux(QString, QList<TextAttribute>)));
connect(m_panelAgent, SIGNAL(updatePreeditText(QString, QList<TextAttribute>)), this, SLOT(updatePreeditText(QString, QList<TextAttribute>)));
connect(m_panelAgent, SIGNAL(updatePreeditCaret(int)), this, SLOT(updatePreeditCaret(int)));
connect(m_panelAgent, SIGNAL(updateLookupTable(KimpanelLookupTable)), this, SLOT(updateLookupTable(KimpanelLookupTable)));
connect(m_panelAgent, SIGNAL(updateSpotLocation(int,int)), this, SLOT(updateSpotLocation(int,int)));
connect(m_panelAgent, SIGNAL(updateSpotRect(int, int, int, int)), this, SLOT(updateSpotRect(int, int, int, int)));
connect(m_panelAgent, SIGNAL(showAux(bool)), this, SLOT(showAux(bool)));
connect(m_panelAgent, SIGNAL(showPreedit(bool)), this, SLOT(showPreedit(bool)));
connect(m_panelAgent, SIGNAL(showLookupTable(bool)), this, SLOT(showLookupTable(bool)));
connect(m_panelAgent, SIGNAL(updateLookupTableCursor(int)), this, SLOT(updateLookupTableCursor(int)));
connect(m_panelAgent, SIGNAL(updateLookupTableFull(KimpanelLookupTable,int,int)), this, SLOT(updateLookupTableFull(KimpanelLookupTable,int,int)));
connect(m_panelAgent, &PanelAgent::updateAux, this, &KimpanelInputPanelContainer::updateAux);
connect(m_panelAgent, &PanelAgent::updatePreeditText, this, &KimpanelInputPanelContainer::updatePreeditText);
connect(m_panelAgent, &PanelAgent::updatePreeditCaret, this, &KimpanelInputPanelContainer::updatePreeditCaret);
connect(m_panelAgent, &PanelAgent::updateLookupTable, this, &KimpanelInputPanelContainer::updateLookupTable);
connect(m_panelAgent, &PanelAgent::updateSpotLocation, this, &KimpanelInputPanelContainer::updateSpotLocation);
connect(m_panelAgent, &PanelAgent::updateSpotRect, this, &KimpanelInputPanelContainer::updateSpotRect);
connect(m_panelAgent, &PanelAgent::showAux, this, &KimpanelInputPanelContainer::showAux);
connect(m_panelAgent, &PanelAgent::showPreedit, this, &KimpanelInputPanelContainer::showPreedit);
connect(m_panelAgent, &PanelAgent::showLookupTable, this, &KimpanelInputPanelContainer::showLookupTable);
connect(m_panelAgent, &PanelAgent::updateLookupTableCursor, this, &KimpanelInputPanelContainer::updateLookupTableCursor);
connect(m_panelAgent, &PanelAgent::updateLookupTableFull, this, &KimpanelInputPanelContainer::updateLookupTableFull);
}
Plasma::Service* KimpanelInputPanelContainer::service(QObject* parent)
{
KimpanelService *controller = new KimpanelService(parent, QLatin1String(INPUTPANEL_SOURCE_NAME), m_panelAgent);
connect(this, SIGNAL(updateRequested(DataContainer*)),
controller, SLOT(enableKimpanelOperations()));
connect(this, &Plasma::DataContainer::updateRequested,
controller, &KimpanelService::enableKimpanelOperations);
return controller;
}
......
......@@ -26,17 +26,17 @@ KimpanelStatusBarContainer::KimpanelStatusBarContainer(QObject* parent, PanelAge
DataContainer(parent),
m_panelAgent(panelAgent)
{
connect(m_panelAgent, SIGNAL(updateProperty(KimpanelProperty)), this, SLOT(updateProperty(KimpanelProperty)));
connect(m_panelAgent, SIGNAL(registerProperties(QList<KimpanelProperty>)), this, SLOT(registerProperties(QList<KimpanelProperty>)));
connect(m_panelAgent, SIGNAL(execMenu(QList<KimpanelProperty>)), this, SLOT(execMenu(QList<KimpanelProperty>)));
connect(m_panelAgent, SIGNAL(execDialog(KimpanelProperty)), this, SLOT(execDialog(KimpanelProperty)));
connect(m_panelAgent, &PanelAgent::updateProperty, this, &KimpanelStatusBarContainer::updateProperty);
connect(m_panelAgent, &PanelAgent::registerProperties, this, &KimpanelStatusBarContainer::registerProperties);
connect(m_panelAgent, &PanelAgent::execMenu, this, &KimpanelStatusBarContainer::execMenu);
connect(m_panelAgent, &PanelAgent::execDialog, this, &KimpanelStatusBarContainer::execDialog);
}
Plasma::Service* KimpanelStatusBarContainer::service(QObject* parent)
{
KimpanelService *controller = new KimpanelService(parent, QLatin1String(STATUSBAR_SOURCE_NAME), m_panelAgent);
connect(this, SIGNAL(updateRequested(DataContainer*)),
controller, SLOT(enableKimpanelOperations()));
connect(this, &Plasma::DataContainer::updateRequested,
controller, &KimpanelService::enableKimpanelOperations);
return controller;
}
......
......@@ -108,19 +108,19 @@ PrivacyTab::PrivacyTab(QWidget *parent)
// React to changes
connect(d->radioRememberAllApplications, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(d->radioDontRememberApplications, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(d->radioRememberAllApplications, &QAbstractButton::toggled, this, &PrivacyTab::changed);
connect(d->radioDontRememberApplications, &QAbstractButton::toggled, this, &PrivacyTab::changed);
connect(d->spinKeepHistory, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
connect(d->blacklistedApplicationsModel, SIGNAL(changed()), this, SIGNAL(changed()));
connect(d->blacklistedApplicationsModel, &BlacklistedApplicationsModel::changed, this, &PrivacyTab::changed);
connect(d->radioRememberSpecificApplications, SIGNAL(toggled(bool)),
d->blacklistedApplicationsModel, SLOT(setEnabled(bool)));
connect(d->radioRememberSpecificApplications, &QAbstractButton::toggled,
d->blacklistedApplicationsModel, &BlacklistedApplicationsModel::setEnabled);
connect(d->radioRememberSpecificApplications, SIGNAL(toggled(bool)),
d->viewBlacklistedApplicationsContainer, SLOT(setEnabled(bool)));
connect(d->radioRememberSpecificApplications, &QAbstractButton::toggled,
d->viewBlacklistedApplicationsContainer, &QWidget::setEnabled);
connect(d->radioRememberSpecificApplications, SIGNAL(toggled(bool)),
d->checkBlacklistAllNotOnList, SLOT(setEnabled(bool)));
connect(d->radioRememberSpecificApplications, &QAbstractButton::toggled,
d->checkBlacklistAllNotOnList, &QWidget::setEnabled);
defaults();
......
......@@ -77,8 +77,8 @@ SwitchingTab::SwitchingTab(QWidget *parent)
connect(d->scActivities, &KShortcutsEditor::keyChange,
this, [this] { changed(); });
connect(d->checkRememberVirtualDesktop, SIGNAL(toggled(bool)),
this, SIGNAL(changed()));
connect(d->checkRememberVirtualDesktop, &QAbstractButton::toggled,
this, &SwitchingTab::changed);
defaults();
}
......
......@@ -134,7 +134,7 @@ void ColorsModel::setSelectedScheme(const QString &scheme)
int ColorsModel::indexOfScheme(const QString &scheme) const
{
auto it = std::find_if(m_data.begin(), m_data.end(), [this, &scheme](const ColorsModelData &item) {
auto it = std::find_if(m_data.begin(), m_data.end(), [ &scheme](const ColorsModelData &item) {
return item.schemeName == scheme;
});
......
......@@ -57,8 +57,8 @@ ExportSchemeDialog::ExportSchemeDialog(QStringList components, QWidget *parent)
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
mainLayout->addWidget(buttonBox);
}
......
......@@ -229,9 +229,9 @@ void KGlobalShortcutsEditor::KGlobalShortcutsEditorPrivate::initGUI()
// Build the menu
QMenu *menu = new QMenu(q);
menu->addAction( QIcon::fromTheme(QStringLiteral("document-import")), i18n("Import Scheme..."), q, SLOT(importScheme()));
menu->addAction( QIcon::fromTheme(QStringLiteral("document-export")), i18n("Export Scheme..."), q, SLOT(exportScheme()));
menu->addAction( i18n("Set All Shortcuts to None"), q, SLOT(clearConfiguration()));
menu->addAction( QIcon::fromTheme(QStringLiteral("document-import")), i18n("Import Scheme..."), q, &KGlobalShortcutsEditor::importScheme);
menu->addAction( QIcon::fromTheme(QStringLiteral("document-export")), i18n("Export Scheme..."), q, &KGlobalShortcutsEditor::exportScheme);
menu->addAction( i18n("Set All Shortcuts to None"), q, &KGlobalShortcutsEditor::clearConfiguration);
connect(ui.addButton, &QToolButton::clicked, [this]() {
if (!selectApplicationDialogUi.treeView->model()) {
......
......@@ -388,9 +388,9 @@ void CPrinter::print(const QList<Misc::TFont> &items, int size)
itsProgress->setRange(0, items.count());
itsProgress->setValue(0);
progress(0, QString());
connect(thread, SIGNAL(progress(int,QString)), SLOT(progress(int,QString)));
connect(thread, SIGNAL(finished()), SLOT(accept()));
connect(this, SIGNAL(cancelled()), thread, SLOT(cancel()));
connect(thread, &CPrintThread::progress, this, &CPrinter::progress);
connect(thread, &QThread::finished, this, &QDialog::accept);
connect(this, &CPrinter::cancelled, thread, &CPrintThread::cancel);
itsActionLabel->startAnimation();
thread->start();
exec();
......
......@@ -60,8 +60,8 @@ CViewer::CViewer()
itsPrintAct->setEnabled(false);
if(itsPreview->browserExtension())
connect(itsPreview->browserExtension(), SIGNAL(enableAction(const char*,bool)),
this, SLOT(enableAction(const char*,bool)));
connect(itsPreview->browserExtension(), &KParts::BrowserExtension::enableAction,
this, &CViewer::enableAction);
setCentralWidget(itsPreview->widget());
createGUI(itsPreview);
......
......@@ -122,8 +122,8 @@ FontInst::FontInst()
registerSignalHandler(signalHander);
itsConnectionsTimer=new QTimer(this);
itsFontListTimer=new QTimer(this);
connect(itsConnectionsTimer, SIGNAL(timeout()), SLOT(connectionsTimeout()));
connect(itsFontListTimer, SIGNAL(timeout()), SLOT(fontListTimeout()));
connect(itsConnectionsTimer, &QTimer::timeout, this, &FontInst::connectionsTimeout);
connect(itsFontListTimer, &QTimer::timeout, this, &FontInst::fontListTimeout);
itsConnectionsTimer->start(constConnectionsTimeout);
itsFontListTimer->start(constFontListTimeout);
......
......@@ -73,7 +73,7 @@ CActionLabel::CActionLabel(QWidget *parent)
setPixmap(*theIcons[0]);
itsTimer=new QTimer(this);
connect(itsTimer, SIGNAL(timeout()), SLOT(rotateIcon()));
connect(itsTimer, &QTimer::timeout, this, &CActionLabel::rotateIcon);
}
CActionLabel::~CActionLabel()
......
......@@ -94,7 +94,7 @@ CDuplicatesDialog::CDuplicatesDialog(QWidget *parent, CFontList *fl)
layout->addWidget(itsView, 1, 0, 1, 2);
itsFontFileList=new CFontFileList(this);
connect(itsFontFileList, SIGNAL(finished()), SLOT(scanFinished()));
connect(itsView, SIGNAL(haveDeletions(bool)), SLOT(enableButtonOk(bool)));
connect(itsView, &CFontFileListView::haveDeletions, this, &CDuplicatesDialog::enableButtonOk);
}
int CDuplicatesDialog::exec()
......@@ -234,7 +234,7 @@ void CDuplicatesDialog::slotButtonClicked(QAbstractButton *button)
CJobRunner runner(this);
connect(&runner, SIGNAL(configuring()), itsFontList, SLOT(unsetSlowUpdates()));
connect(&runner, &CJobRunner::configuring, itsFontList, &CFontList::unsetSlowUpdates);
runner.exec(CJobRunner::CMD_REMOVE_FILE, itsView->getMarkedItems(), false);
itsFontList->setSlowUpdates(false);
itsView->removeFiles();
......@@ -437,14 +437,14 @@ CFontFileListView::CFontFileListView(QWidget *parent)
itsMenu=new QMenu(this);
if(!Misc::app(KFI_VIEWER).isEmpty())
itsMenu->addAction(QIcon::fromTheme("kfontview"), i18n("Open in Font Viewer"),
this, SLOT(openViewer()));
this, &CFontFileListView::openViewer);
itsMenu->addAction(QIcon::fromTheme("document-properties"), i18n("Properties"),
this, SLOT(properties()));
this, &CFontFileListView::properties);
itsMenu->addSeparator();
itsUnMarkAct=itsMenu->addAction(i18n("Unmark for Deletion"),
this, SLOT(unmark()));
this, &CFontFileListView::unmark);
itsMarkAct=itsMenu->addAction(QIcon::fromTheme("edit-delete"), i18n("Mark for Deletion"),
this, SLOT(mark()));
this, &CFontFileListView::mark);
connect(this, SIGNAL(itemSelectionChanged()), SLOT(selectionChanged()));
connect(this, SIGNAL(itemClicked(QTreeWidgetItem*,int)), SLOT(clicked(QTreeWidgetItem*,int)));
......
......@@ -61,7 +61,7 @@ void CFcQuery::run(const QString &query)
args << "-v" << query;
connect(itsProc, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(procExited()));
connect(itsProc, SIGNAL(readyReadStandardOutput()), SLOT(data()));
connect(itsProc, &QProcess::readyReadStandardOutput, this, &CFcQuery::data);
itsProc->start("fc-match", args);
}
......
......@@ -146,7 +146,7 @@ CFontFilter::CFontFilter(QWidget *parent)
m_menuButton->setText(i18n("Set Criteria"));
m_layout->addWidget(m_menuButton);
connect(m_lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
connect(m_lineEdit, &QLineEdit::textChanged, this, &CFontFilter::textChanged);
m_menu=new QMenu(this);
m_menuButton->setMenu(m_menu);
......@@ -359,7 +359,7 @@ void CFontFilter::addAction(ECriteria crit, bool on)
itsActions[crit]->setChecked(on);
if(on)
m_lineEdit->setPlaceholderText(i18n("Filter by %1...", itsTexts[crit]));
connect(itsActions[crit], SIGNAL(toggled(bool)), SLOT(filterChanged()));
connect(itsActions[crit], &QAction::toggled, this, &CFontFilter::filterChanged);
}
void CFontFilter::setCriteria(ECriteria crit)
......
......@@ -457,10 +457,10 @@ CFontList::CFontList(QWidget *parent)
QDBusConnection::sessionBus(),
QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)), SLOT(dbusServiceOwnerChanged(QString,QString,QString)));
connect(CJobRunner::dbus(), SIGNAL(fontsAdded(KFI::Families)), SLOT(fontsAdded(KFI::Families)));
connect(CJobRunner::dbus(), SIGNAL(fontsRemoved(KFI::Families)), SLOT(fontsRemoved(KFI::Families)));
connect(CJobRunner::dbus(), SIGNAL(fontList(int,QList<KFI::Families>)), SLOT(fontList(int,QList<KFI::Families>)));
connect(watcher, &QDBusServiceWatcher::serviceOwnerChanged, this, &CFontList::dbusServiceOwnerChanged);
connect(CJobRunner::dbus(), &OrgKdeFontinstInterface::fontsAdded, this, &CFontList::fontsAdded);
connect(CJobRunner::dbus(), &OrgKdeFontinstInterface::fontsRemoved, this, &CFontList::fontsRemoved);
connect(CJobRunner::dbus(), &OrgKdeFontinstInterface::fontList, this, &CFontList::fontList);
}
CFontList::~CFontList()
......@@ -957,7 +957,7 @@ CFamilyItem * CFontList::findFamily(const QString &familyName)
{
CFamilyItemHash::Iterator it=itsFamilyHash.find(familyName);
return it==itsFamilyHash.end() ? 0L : *it;
return it==itsFamilyHash.end() ? nullptr : *it;
}
inline bool matchString(const QString &str, const QString &pattern)
......@@ -977,8 +977,8 @@ CFontListSortFilterProxy::CFontListSortFilterProxy(QObject *parent, QAbstractIte
setFilterKeyColumn(0);
setDynamicSortFilter(false);
itsTimer=new QTimer(this);
connect(itsTimer, SIGNAL(timeout()), SLOT(timeout()));
connect(model, SIGNAL(layoutChanged()), SLOT(invalidate()));
connect(itsTimer, &QTimer::timeout, this, &CFontListSortFilterProxy::timeout);
connect(model, &QAbstractItemModel::layoutChanged, this, &QSortFilterProxyModel::invalidate);
itsTimer->setSingleShot(true);
}
......@@ -1355,7 +1355,7 @@ void CFontListSortFilterProxy::timeout()
if(!itsFcQuery)
{
itsFcQuery=new CFcQuery(this);
connect(itsFcQuery, SIGNAL(finished()), SLOT(fcResults()));
connect(itsFcQuery, &CFcQuery::finished, this, &CFontListSortFilterProxy::fcResults);
}
itsFcQuery->run(query);
......@@ -1400,29 +1400,29 @@ CFontListView::CFontListView(QWidget *parent, CFontList *model)
setDragDropMode(QAbstractItemView::DragDrop);
header()->setSectionsClickable(true);
header()->setSortIndicatorShown(true);
connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(itemCollapsed(QModelIndex)));
connect(header(), SIGNAL(sectionClicked(int)), SLOT(setSortColumn(int)));
connect(itsProxy, SIGNAL(refresh()), SIGNAL(refresh()));
connect(itsModel, SIGNAL(listingPercent(int)), SLOT(listingPercent(int)));
connect(this, &QTreeView::collapsed, this, &CFontListView::itemCollapsed);
connect(header(), &QHeaderView::sectionClicked, this, &CFontListView::setSortColumn);
connect(itsProxy, &CFontListSortFilterProxy::refresh, this, &CFontListView::refresh);
connect(itsModel, &CFontList::listingPercent, this, &CFontListView::listingPercent);
setWhatsThis(model->whatsThis());
header()->setWhatsThis(whatsThis());
itsMenu=new QMenu(this);
itsDeleteAct=itsMenu->addAction(QIcon::fromTheme("edit-delete"), i18n("Delete"),
this, SIGNAL(del()));
this, &CFontListView::del);
itsMenu->addSeparator();
itsEnableAct=itsMenu->addAction(QIcon::fromTheme("font-enable"), i18n("Enable"),
this, SIGNAL(enable()));
this, &CFontListView::enable);
itsDisableAct=itsMenu->addAction(QIcon::fromTheme("font-disable"), i18n("Disable"),
this, SIGNAL(disable()));
this, &CFontListView::disable);
if(!Misc::app(KFI_VIEWER).isEmpty())
itsMenu->addSeparator();
itsPrintAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("document-print"), i18n("Print..."),
this, SIGNAL(print()));
this, &CFontListView::print);
itsViewAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("kfontview"), i18n("Open in Font Viewer"),
this, SLOT(view()));
this, &CFontListView::view);
itsMenu->addSeparator();
itsMenu->addAction(QIcon::fromTheme("view-refresh"), i18n("Reload"), model, SLOT(load()));
itsMenu->addAction(QIcon::fromTheme("view-refresh"), i18n("Reload"), model, &CFontList::load);
}
void CFontListView::getFonts(CJobRunner::ItemList &urls, QStringList &fontNames, QSet<Misc::TFont> *fonts,
......
......@@ -825,32 +825,32 @@ CGroupListView::CGroupListView(QWidget *parent, CGroupList *model)
itsMenu=new QMenu(this);
itsDeleteAct=itsMenu->addAction(QIcon::fromTheme("list-remove"), i18n("Remove"),
this, SIGNAL(del()));
this, &CGroupListView::del);
itsMenu->addSeparator();
itsEnableAct=itsMenu->addAction(QIcon::fromTheme("font-enable"), i18n("Enable"),
this, SIGNAL(enable()));
this, &CGroupListView::enable);
itsDisableAct=itsMenu->addAction(QIcon::fromTheme("font-disable"), i18n("Disable"),
this, SIGNAL(disable()));
this, &CGroupListView::disable);
itsMenu->addSeparator();
itsRenameAct=itsMenu->addAction(QIcon::fromTheme("edit-rename"), i18n("Rename..."),
this, SLOT(rename()));
this, &CGroupListView::rename);
if(!Misc::app(KFI_PRINTER).isEmpty())
{
itsMenu->addSeparator();
itsPrintAct=itsMenu->addAction(QIcon::fromTheme("document-print"), i18n("Print..."),
this, SIGNAL(print()));
this, &CGroupListView::print);
}
else
itsPrintAct= nullptr;
itsMenu->addSeparator();
itsExportAct=itsMenu->addAction(QIcon::fromTheme("document-export"), i18n("Export..."),
this, SIGNAL(zip()));
this, &CGroupListView::zip);
setWhatsThis(model->whatsThis());
header()->setWhatsThis(whatsThis());
connect(this, SIGNAL(addFamilies(QModelIndex,QSet<QString>)),
model, SLOT(addToGroup(QModelIndex,QSet<QString>)));
connect(this, &CGroupListView::addFamilies,
model, &CGroupList::addToGroup);
connect(this, SIGNAL(removeFamilies(QModelIndex,QSet<QString>)),
model, SLOT(removeFromGroup(QModelIndex,QSet<QString>)));
}
......@@ -994,7 +994,7 @@ void CGroupListView::dropEvent(QDropEvent *event)
(static_cast<CGroupListItem *>(to.internalPointer()))->isPersonal()) ||
((static_cast<CGroupListItem *>(from.internalPointer()))->isPersonal() &&
(static_cast<CGroupListItem *>(to.internalPointer()))->isSystem()))
QTimer::singleShot(0, this, SLOT(emitMoveFonts()));
QTimer::singleShot(0, this, &CGroupListView::emitMoveFonts);
else if((static_cast<CGroupListItem *>(from.internalPointer()))->isCustom() &&
!(static_cast<CGroupListItem *>(to.internalPointer()))->isCustom())
emit removeFamilies(from, families);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment