Commit 2a3ec78f authored by Michael Reeves's avatar Michael Reeves

*automated port to new Slot/Signal syntax

parent c8d65015
......@@ -124,24 +124,24 @@ QList<QAction*> KDiff3FileItemAction::actions( const KFileItemListProperties& fi
int historyCount = s_pHistory ? s_pHistory->count() : 0;
s = i18n("Compare with %1", (historyCount>0 ? s_pHistory->front() : QString()) );
pAction = new QAction ( s,pThis );
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareWith()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotCompareWith);
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->addAction(pAction);
s = i18n("Merge with %1", historyCount>0 ? s_pHistory->front() : QString() );
pAction = new QAction( s, pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotMergeWith()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotMergeWith);
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->addAction (pAction);
s = i18n("Save '%1' for later", ( m_list.front() ) );
pAction = new QAction ( s, pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotSaveForLater()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotSaveForLater);
pAction->setEnabled( m_list.count()>0 );
pActionMenu->addAction(pAction);
pAction = new QAction (i18n("3-way merge with base"), pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotMergeThreeWay()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotMergeThreeWay);
pAction->setEnabled( m_list.count()>0 && historyCount>=2 );
pActionMenu->addAction (pAction);
......@@ -155,12 +155,12 @@ QList<QAction*> KDiff3FileItemAction::actions( const KFileItemListProperties& fi
for (QStringList::iterator i = s_pHistory->begin(); i!=s_pHistory->end(); ++i)
{
pAction = new QAction( *i, pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareWithHistoryItem()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotCompareWithHistoryItem);
pHistoryMenu->addAction (pAction);
}
pAction = new QAction (i18n("Clear list"), pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotClearList()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotClearList);
pActionMenu->addAction (pAction);
pAction->setEnabled( historyCount>0 );
}
......@@ -168,17 +168,17 @@ QList<QAction*> KDiff3FileItemAction::actions( const KFileItemListProperties& fi
else if(m_list.count() == 2)
{
pAction = new QAction (i18n("Compare"), pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareTwoFiles()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotCompareTwoFiles);
pActionMenu->addAction (pAction);
}
else if ( m_list.count() == 3 )
{
pAction = new QAction (i18n("3 way comparison"), pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareThreeFiles()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotCompareThreeFiles);
pActionMenu->addAction (pAction);
}
pAction = new QAction (i18n("About KDiff3 menu plugin ..."), pThis);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotAbout()));
connect(pAction, &QAction::triggered, this, &KDiff3FileItemAction::slotAbout);
pActionMenu->addAction (pAction);
//pMenu->addSeparator();
......
......@@ -113,24 +113,24 @@ void KDiff3Plugin::setup( KActionCollection* actionCollection, const KonqPopupMe
int historyCount = s_pHistory ? s_pHistory->count() : 0;
s = i18n("Compare with %1", (historyCount>0 ? s_pHistory->front() : QString()) );
pAction = new KAction ( s, actionCollection );
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareWith()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotCompareWith);
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->addAction(pAction);
s = i18n("Merge with %1", historyCount>0 ? s_pHistory->front() : QString() );
pAction = new KAction( s, actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotMergeWith()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotMergeWith);
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->addAction (pAction);
s = i18n("Save '%1' for later", ( m_list.front() ) );
pAction = new KAction ( s, actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotSaveForLater()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotSaveForLater);
pAction->setEnabled( m_list.count()>0 );
pActionMenu->addAction(pAction);
pAction = new KAction (i18n("3-way merge with base"), actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotMergeThreeWay()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotMergeThreeWay);
pAction->setEnabled( m_list.count()>0 && historyCount>=2 );
pActionMenu->addAction (pAction);
......@@ -142,12 +142,12 @@ void KDiff3Plugin::setup( KActionCollection* actionCollection, const KonqPopupMe
for (QStringList::iterator i = s_pHistory->begin(); i!=s_pHistory->end(); ++i)
{
pAction = new KAction( *i, actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareWithHistoryItem()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotCompareWithHistoryItem);
pHistoryMenu->addAction (pAction);
}
pAction = new KAction (i18n("Clear list"), actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotClearList()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotClearList);
pActionMenu->addAction (pAction);
pAction->setEnabled( historyCount>0 );
}
......@@ -155,17 +155,17 @@ void KDiff3Plugin::setup( KActionCollection* actionCollection, const KonqPopupMe
else if(m_list.count() == 2)
{
pAction = new KAction (i18n("Compare"), actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareTwoFiles()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotCompareTwoFiles);
pActionMenu->addAction (pAction);
}
else if ( m_list.count() == 3 )
{
pAction = new KAction (i18n("3 way comparison"), actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotCompareThreeFiles()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotCompareThreeFiles);
pActionMenu->addAction (pAction);
}
pAction = new KAction (i18n("About KDiff3 menu plugin ..."), actionCollection);
connect( pAction, SIGNAL(triggered(bool)), this, SLOT(slotAbout()));
connect(pAction, &KAction::triggered, this, &KDiff3Plugin::slotAbout);
pActionMenu->addAction (pAction);
pMenu->addSeparator();
......
......@@ -1646,8 +1646,8 @@ DiffTextWindowFrame::DiffTextWindowFrame( QWidget* pParent, QStatusBar* pStatusB
d->m_pFileSelection = new QLineEdit(d->m_pTopLineWidget);
d->m_pBrowseButton = new QPushButton( "...",d->m_pTopLineWidget );
d->m_pBrowseButton->setFixedWidth( 30 );
connect(d->m_pBrowseButton,SIGNAL(clicked()), this, SLOT(slotBrowseButtonClicked()));
connect(d->m_pFileSelection,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
connect(d->m_pBrowseButton, &QPushButton::clicked, this, &DiffTextWindowFrame::slotBrowseButtonClicked);
connect(d->m_pFileSelection, &QLineEdit::returnPressed, this, &DiffTextWindowFrame::slotReturnPressed);
d->m_pLabel = new QLabel("A:",d->m_pTopLineWidget);
d->m_pTopLine = new QLabel(d->m_pTopLineWidget);
......@@ -1901,7 +1901,7 @@ void EncodingLabel::insertCodec( const QString& visibleCodecName, QTextCodec* pC
if (currentTextCodecEnum==CodecMIBEnum)
pAction->setChecked(true);
pMenu->addAction(pAction);
connect(pAction, SIGNAL(triggered()), this, SLOT(slotEncodingChanged()));
connect(pAction, &QAction::triggered, this, &EncodingLabel::slotEncodingChanged);
codecEnumList.append(CodecMIBEnum);
}
}
......
......@@ -68,7 +68,7 @@ public:
m_pTextEdit->setWordWrapMode(QTextOption::NoWrap);
m_pTextEdit->setReadOnly(true);
QPushButton* pClose = new QPushButton(tr("Close"));
connect( pClose, SIGNAL(clicked()), this, SLOT(accept()));
connect(pClose, &QPushButton::clicked, this, &DirectoryMergeInfo::accept);
pVLayout->addWidget(pClose);
}
......@@ -688,8 +688,8 @@ DirectoryMergeWindow::DirectoryMergeWindow( QWidget* pParent, Options* pOptions,
d = new Data(this);
setModel( d );
setItemDelegate( new DirMergeItemDelegate(this) );
connect( this, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(onDoubleClick(const QModelIndex&)));
connect( this, SIGNAL(expanded(const QModelIndex&)), this, SLOT(onExpanded()));
connect(this, &DirectoryMergeWindow::doubleClicked, this, &DirectoryMergeWindow::onDoubleClick);
connect(this, &DirectoryMergeWindow::expanded, this, &DirectoryMergeWindow::onExpanded);
d->m_pOptions = pOptions;
d->m_pIconLoader = pIconLoader;
......
......@@ -992,7 +992,7 @@ bool FileAccessJobHandler::stat( int detail, bool bWantToWrite )
bWantToWrite ? KIO::StatJob::DestinationSide : KIO::StatJob::SourceSide,
detail, KIO::HideProgressInfo );
connect( pStatJob, SIGNAL(result(KJob*)), this, SLOT(slotStatResult(KJob*)));
connect(pStatJob, &KIO::StatJob::result, this, &FileAccessJobHandler::slotStatResult);
ProgressProxy::enterEventLoop( pStatJob, i18n("Getting file status: %1",m_pFileAccess->prettyAbsPath()) );
......@@ -1033,9 +1033,9 @@ bool FileAccessJobHandler::get(void* pDestBuffer, long maxLength )
m_bSuccess = false;
m_pFileAccess->setStatusText( QString() );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect( pJob, SIGNAL(data(KJob*,const QByteArray &)), this, SLOT(slotGetData(KJob*, const QByteArray&)));
connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
connect(pJob, &KIO::TransferJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect(pJob, &KIO::TransferJob::data, this, &FileAccessJobHandler::slotGetData);
connect(pJob, &KIO::TransferJob::percent, &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop( pJob, i18n("Reading file: %1",m_pFileAccess->prettyAbsPath()) );
return m_bSuccess;
......@@ -1071,9 +1071,9 @@ bool FileAccessJobHandler::put(const void* pSrcBuffer, long maxLength, bool bOve
m_bSuccess = false;
m_pFileAccess->setStatusText( QString() );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotPutJobResult(KJob*)));
connect( pJob, SIGNAL(dataReq(KIO::Job*, QByteArray&)), this, SLOT(slotPutData(KIO::Job*, QByteArray&)));
connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
connect(pJob, &KIO::TransferJob::result, this, &FileAccessJobHandler::slotPutJobResult);
connect(pJob, &KIO::TransferJob::dataReq, this, &FileAccessJobHandler::slotPutData);
connect(pJob, &KIO::TransferJob::percent, &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop( pJob, i18n("Writing file: %1",m_pFileAccess->prettyAbsPath()) );
return m_bSuccess;
......@@ -1136,7 +1136,7 @@ bool FileAccessJobHandler::mkDir( const QString& dirName )
{
m_bSuccess = false;
KIO::SimpleJob* pJob = KIO::mkdir( dirURL );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect(pJob, &KIO::SimpleJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop( pJob, i18n("Making directory: %1", dirName) );
return m_bSuccess;
......@@ -1156,7 +1156,7 @@ bool FileAccessJobHandler::rmDir( const QString& dirName )
{
m_bSuccess = false;
KIO::SimpleJob* pJob = KIO::rmdir( dirURL );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect(pJob, &KIO::SimpleJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop(pJob, i18n("Removing directory: %1",dirName));
return m_bSuccess;
......@@ -1171,7 +1171,7 @@ bool FileAccessJobHandler::removeFile( const QString& fileName )
{
m_bSuccess = false;
KIO::SimpleJob* pJob = KIO::file_delete( fileName, KIO::HideProgressInfo );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect(pJob, &KIO::SimpleJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop( pJob, i18n("Removing file: %1",fileName) );
return m_bSuccess;
......@@ -1186,7 +1186,7 @@ bool FileAccessJobHandler::symLink( const QString& linkTarget, const QString& li
{
m_bSuccess = false;
KIO::CopyJob* pJob = KIO::link( linkTarget, linkLocation, KIO::HideProgressInfo );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect(pJob, &KIO::CopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop( pJob,
i18n("Creating symbolic link: %1 -> %2",linkLocation,linkTarget) );
......@@ -1213,8 +1213,8 @@ bool FileAccessJobHandler::rename( const QString& dest )
int permissions=-1;
m_bSuccess = false;
KIO::FileCopyJob* pJob = KIO::file_move( m_pFileAccess->url(), kurl, permissions, KIO::HideProgressInfo );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
connect(pJob, &KIO::FileCopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect(pJob, &KIO::FileCopyJob::percent, &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop( pJob,
i18n("Renaming file: %1 -> %2",m_pFileAccess->prettyAbsPath(),dest) );
......@@ -1247,8 +1247,8 @@ bool FileAccessJobHandler::copyFile( const QString& dest )
int permissions = (m_pFileAccess->isExecutable()?0111:0)+(m_pFileAccess->isWritable()?0222:0)+(m_pFileAccess->isReadable()?0444:0);
m_bSuccess = false;
KIO::FileCopyJob* pJob = KIO::file_copy ( m_pFileAccess->url(), destUrl, permissions, KIO::HideProgressInfo );
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
connect(pJob, &KIO::FileCopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect(pJob, &KIO::FileCopyJob::percent, &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop( pJob,
i18n("Copying file: %1 -> %2",m_pFileAccess->prettyAbsPath(),dest) );
......@@ -1694,13 +1694,10 @@ bool FileAccessJobHandler::listDir( t_DirectoryList* pDirList, bool bRecursive,
m_bSuccess = false;
if ( pListJob!=0 )
{
connect( pListJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
this, SLOT( slotListDirProcessNewEntries( KIO::Job*, const KIO::UDSEntryList& )) );
connect( pListJob, SIGNAL( result( KJob* )),
this, SLOT( slotSimpleJobResult(KJob*) ) );
connect(pListJob, &KIO::ListJob::entries, this, &FileAccessJobHandler::slotListDirProcessNewEntries);
connect(pListJob, &KIO::ListJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect( pListJob, SIGNAL( infoMessage(KJob*, const QString&)),
&pp, SLOT( slotListDirInfoMessage(KJob*, const QString&) ));
connect(pListJob, &KIO::ListJob::infoMessage, &pp, &ProgressProxyExtender::slotListDirInfoMessage);
// This line makes the transfer via fish unreliable.:-(
//connect( pListJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
......
......@@ -153,7 +153,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
// All default values must be set before calling readOptions().
m_pOptionDialog = new OptionDialog( m_pKDiff3Shell!=0, this );
connect( m_pOptionDialog, SIGNAL(applyDone()), this, SLOT(slotRefresh()) );
connect(m_pOptionDialog, &OptionDialog::applyDone, this, &KDiff3App::slotRefresh);
// This is just a convenience variable to make code that accesses options more readable
m_pOptions = &m_pOptionDialog->m_options;
......@@ -276,7 +276,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
initStatusBar();
m_pFindDialog = new FindDialog( this );
connect( m_pFindDialog, SIGNAL(findNext()), this, SLOT(slotEditFindNext()));
connect(m_pFindDialog, &FindDialog::findNext, this, &KDiff3App::slotEditFindNext);
autoAdvance->setChecked( m_pOptions->m_bAutoAdvance );
showWhiteSpaceCharacters->setChecked( m_pOptions->m_bShowWhiteSpaceCharacters );
......@@ -323,13 +323,12 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
m_pDirectoryMergeWindow->setDirectoryMergeInfo( m_pDirectoryMergeInfo );
m_pDirectoryMergeSplitter->addWidget(m_pDirectoryMergeInfo);
connect( m_pDirectoryMergeWindow, SIGNAL(startDiffMerge(QString,QString,QString,QString,QString,QString,QString,TotalDiffStatus*)),
this, SLOT( slotFileOpen2(QString,QString,QString,QString,QString,QString,QString,TotalDiffStatus*)));
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::startDiffMerge, this, &KDiff3App::slotFileOpen2);
connect( m_pDirectoryMergeWindow->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow, SIGNAL(checkIfCanContinue(bool*)), this, SLOT(slotCheckIfCanContinue(bool*)));
connect( m_pDirectoryMergeWindow, SIGNAL(updateAvailabilities()), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow, SIGNAL(statusBarMessage(const QString&)), this, SLOT(slotStatusMsg(const QString&)));
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::checkIfCanContinue, this, &KDiff3App::slotCheckIfCanContinue);
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::updateAvailabilities, this, &KDiff3App::slotUpdateAvailabilities);
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::statusBarMessage, this, &KDiff3App::slotStatusMsg);
m_pDirectoryMergeWindow->initDirectoryMergeActions( this, actionCollection() );
......
......@@ -154,8 +154,7 @@ void KDiff3Shell::optionsConfigureToolbars()
// use the standard toolbar editor
KEditToolBar dlg(factory());
connect(&dlg, SIGNAL(newToolbarConfig()),
this, SLOT(applyNewToolbarConfig()));
connect(&dlg, &KEditToolBar::newToolbarConfig, this, &KDiff3Shell::applyNewToolbarConfig);
dlg.exec();
}
......
......@@ -179,19 +179,19 @@ KPageDialog::KPageDialog( QWidget* parent )
pButtonLayout->addStretch(1);
QPushButton* pOk = new QPushButton( i18n("Ok") );
connect( pOk, SIGNAL( clicked() ), this, SIGNAL(okClicked()) );
connect(pOk, &QPushButton::clicked, this, &KPageDialog::okClicked);
pButtonLayout->addWidget( pOk );
QPushButton* pHelp = new QPushButton( i18n("Help") );
connect( pHelp, SIGNAL( clicked() ), this, SLOT(slotHelpClicked()));
connect(pHelp, &QPushButton::clicked, this, &KPageDialog::slotHelpClicked);
pButtonLayout->addWidget( pHelp );
QPushButton* pDefaults = new QPushButton( i18n("Defaults") );
connect( pDefaults, SIGNAL( clicked() ), this, SIGNAL(defaultClicked()) );
connect(pDefaults, &QPushButton::clicked, this, &KPageDialog::defaultClicked);
pButtonLayout->addWidget( pDefaults );
QPushButton* pCancel = new QPushButton( i18n("Cancel") );
connect( pCancel, SIGNAL( clicked() ), this, SLOT(reject()));
connect(pCancel, &QPushButton::clicked, this, &KPageDialog::reject);
pButtonLayout->addWidget( pCancel );
}
......@@ -341,7 +341,7 @@ void KMainWindow::slotAbout()
l->addWidget( pTabWidget );
QPushButton* pOkButton = new QPushButton(i18n("Ok"));
connect( pOkButton, SIGNAL(clicked()), &d, SLOT(accept()));
connect(pOkButton, &QPushButton::clicked, &d, &QDialog::accept);
l->addWidget( pOkButton );
d.setWindowTitle("About " + s_appName);
......@@ -752,7 +752,7 @@ KFontChooser::KFontChooser( QWidget* pParent )
m_pParent = pParent;
QVBoxLayout* pLayout = new QVBoxLayout( this );
m_pSelectFont = new QPushButton(i18n("Select Font"), this );
connect(m_pSelectFont, SIGNAL(clicked()), this, SLOT(slotSelectFont()));
connect(m_pSelectFont, &QPushButton::clicked, this, &KFontChooser::slotSelectFont);
pLayout->addWidget(m_pSelectFont);
m_pLabel = new QLabel( "", this );
......@@ -809,7 +809,7 @@ void KFontChooser::slotSelectFont()
KColorButton::KColorButton(QWidget* parent)
: QPushButton(parent)
{
connect( this, SIGNAL(clicked()), this, SLOT(slotClicked()));
connect(this, &KColorButton::clicked, this, &KColorButton::slotClicked);
}
QColor KColorButton::color()
......
......@@ -97,7 +97,7 @@ MergeResultWindow::MergeResultWindow(
m_bCursorOn = true;
m_bCursorUpdate = false;
m_maxTextWidth = -1;
connect( &m_cursorTimer, SIGNAL(timeout()), this, SLOT( slotCursorUpdate() ) );
connect(&m_cursorTimer, &QTimer::timeout, this, &MergeResultWindow::slotCursorUpdate);
m_cursorTimer.setSingleShot(true);
m_cursorTimer.start( 500 /*ms*/ );
m_selection.reset();
......
......@@ -510,10 +510,10 @@ OptionDialog::OptionDialog( bool bShowDirMergeSettings, QWidget *parent, char *n
// Initialize all values in the dialog
resetToDefaults();
slotApply();
connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply()));
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
connect(this, &OptionDialog::applyClicked, this, &OptionDialog::slotApply);
connect(this, &OptionDialog::okClicked, this, &OptionDialog::slotOk);
//helpClicked() is connected in KDiff3App::KDiff3App
connect(this, SIGNAL(defaultClicked()), this, SLOT(slotDefault()));
connect(this, &OptionDialog::defaultClicked, this, &OptionDialog::slotDefault);
}
OptionDialog::~OptionDialog( void )
......@@ -1038,7 +1038,7 @@ void OptionDialog::setupMergePage( void )
"See the documentation for details.");
label->setToolTip( s_historyEntryStartSortKeyOrderToolTip );
m_pHistorySortKeyOrderLineEdit->setEnabled(false);
connect( m_pHistoryMergeSorting, SIGNAL(toggled(bool)), m_pHistorySortKeyOrderLineEdit, SLOT(setEnabled(bool)));
connect(m_pHistoryMergeSorting, &OptionCheckBox::toggled, m_pHistorySortKeyOrderLineEdit, &OptionLineEdit::setEnabled);
++line;
m_pHistoryAutoMerge = new OptionCheckBox( i18n("Merge version control history on merge start"), false, "RunHistoryAutoMergeOnMergeStart", &m_options.m_bRunHistoryAutoMergeOnMergeStart, page, this );
......@@ -1056,7 +1056,7 @@ void OptionDialog::setupMergePage( void )
QPushButton* pButton = new QPushButton( i18n("Test your regular expressions"), page );
gbox->addWidget( pButton, line, 0 );
connect( pButton, SIGNAL(clicked()), this, SLOT(slotHistoryMergeRegExpTester()));
connect(pButton, &QPushButton::clicked, this, &OptionDialog::slotHistoryMergeRegExpTester);
++line;
label = new QLabel( i18n("Irrelevant merge command:"), page );
......@@ -1251,7 +1251,7 @@ void OptionDialog::setupDirectoryMergePage( void )
pWhiteSpaceDiffsEqual->setToolTip( i18n(
"If files differ only by white space consider them equal.\n"
"This is only active when full analysis is chosen." ) );
connect(pFullAnalysis, SIGNAL(toggled(bool)), pWhiteSpaceDiffsEqual, SLOT(setEnabled(bool)));
connect(pFullAnalysis, &OptionRadioButton::toggled, pWhiteSpaceDiffsEqual, &OptionCheckBox::setEnabled);
pWhiteSpaceDiffsEqual->setEnabled(false);
++line;
......@@ -1566,10 +1566,10 @@ static const char* countryMap[]={
gbox->addWidget( m_pEncodingPPComboBox, line, 1 );
++line;
connect(m_pSameEncoding, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
connect(m_pEncodingAComboBox, SIGNAL(activated(int)), this, SLOT(slotEncodingChanged()));
connect(m_pAutoDetectUnicodeA, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
connect(m_pAutoSelectOutEncoding, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
connect(m_pSameEncoding, &OptionCheckBox::toggled, this, &OptionDialog::slotEncodingChanged);
connect(m_pEncodingAComboBox, static_cast<void (OptionEncodingComboBox::*)(int)>(&OptionEncodingComboBox::activated), this, &OptionDialog::slotEncodingChanged);
connect(m_pAutoDetectUnicodeA, &OptionCheckBox::toggled, this, &OptionDialog::slotEncodingChanged);
connect(m_pAutoSelectOutEncoding, &OptionCheckBox::toggled, this, &OptionDialog::slotEncodingChanged);
OptionCheckBox* pRightToLeftLanguage = new OptionCheckBox( i18n("Right To Left Language"), false, "RightToLeftLanguage", &m_options.m_bRightToLeftLanguage, page, this );
gbox->addWidget( pRightToLeftLanguage, line, 0, 1, 2 );
......@@ -1630,14 +1630,14 @@ void OptionDialog::setupIntegrationPage( void )
"Integrate with Rational ClearCase from IBM.\n"
"Modifies the \"map\" file in ClearCase subdir \"lib/mgrs\"\n"
"(Only enabled when ClearCase \"bin\" directory is in the path.)"));
connect(pIntegrateWithClearCase, SIGNAL(clicked()),this, SLOT(slotIntegrateWithClearCase()) );
connect(pIntegrateWithClearCase, &QPushButton::clicked, this, &OptionDialog::slotIntegrateWithClearCase);
pIntegrateWithClearCase->setEnabled( integrateWithClearCase( "existsClearCase", "" )!=0 );
QPushButton* pRemoveClearCaseIntegration = new QPushButton( i18n("Remove ClearCase Integration"), page);
gbox->addWidget( pRemoveClearCaseIntegration, line, 1 );
pRemoveClearCaseIntegration->setToolTip( i18n(
"Restore the old \"map\" file from before doing the ClearCase integration."));
connect(pRemoveClearCaseIntegration, SIGNAL(clicked()),this, SLOT(slotRemoveClearCaseIntegration()) );
connect(pRemoveClearCaseIntegration, &QPushButton::clicked, this, &OptionDialog::slotRemoveClearCaseIntegration);
pRemoveClearCaseIntegration->setEnabled( integrateWithClearCase( "existsClearCase", "" )!=0 );
++line;
......
......@@ -707,7 +707,7 @@ void KDiff3App::initView()
pHScrollBarLayout->addWidget( m_pCornerWidget );
connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pOverview, SLOT(setFirstLine(int)));
connect(m_pDiffVScrollBar, &QScrollBar::valueChanged, m_pOverview, &Overview::setFirstLine);
connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pDiffTextWindow1, SLOT(setFirstLine(int)));
connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), m_pDiffTextWindow1, SLOT(setHorizScrollOffset(int)));
connect( m_pDiffTextWindow1, SIGNAL(newSelection()), this, SLOT(slotSelectionStart()));
......@@ -731,16 +731,16 @@ void KDiff3App::initView()
MergeResultWindow* p = m_pMergeResultWindow;
connect( m_pMergeVScrollBar, SIGNAL(valueChanged(int)), p, SLOT(setFirstLine(int)));
connect(m_pMergeVScrollBar, &QScrollBar::valueChanged, p, &MergeResultWindow::setFirstLine);
connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), p, SLOT(setHorizScrollOffset(int)));
connect(m_pHScrollBar, &ReversibleScrollBar::valueChanged2, p, &MergeResultWindow::setHorizScrollOffset);
connect( p, SIGNAL(scroll(int,int)), this, SLOT(scrollMergeResultWindow(int,int)));
connect( p, SIGNAL(sourceMask(int,int)), this, SLOT(sourceMask(int,int)));
connect( p, SIGNAL( resizeSignal() ),this, SLOT(resizeMergeResultWindow()));
connect( p, SIGNAL( selectionEnd() ), this, SLOT( slotSelectionEnd() ) );
connect( p, SIGNAL( newSelection() ), this, SLOT( slotSelectionStart() ) );
connect( p, SIGNAL( modifiedChanged(bool) ), this, SLOT( slotOutputModified(bool) ) );
connect( p, SIGNAL( modifiedChanged(bool) ), m_pMergeResultWindowTitle, SLOT( slotSetModified(bool) ) );
connect(p, &MergeResultWindow::modifiedChanged, m_pMergeResultWindowTitle, &WindowTitleWidget::slotSetModified);
connect( p, SIGNAL( updateAvailabilities() ), this, SLOT( slotUpdateAvailabilities() ) );
connect( p, SIGNAL( showPopupMenu(const QPoint&) ), this, SLOT(showPopupMenu(const QPoint&)));
connect( p, SIGNAL( noRelevantChangesDetected() ), this, SLOT(slotNoRelevantChangesDetected()));
......
......@@ -51,7 +51,7 @@ ProgressDialog::ProgressDialog( QWidget* pParent )
hlayout->addStretch(1);
m_pAbortButton = new QPushButton( i18n("&Cancel"), this);
hlayout->addWidget( m_pAbortButton );
connect( m_pAbortButton, SIGNAL(clicked()), this, SLOT(slotAbort()) );
connect(m_pAbortButton, &QPushButton::clicked, this, &ProgressDialog::slotAbort);
m_progressDelayTimer = 0;
resize( 400, 100 );
......
......@@ -64,10 +64,10 @@ OpenDialog::OpenDialog(
m_pLineA->setEditText( KUrl(n1).prettyUrl() );
m_pLineA->setMinimumWidth( 200 );
QPushButton * button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileA() ) );
connect(button, &QPushButton::clicked, this, &OpenDialog::selectFileA);
QPushButton * button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirA() ) );
connect( m_pLineA, SIGNAL(editTextChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
connect(button2, &QPushButton::clicked, this, &OpenDialog::selectDirA);
connect(m_pLineA, &QComboBox::editTextChanged, this, &OpenDialog::inputFilenameChanged);
h->addWidget( label, 0, 0 );
h->addWidget( m_pLineA, 0, 1 );
......@@ -81,10 +81,10 @@ OpenDialog::OpenDialog(
m_pLineB->setEditText( KUrl(n2).prettyUrl() );
m_pLineB->setMinimumWidth( 200 );
button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileB() ) );
connect(button, &QPushButton::clicked, this, &OpenDialog::selectFileB);
button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirB() ) );
connect( m_pLineB, SIGNAL(editTextChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
connect(button2, &QPushButton::clicked, this, &OpenDialog::selectDirB);
connect(m_pLineB, &QComboBox::editTextChanged, this, &OpenDialog::inputFilenameChanged);
h->addWidget( label, 1, 0 );
h->addWidget( m_pLineB, 1, 1 );
......@@ -98,10 +98,10 @@ OpenDialog::OpenDialog(
m_pLineC->setEditText( KUrl(n3).prettyUrl() );
m_pLineC->setMinimumWidth( 200 );
button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileC() ) );
connect(button, &QPushButton::clicked, this, &OpenDialog::selectFileC);
button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirC() ) );
connect( m_pLineC, SIGNAL(editTextChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
connect(button2, &QPushButton::clicked, this, &OpenDialog::selectDirC);
connect(m_pLineC, &QComboBox::editTextChanged, this, &OpenDialog::inputFilenameChanged);
h->addWidget( label, 2, 0 );
h->addWidget( m_pLineC, 2, 1 );
......@@ -128,7 +128,7 @@ OpenDialog::OpenDialog(
m->addAction( i18n("Swap %1<->Output",QString("A") ));
m->addAction( i18n("Swap %1<->Output",QString("B") ));
m->addAction( i18n("Swap %1<->Output",QString("C") ));
connect( m, SIGNAL(triggered(QAction*)), this, SLOT(slotSwapCopyNames(QAction*)));
connect(m, &QMenu::triggered, this, &OpenDialog::slotSwapCopyNames);