Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ed1230b1 authored by Michael Reeves's avatar Michael Reeves

convert to new slot sytax, fix ebn header issue

parent 53cf963e
......@@ -54,7 +54,7 @@ find_package(
set(KDiff3_LIBRARIES ${Qt5PrintSupport_LIBRARIES} KF5::I18n KF5::CoreAddons KF5::Crash KF5::IconThemes )
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
#Adjust clang specfic warnings
#Adjust clang specific warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wshadow")
set(CLANG_WARNING_FLAGS "-Wno-invalid-pp-token -Wno-comment -Wshorten-64-to-32 -Wstring-conversion -Wc++11-narrowing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_WARNING_FLAGS}")
......@@ -66,7 +66,7 @@ endif()
#new in cmake 3.6+ integrate clang-tidy
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.6.0")
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" DOC "Path to clang-tidy executable")
find_program(CLANG_TIDY_EXE NAMES "clang-tidy clang-tidy-7 clang-tidy-6.0 clang-tidy-6" DOC "Path to clang-tidy executable")
if(NOT CLANG_TIDY_EXE)
message(STATUS "clang-tidy not found disabling integration.")
else()
......
......@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kdiff3fileitemaction.h"
......@@ -82,7 +82,7 @@ KDiff3FileItemAction::KDiff3FileItemAction (QObject* pParent, const QVariantList
QList<QAction*> KDiff3FileItemAction::actions( const KFileItemListProperties& fileItemInfos, QWidget* pParentWidget )
{
QList< QAction* > actions;
if (QStandardPaths::findExecutable("kdiff3").isEmpty ())
return actions;
......@@ -92,8 +92,8 @@ QList<QAction*> KDiff3FileItemAction::actions( const KFileItemListProperties& fi
QAction *pMenuAction = new QAction(QIcon::fromTheme(QStringLiteral("kdiff3")), i18n("KDiff3..."), this);
QMenu *pActionMenu = new QMenu();
pMenuAction->setMenu( pActionMenu );
// remember currently selected files (copy to a QStringList)
QList<QUrl> itemList = fileItemInfos.urlList();
foreach(const QUrl& item, itemList)
......
......@@ -14,12 +14,12 @@
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KDIFF3FILEITEMACTIONPLUGIN_H_
#define _KDIFF3FILEITEMACTIONPLUGIN_H_
#ifndef KDIFF3FILEITEMACTIONPLUGIN_H
#define KDIFF3FILEITEMACTIONPLUGIN_H
#include <KAbstractFileItemActionPlugin>
#include <KFileItemListProperties>
......
......@@ -20,8 +20,8 @@
*
*/
#ifndef PROGREESPROXYEXTENDER_H
#define PROGREESPROXYEXTENDER_H
#ifndef PROGRESSPROXYEXTENDER_H
#define PROGRESSPROXYEXTENDER_H
#include "progress.h"
#include <QString>
......
......@@ -966,7 +966,7 @@ void DiffTextWindowData::writeLine(
if(!bWrapLine || wrapLineLength > 0)
{
Qt::PenStyle wrapLinePenStyle = Qt::DotLine;
p.setPen(QPen(m_pOptions->m_fgColor, 0, bWrapLine ? wrapLinePenStyle : Qt::SolidLine));
p.drawLine(xOffset + 1, yOffset, xOffset + 1, yOffset + fontHeight - 1);
p.setPen(QPen(m_pOptions->m_fgColor, 0, Qt::SolidLine));
......@@ -1145,7 +1145,7 @@ QString DiffTextWindowData::getString(int d3lIdx)
int changed = 0;
int changed2 = 0;
int lineIdx = -1;
getLineInfo(*d3l, lineIdx, pFineDiff1, pFineDiff2, changed, changed2);
if(lineIdx == -1)
......@@ -1215,7 +1215,7 @@ void DiffTextWindowData::getLineInfo(
((d3l.lineB == -1) != (lineIdx == -1) ? 2 : 0);
changed2 |= (bAEqC ? 0 : 1) + (bBEqC ? 0 : 2);
}
}
void DiffTextWindow::resizeEvent(QResizeEvent* e)
......@@ -1260,7 +1260,7 @@ QString DiffTextWindow::getSelection()
for(it = 0; it < vectorSize; ++it)
{
const Diff3Line* d3l = d->m_bWordWrap ? d->m_diff3WrapLineVector[it].pD3L : (*d->m_pDiff3LineVector)[it];
Q_ASSERT(d->m_winIdx >= 1 && d->m_winIdx <= 3);
if(d->m_winIdx == 1) {
......@@ -2051,7 +2051,7 @@ void EncodingLabel::insertCodec(const QString& visibleCodecName, QTextCodec* pCo
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);
}
}
......
......@@ -40,7 +40,7 @@
FileAccess::FileAccess(const QString& name, bool bWantToWrite)
{
reset();
setFile(name, bWantToWrite);
}
......@@ -88,7 +88,7 @@ void FileAccess::setFile(FileAccess* pParent, QFileInfo fi)
m_url = QUrl::fromLocalFile(m_fileInfo.filePath());
if(!m_url.scheme().isEmpty())
m_url.setScheme(QLatin1Literal("file"));
m_pParent = pParent;
loadData();
}
......@@ -105,7 +105,7 @@ void FileAccess::setFile(const QString& name, bool bWantToWrite)
void FileAccess::setFile(const QUrl& url, bool bWantToWrite)
{
reset();
m_url = url;
m_name = m_url.fileName();
//Insure QUrl::isLocalFile assumes the scheme is set.
......@@ -133,12 +133,12 @@ void FileAccess::setFile(const QUrl& url, bool bWantToWrite)
void FileAccess::loadData()
{
m_fileInfo.setCaching(true);
if(parent() == nullptr)
m_baseDir = m_fileInfo.absoluteFilePath();
else
m_baseDir = m_pParent->m_baseDir;
//convert to absolute path that doesn't depend on the current directory.
m_fileInfo.makeAbsolute();
m_bSymLink = m_fileInfo.isSymLink();
......@@ -149,11 +149,11 @@ void FileAccess::loadData()
m_size = m_fileInfo.size();
m_modificationTime = m_fileInfo.lastModified();
m_bHidden = m_fileInfo.isHidden();
m_bWritable = m_fileInfo.isWritable();
m_bReadable = m_fileInfo.isReadable();
m_bExecutable = m_fileInfo.isExecutable();
m_name = m_fileInfo.fileName();
if(isLocal() && m_bSymLink)
{
......@@ -273,12 +273,12 @@ void FileAccess::setUdsEntry(const KIO::UDSEntry& e)
break;
}
}
m_fileInfo = QFileInfo(filePath);
m_fileInfo.setCaching(true);
if(m_url.isEmpty())
m_url = QUrl::fromUserInput(m_fileInfo.absoluteFilePath());
m_name = m_url.fileName();
m_bExists = m_fileInfo.exists();
//insure modification time is initialized if it wasn't already.
......@@ -351,7 +351,7 @@ qint64 FileAccess::size() const
QUrl FileAccess::url() const
{
QUrl url = m_url;
if(url.isLocalFile() && url.isRelative())
{
url.setPath(absoluteFilePath());
......@@ -474,7 +474,7 @@ bool FileAccess::readFile(void* pDestBuffer, qint64 maxLength)
//Avoid hang on linux for special files.
if(!isNormal())
return true;
if(!m_localCopy.isEmpty())
{
QFile f(m_localCopy);
......@@ -588,7 +588,7 @@ bool FileAccess::createLocalCopy()
{
if(isLocal() || !m_localCopy.isEmpty())
return true;
tmpFile->setAutoRemove(true);
tmpFile->setFileTemplate(QStringLiteral("XXXXXX-kdiff3tmp"));
tmpFile->open();
......@@ -608,7 +608,7 @@ void FileAccess::createTempFile(QTemporaryFile& tmpFile)
bool FileAccess::removeTempFile(const QString& name) // static
{
{
return FileAccess(name).removeFile();
}
......@@ -742,7 +742,7 @@ void FileAccess::filterList(t_DirectoryList *pDirList, const QString& filePatter
t_DirectoryList::iterator i2 = i;
++i2;
QString fn = i->fileName();
if( (i->isFile() &&
(!Utils::wildcardMultiMatch(filePattern, fn, bCaseSensitive) ||
Utils::wildcardMultiMatch(fileAntiPattern, fn, bCaseSensitive))) ||
......@@ -815,7 +815,7 @@ bool FileAccessJobHandler::get(void* pDestBuffer, long maxLength)
connect(pJob, &KIO::TransferJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect(pJob, &KIO::TransferJob::data, this, &FileAccessJobHandler::slotGetData);
connect(pJob, SIGNAL(percent(KJob*, qint64)), &pp, SLOT(slotPercent(KJob*, qint64)));
connect(pJob, static_cast<void (KIO::TransferJob::*)(KJob*,unsigned long)>(&KIO::TransferJob::percent), &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop(pJob, i18n("Reading file: %1", m_pFileAccess->prettyAbsPath()));
return m_bSuccess;
......@@ -853,7 +853,7 @@ bool FileAccessJobHandler::put(const void* pSrcBuffer, long maxLength, bool bOve
connect(pJob, &KIO::TransferJob::result, this, &FileAccessJobHandler::slotPutJobResult);
connect(pJob, &KIO::TransferJob::dataReq, this, &FileAccessJobHandler::slotPutData);
connect(pJob, SIGNAL(percent(KJob*, qint64)), &pp, SLOT(slotPercent(KJob*, qint64)));
connect(pJob, static_cast<void (KIO::TransferJob::*)(KJob*,unsigned long)>(&KIO::TransferJob::percent), &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop(pJob, i18n("Writing file: %1", m_pFileAccess->prettyAbsPath()));
return m_bSuccess;
......@@ -871,9 +871,9 @@ void FileAccessJobHandler::slotPutData(KIO::Job* pJob, QByteArray& data)
else
{
/*
Think twice before doing this in new code.
Think twice before doing this in new code.
The maxChunkSize must be able to fit a 32-bit int. Given that the fallowing is safe.
*/
qint64 maxChunkSize = 100000;
qint64 length = std::min(maxChunkSize, m_maxLength - m_transferredBytes);
......@@ -999,7 +999,7 @@ bool FileAccessJobHandler::rename(const QString& dest)
m_bSuccess = false;
KIO::FileCopyJob* pJob = KIO::file_move(m_pFileAccess->url(), kurl, permissions, KIO::HideProgressInfo);
connect(pJob, &KIO::FileCopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
connect(pJob, SIGNAL(percent(KJob*, qint64)), &pp, SLOT(slotPercent(KJob*, qint64)));
connect(pJob, static_cast<void (KIO::FileCopyJob::*)(KJob*,unsigned long)>(&KIO::FileCopyJob::percent), &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop(pJob,
i18n("Renaming file: %1 -> %2", m_pFileAccess->prettyAbsPath(), dest));
......@@ -1031,7 +1031,7 @@ bool FileAccessJobHandler::copyFile(const QString& dest)
m_bSuccess = false;
KIO::FileCopyJob* pJob = KIO::file_copy(m_pFileAccess->url(), destUrl, permissions, KIO::HideProgressInfo);
connect(pJob, &KIO::FileCopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
//connect(pJob, SIGNAL(percent(KJob*, qint64)), &pp, SLOT(slotPercent(KJob*, qint64)));
connect(pJob, static_cast<void (KIO::FileCopyJob::*)(KJob*,unsigned long)>(&KIO::FileCopyJob::percent), &pp, &ProgressProxyExtender::slotPercent);
ProgressProxy::enterEventLoop(pJob,
i18n("Copying file: %1 -> %2", m_pFileAccess->prettyAbsPath(), dest));
......@@ -1084,7 +1084,7 @@ bool FileAccessJobHandler::listDir(t_DirectoryList* pDirList, bool bRecursive, b
Q_ASSERT(fi.fileName() != "." && fi.fileName() != "..");
FileAccess fa;
fa.setFile(m_pFileAccess, fi);
pDirList->push_back(fa);
}
......@@ -1105,7 +1105,7 @@ bool FileAccessJobHandler::listDir(t_DirectoryList* pDirList, bool bRecursive, b
// This line makes the transfer via fish unreliable.:-(
if(m_pFileAccess->url().scheme() != QLatin1Literal("fish")){
connect( pListJob, SIGNAL(percent(KJob*,qint64)), &pp, SLOT(slotPercent(KJob*, qint64)));
connect( pListJob, static_cast<void (KIO::ListJob::*)(KJob*,unsigned long)>(&KIO::ListJob::percent), &pp, &ProgressProxyExtender::slotPercent);
}
ProgressProxy::enterEventLoop(pListJob,
......@@ -1127,7 +1127,7 @@ bool FileAccessJobHandler::listDir(t_DirectoryList* pDirList, bool bRecursive, b
t_DirectoryList dirList;
i->listDir(&dirList, bRecursive, bFindHidden,
filePattern, fileAntiPattern, dirAntiPattern, bFollowDirLinks, bUseCvsIgnore);
// append data onto the main list
subDirsList.splice(subDirsList.end(), dirList);
}
......@@ -1149,7 +1149,7 @@ void FileAccessJobHandler::slotListDirProcessNewEntries(KIO::Job*, const KIO::UD
{
const KIO::UDSEntry& e = *i;
FileAccess fa;
fa.m_pParent = m_pFileAccess;
fa.setUdsEntry(e);
......
......@@ -9,9 +9,20 @@
* *
***************************************************************************/
// application specific includes
#include "kdiff3.h"
#include "directorymergewindow.h"
#include "fileaccess.h"
#include "guiutils.h" // namespace KDiff3
#include "kdiff3_part.h"
#include "kdiff3_shell.h"
#include "optiondialog.h"
#include "progress.h"
#include "smalldialogs.h"
#include "difftextwindow.h"
#include "mergeresultwindow.h"
// sytem headers
#include <cassert>
// include files for QT
......@@ -45,16 +56,7 @@
#include <KToggleAction>
#include <KToolBar>
// application specific includes
#include "directorymergewindow.h"
#include "fileaccess.h"
#include "guiutils.h" // namespace KDiff3
#include "kdiff3.h"
#include "kdiff3_part.h"
#include "kdiff3_shell.h"
#include "optiondialog.h"
#include "progress.h"
#include "smalldialogs.h"
#define ID_STATUS_MSG 1
#define MAIN_TOOLBAR_NAME QLatin1String("mainToolBar")
......@@ -190,7 +192,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const QString /*name*/, KDiff3Part* pKDif
pVBoxLayout->addWidget(pTextEdit);
pDialog->resize(600, 400);
pDialog->exec();
#if !defined(Q_OS_WIN)
#if !defined(Q_OS_WIN)
// A windows program has no console
printf("%s\n", title.toLatin1().constData());
printf("%s\n", s.toLatin1().constData());
......@@ -307,7 +309,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const QString /*name*/, KDiff3Part* pKDif
{
viewStatusBar->setChecked(m_pOptions->m_bShowStatusBar);
slotViewStatusBar();
KToolBar *mainToolBar = toolBar(MAIN_TOOLBAR_NAME);
if(mainToolBar != nullptr){
mainToolBar->mainWindow()->addToolBar(m_pOptions->m_toolBarPos, mainToolBar);
......@@ -343,13 +345,13 @@ KDiff3App::KDiff3App(QWidget* pParent, const QString /*name*/, KDiff3Part* pKDif
connect(m_pDirectoryMergeWindow->selectionModel(), &QItemSelectionModel::selectionChanged, this, &KDiff3App::slotUpdateAvailabilities);
connect(m_pDirectoryMergeWindow->selectionModel(), &QItemSelectionModel::currentChanged, this, &KDiff3App::slotUpdateAvailabilities);
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::checkIfCanContinue, this, &KDiff3App::slotCheckIfCanContinue);
connect(m_pDirectoryMergeWindow, SIGNAL(updateAvailabilities()), this, SLOT(slotUpdateAvailabilities()));
connect(m_pDirectoryMergeWindow, static_cast<void (DirectoryMergeWindow::*) (void)>(&DirectoryMergeWindow::updateAvailabilities), this, &KDiff3App::slotUpdateAvailabilities);
connect(m_pDirectoryMergeWindow, &DirectoryMergeWindow::statusBarMessage, this, &KDiff3App::slotStatusMsg);
connect(QApplication::clipboard(), &QClipboard::dataChanged, this, &KDiff3App::slotClipboardChanged);
m_pDirectoryMergeWindow->initDirectoryMergeActions(this, actionCollection());
delete KDiff3Shell::getParser();
if(m_pKDiff3Shell == nullptr) {
completeInit(QString());
}
......@@ -810,9 +812,9 @@ void KDiff3App::slotFilePrint()
LineRef firstSelectionD3LIdx = -1;
LineRef lastSelectionD3LIdx = -1;
m_pDiffTextWindow1->getSelectionRange(&firstSelectionD3LIdx, &lastSelectionD3LIdx, eD3LLineCoords);
if(firstSelectionD3LIdx < 0 && m_pDiffTextWindow2) {
m_pDiffTextWindow2->getSelectionRange(&firstSelectionD3LIdx, &lastSelectionD3LIdx, eD3LLineCoords);
}
......
......@@ -68,7 +68,7 @@ class ReversibleScrollBar : public QScrollBar
{
m_pbRightToLeftLanguage = pbRightToLeftLanguage;
m_realVal = 0;
connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
connect(this, &ReversibleScrollBar::valueChanged, this, &ReversibleScrollBar::slotValueChanged);
}
void setAgain() { setValue(m_realVal); }
......@@ -321,7 +321,7 @@ class KDiff3App : public QSplitter
bool eventFilter(QObject* o, QEvent* e) override;
void resizeEvent(QResizeEvent*) override;
bool improveFilenames(bool bCreateNewInstance);
bool canContinue();
......
......@@ -70,7 +70,7 @@ KDiff3Shell::KDiff3Shell(bool bCompleteInit)
if(bCompleteInit)
m_widget->completeInit(QString());
connect(m_widget, SIGNAL(createNewInstance(const QString&, const QString&, const QString&)), this, SLOT(slotNewInstance(const QString&, const QString&, const QString&)));
connect(m_widget, &KDiff3App::createNewInstance, this, &KDiff3Shell::slotNewInstance);
}
else
{
......
......@@ -86,7 +86,7 @@ MergeResultWindow::MergeResultWindow(
m_pTotalDiffStatus = nullptr;
m_pStatusBar = pStatusBar;
if(m_pStatusBar)
connect(m_pStatusBar, SIGNAL(messageChanged(const QString&)), this, SLOT(slotStatusMessageChanged(const QString&)));
connect(m_pStatusBar, &QStatusBar::messageChanged, this, &MergeResultWindow::slotStatusMessageChanged);
m_pOptions = pOptions;
m_bPaintingAllowed = false;
......@@ -98,7 +98,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();
......@@ -3371,7 +3371,7 @@ WindowTitleWidget::WindowTitleWidget(Options* pOptions)
//m_pBrowseButton = new QPushButton("...");
//pHLayout->addWidget( m_pBrowseButton, 0 );
//connect( m_pBrowseButton, SIGNAL(clicked()), this, SLOT(slotBrowseButtonClicked()));
//connect( m_pBrowseButton, &QPushButton::clicked), this, &MergeResultWindow::slotBrowseButtonClicked);
m_pModifiedLabel = new QLabel(i18n("[Modified]"));
pHLayout->addWidget(m_pModifiedLabel);
......
......@@ -225,7 +225,7 @@ FontChooser::FontChooser(QWidget* pParent)
m_pSelectFont = new QPushButton(i18n("Change Font"));
m_pSelectFont->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
connect(m_pSelectFont, SIGNAL(clicked()), this, SLOT(slotSelectFont()));
connect(m_pSelectFont, &QPushButton::clicked, this, &FontChooser::slotSelectFont);
pLayout->addWidget(m_pSelectFont);
pLayout->setAlignment(m_pSelectFont, Qt::AlignRight);
}
......@@ -611,7 +611,7 @@ OptionDialog::OptionDialog(bool bShowDirMergeSettings, QWidget* parent) : KPageD
setFaceType(List);
setWindowTitle(i18n("Configure"));
setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Apply | QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
setModal(true);
//showButtonSeparator( true );
......@@ -1445,7 +1445,7 @@ static void insertCodecs(OptionComboBox* p)
if ( pCodec != 0 ) m.insert( std::make_pair( QString(pCodec->mimeName()).toUpper(), pCodec->mimeName()) );
else break;
}
p->insertItem( i18n("Auto"), 0 );
std::multimap<QString,QString>::iterator mi;
for(mi=m.begin(), i=0; mi!=m.end(); ++mi, ++i)
......@@ -1500,7 +1500,7 @@ void OptionDialog::setupRegionalPage()
{
/*
TODO: What is this line supposed to do besides leak memory? Introduced as is in .91 no explanation
new Utf8BOMCodec();
new Utf8BOMCodec();
*/
QFrame* page = new QFrame();
......
This diff is collapsed.
......@@ -67,7 +67,7 @@ ProgressDialog::ProgressDialog(QWidget* pParent, QStatusBar* pStatusBar)
m_pStatusProgressBar->setRange(0, 1000);
m_pStatusProgressBar->setTextVisible(false);
m_pStatusAbortButton = new QPushButton(i18n("&Cancel"));
connect(m_pStatusAbortButton, SIGNAL(clicked()), this, SLOT(slotAbort()));
connect(m_pStatusAbortButton, &QPushButton::clicked, this, &ProgressDialog::slotAbort);
pStatusBarLayout->addWidget(m_pStatusProgressBar);
pStatusBarLayout->addWidget(m_pStatusAbortButton);
m_pStatusBar->addPermanentWidget(m_pStatusBarWidget, 0);
......
......@@ -21,6 +21,7 @@
#include "smalldialogs.h"
#include "diff.h"
#include "options.h"
#include "kdiff3.h"
#include <QCheckBox>
#include <QComboBox>
......@@ -42,8 +43,8 @@
// OpenDialog **************************************************************
OpenDialog::OpenDialog(
QWidget* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, const char* slotConfigure, Options* pOptions)
KDiff3App* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, Options* pOptions)
: QDialog(pParent)
{
setObjectName("OpenDialog");
......@@ -166,7 +167,7 @@ OpenDialog::OpenDialog(
v->addWidget(box);
button = box->addButton(i18n("Configure..."), QDialogButtonBox::ActionRole);
button->setIcon(QIcon::fromTheme("configure"));
connect(button, SIGNAL(clicked()), pParent, slotConfigure);
connect(button, &QPushButton::clicked, pParent, &KDiff3App::slotConfigure);
connect(box, &QDialogButtonBox::accepted, this, &OpenDialog::accept);
connect(box, &QDialogButtonBox::rejected, this, &OpenDialog::reject);
......
......@@ -27,14 +27,15 @@ class Options;
class QComboBox;
class QCheckBox;
class QLineEdit;
class KDiff3App;
class OpenDialog : public QDialog
{
Q_OBJECT
public:
OpenDialog(// krazy:exclude=explicit
QWidget* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, const char* slotConfigure, Options* pOptions );
KDiff3App* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, Options* pOptions );
QComboBox* m_pLineA;
QComboBox* m_pLineB;
......@@ -104,7 +105,7 @@ private:
QLineEdit* m_pHistoryEntryStartMatchResult;
QLineEdit* m_pHistorySortKeyResult;
public:
RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip, const QString& historyStartRegExpToolTip,
RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip, const QString& historyStartRegExpToolTip,
const QString& historyEntryStartRegExpToolTip, const QString& historySortKeyOrderToolTip );
void init( const QString& autoMergeRegExp, const QString& historyStartRegExp, const QString& historyEntryStartRegExp, const QString sortKeyOrder );
QString autoMergeRegExp();
......
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