Commit 78dbd7c6 authored by Christoph Cullmann's avatar Christoph Cullmann

Merge branch 'feature-compile-with-deprecated-qt-functions' into 'master'

Compile with -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00

See merge request kde/kate!30
parents a592bf54 ae3e2b3c
......@@ -34,6 +34,7 @@ include(FeatureSummary)
# forbid some old things
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
ecm_optional_add_subdirectory(addons)
ecm_optional_add_subdirectory(kwrite)
......
......@@ -353,7 +353,7 @@ void KateFileTree::slotExpandRecursive()
// Append all children of current item
for (int i = 0; i < model()->rowCount(index); ++i) {
worklist.append(index.child(i, 0));
worklist.append(model()->index(i, 0, index));
}
}
}
......@@ -375,7 +375,7 @@ void KateFileTree::slotCollapseRecursive()
// Prepend all children of current item
for (int i = 0; i < model()->rowCount(index); ++i) {
worklist.append(index.child(i, 0));
worklist.append(model()->index(i, 0, index));
}
}
}
......
......@@ -73,7 +73,7 @@ void DebugView::runDebugger(const GDBTargetConf &conf, const QStringList &ioFifo
// create a process to control GDB
m_debugProcess.setWorkingDirectory(m_targetConf.workDir);
connect(&m_debugProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, &DebugView::slotError);
connect(&m_debugProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred), this, &DebugView::slotError);
connect(&m_debugProcess, &QProcess::readyReadStandardError, this, &DebugView::slotReadDebugStdErr);
......
......@@ -44,12 +44,14 @@ public:
if (index0.internalId() == 0xffffffff) {
int i = 0;
while (index0.child(i, 0).data().isValid()) {
name = index0.child(i, 0).data().toString();
auto childIndex = index0.model()->index(i, 0, index0);
while (childIndex.data().isValid()) {
name = childIndex.data().toString();
if (name.contains(m_filter, Qt::CaseInsensitive)) {
return true;
}
i++;
childIndex = index0.model()->index(i, 0, index0);
}
return false;
}
......
......@@ -1056,7 +1056,7 @@ void KateBuildView::targetOrSetCopy()
{
QModelIndex newIndex = m_targetsUi->targetsModel.copyTargetOrSet(m_targetsUi->targetsView->currentIndex());
if (m_targetsUi->targetsModel.hasChildren(newIndex)) {
m_targetsUi->targetsView->setCurrentIndex(newIndex.child(0, 0));
m_targetsUi->targetsView->setCurrentIndex(newIndex.model()->index(0, 0, newIndex));
return;
}
m_targetsUi->targetsView->setCurrentIndex(newIndex);
......@@ -1188,7 +1188,7 @@ void KateBuildView::slotAddProjectTarget()
}
QModelIndex ind = m_targetsUi->targetsModel.index(set);
if (!ind.child(0, 0).data().isValid()) {
if (!ind.model()->index(0, 0, ind).data().isValid()) {
QString buildCmd = buildMap.value(QStringLiteral("build")).toString();
QString cleanCmd = buildMap.value(QStringLiteral("clean")).toString();
QString quickCmd = buildMap.value(QStringLiteral("quick")).toString();
......
......@@ -93,7 +93,7 @@ void TargetsUi::targetSetSelected(int index)
QModelIndex rootItem = targetsModel.index(index, 0);
targetsView->setExpanded(rootItem, true);
targetsView->setCurrentIndex(rootItem.child(0, 0));
targetsView->setCurrentIndex(targetsModel.index(0, 0, rootItem));
}
void TargetsUi::targetActivated(const QModelIndex &index)
......
......@@ -151,7 +151,7 @@ void ReplicodeView::runReplicode()
connect(m_executor, &QProcess::readyReadStandardError, this, &ReplicodeView::gotStderr);
connect(m_executor, &QProcess::readyReadStandardOutput, this, &ReplicodeView::gotStdout);
connect(m_executor, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &ReplicodeView::replicodeFinished);
connect(m_executor, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, &ReplicodeView::runErrored);
connect(m_executor, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred), this, &ReplicodeView::runErrored);
qDebug() << executorPath << sourceFile.canonicalPath();
m_completed = false;
m_executor->start(executorPath, QStringList(), QProcess::ReadOnly);
......
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