Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdevelop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christoph Roick
kdevelop
Commits
4a61bcb4
Commit
4a61bcb4
authored
Dec 07, 2020
by
Milian Wolff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5.6'
parents
52216a13
4887d28e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
16 deletions
+48
-16
plugins/cmake/settings/cmakecachemodel.cpp
plugins/cmake/settings/cmakecachemodel.cpp
+3
-1
plugins/cmake/settings/cmakecachemodel.h
plugins/cmake/settings/cmakecachemodel.h
+4
-1
plugins/cmake/settings/cmakepreferences.cpp
plugins/cmake/settings/cmakepreferences.cpp
+33
-7
plugins/cmake/settings/cmakepreferences.h
plugins/cmake/settings/cmakepreferences.h
+2
-1
plugins/gdb/debugsession.cpp
plugins/gdb/debugsession.cpp
+1
-1
plugins/qmakemanager/parser/main.cpp
plugins/qmakemanager/parser/main.cpp
+5
-5
No files found.
plugins/cmake/settings/cmakecachemodel.cpp
View file @
4a61bcb4
...
...
@@ -146,7 +146,9 @@ bool CMakeCacheModel::setData(const QModelIndex& index, const QVariant& value, i
{
bool
ret
=
QStandardItemModel
::
setData
(
index
,
value
,
role
);
if
(
ret
)
{
m_modifiedRows
.
insert
(
index
.
row
());
const
auto
i
=
index
.
row
();
m_modifiedRows
.
insert
(
i
);
emit
valueChanged
(
item
(
i
,
0
)
->
text
(),
item
(
i
,
2
)
->
text
());
}
return
ret
;
}
...
...
plugins/cmake/settings/cmakecachemodel.h
View file @
4a61bcb4
...
...
@@ -51,7 +51,10 @@ class CMakeCacheModel : public QStandardItemModel
KDevelop
::
Path
filePath
()
const
;
void
read
();
QVariantMap
changedValues
()
const
;
Q_SIGNALS:
void
valueChanged
(
const
QString
&
name
,
const
QString
&
value
)
const
;
public
Q_SLOTS
:
void
reset
();
...
...
plugins/cmake/settings/cmakepreferences.cpp
View file @
4a61bcb4
...
...
@@ -39,6 +39,7 @@
#include "cmakebuilderconfig.h"
#include <debug.h>
#include <cmakeutils.h>
#include <cmakefileapi.h>
#include <interfaces/iproject.h>
#include <project/interfaces/ibuildsystemmanager.h>
#include <project/interfaces/iprojectbuilder.h>
...
...
@@ -114,13 +115,20 @@ void CMakePreferences::initAdvanced()
m_prefsUi
->
environment
->
setCurrentProfile
(
CMake
::
currentEnvironment
(
m_project
)
);
m_prefsUi
->
installationPrefix
->
setText
(
CMake
::
currentInstallDir
(
m_project
).
toLocalFile
());
m_prefsUi
->
installationPrefix
->
setMode
(
KFile
::
Directory
);
const
QString
buildType
=
CMake
::
currentBuildType
(
m_project
);
setBuildType
(
CMake
::
currentBuildType
(
m_project
));
m_prefsUi
->
extraArguments
->
setEditText
(
CMake
::
currentExtraArguments
(
m_project
));
m_prefsUi
->
cMakeExecutable
->
setText
(
CMake
::
currentCMakeExecutable
(
m_project
).
toLocalFile
());
}
void
CMakePreferences
::
setBuildType
(
const
QString
&
buildType
)
{
if
(
m_prefsUi
->
buildType
->
currentText
()
==
buildType
)
return
;
if
(
m_prefsUi
->
buildType
->
findText
(
buildType
)
==
-
1
)
{
m_prefsUi
->
buildType
->
addItem
(
buildType
);
}
m_prefsUi
->
buildType
->
setCurrentIndex
(
m_prefsUi
->
buildType
->
findText
(
buildType
));
m_prefsUi
->
extraArguments
->
setEditText
(
CMake
::
currentExtraArguments
(
m_project
));
m_prefsUi
->
cMakeExecutable
->
setText
(
CMake
::
currentCMakeExecutable
(
m_project
).
toLocalFile
());
}
void
CMakePreferences
::
reset
()
...
...
@@ -158,10 +166,7 @@ void CMakePreferences::apply()
CMake
::
setCurrentInstallDir
(
m_project
,
Path
(
m_prefsUi
->
installationPrefix
->
text
())
);
const
QString
buildType
=
m_prefsUi
->
buildType
->
currentText
();
if
(
m_prefsUi
->
buildType
->
findText
(
buildType
)
==
-
1
)
{
m_prefsUi
->
buildType
->
addItem
(
buildType
);
}
CMake
::
setCurrentBuildType
(
m_project
,
buildType
);
CMake
::
setCurrentBuildType
(
m_project
,
buildType
);
CMake
::
setCurrentExtraArguments
(
m_project
,
m_prefsUi
->
extraArguments
->
currentText
()
);
CMake
::
setCurrentCMakeExecutable
(
m_project
,
Path
(
m_prefsUi
->
cMakeExecutable
->
text
())
);
...
...
@@ -223,6 +228,20 @@ void CMakePreferences::updateCache(const Path &newBuildDir)
this
,
&
CMakePreferences
::
configureCacheView
);
connect
(
m_prefsUi
->
cacheList
->
selectionModel
(),
&
QItemSelectionModel
::
currentChanged
,
this
,
&
CMakePreferences
::
listSelectionChanged
);
connect
(
m_currentModel
,
&
CMakeCacheModel
::
valueChanged
,
this
,
[
this
](
const
QString
&
name
,
const
QString
&
value
)
{
if
(
name
==
QLatin1String
(
"CMAKE_BUILD_TYPE"
))
{
setBuildType
(
value
);
}
});
connect
(
m_prefsUi
->
buildType
,
&
QComboBox
::
currentTextChanged
,
m_currentModel
,
[
this
](
const
QString
&
value
)
{
if
(
!
m_currentModel
)
return
;
const
auto
items
=
m_currentModel
->
findItems
(
QStringLiteral
(
"CMAKE_BUILD_TYPE"
));
for
(
auto
*
item
:
items
)
{
m_currentModel
->
setData
(
m_currentModel
->
index
(
item
->
row
(),
2
),
value
);
}
});
}
else
{
...
...
@@ -366,6 +385,13 @@ void CMakePreferences::removeBuildDir()
void
CMakePreferences
::
configure
()
{
if
(
CMake
::
FileApi
::
supported
(
CMake
::
currentCMakeExecutable
(
m_project
).
toLocalFile
()))
{
// the file api already does a configure internally when we reload the model
// so don't do it twice
m_project
->
reloadModel
();
return
;
}
IProjectBuilder
*
b
=
m_project
->
buildSystemManager
()
->
builder
();
KJob
*
job
=
b
->
configure
(
m_project
);
if
(
m_currentModel
)
{
...
...
plugins/cmake/settings/cmakepreferences.h
View file @
4a61bcb4
...
...
@@ -64,7 +64,8 @@ class CMakePreferences : public KDevelop::ConfigPage
private:
void
configure
();
void
initAdvanced
();
void
setBuildType
(
const
QString
&
buildType
);
KDevelop
::
IProject
*
m_project
;
KDevelop
::
Path
m_srcFolder
;
KDevelop
::
Path
m_subprojFolder
;
...
...
plugins/gdb/debugsession.cpp
View file @
4a61bcb4
...
...
@@ -283,7 +283,7 @@ void DebugSession::handleVersion(const QStringList& s)
// minimal version is 7.0,0
QRegularExpression
rx
(
QStringLiteral
(
"([0-9]+)
\\
.([0-9]+)(
\\
.([0-9]+))?"
));
const
auto
match
=
rx
.
match
(
response
);
if
(
!
match
.
hasMatch
()
||
QVersionNumber
::
fromString
(
match
.
capturedRef
(
0
))
<
QVersionNumber
(
7
,
0
,
0
))
{
if
(
!
match
.
hasMatch
()
||
QVersionNumber
::
fromString
(
match
.
capturedRef
(
0
)
.
toString
()
)
<
QVersionNumber
(
7
,
0
,
0
))
{
if
(
!
qobject_cast
<
QGuiApplication
*>
(
qApp
))
{
//for unittest
qFatal
(
"You need a graphical application."
);
...
...
plugins/qmakemanager/parser/main.cpp
View file @
4a61bcb4
...
...
@@ -30,14 +30,14 @@ int main(int argc, char* argv[])
{
QCoreApplication
app
(
argc
,
argv
);
KAboutData
aboutData
(
QLatin1String
(
"QMake Parser"
),
"qmake-parser"
,
QLatin1String
(
"1.0"
));
aboutData
.
setShortDescription
(
"Parse QMake project files"
);
KAboutData
aboutData
(
QLatin1String
(
"QMake Parser"
),
QLatin1String
(
"qmake-parser"
)
,
QLatin1String
(
"1.0"
));
aboutData
.
setShortDescription
(
QLatin1String
(
"Parse QMake project files"
)
);
KAboutData
::
setApplicationData
(
aboutData
);
QCommandLineParser
parser
;
aboutData
.
setupCommandLine
(
&
parser
);
parser
.
addOption
(
QCommandLineOption
(
QLatin1String
(
"debug"
),
"Enable output of the debug AST"
));
parser
.
addPositionalArgument
(
"files"
,
"QMake project files"
);
parser
.
addOption
(
QCommandLineOption
(
QLatin1String
(
"debug"
),
QLatin1String
(
"Enable output of the debug AST"
)
));
parser
.
addPositionalArgument
(
QLatin1String
(
"files"
),
QLatin1String
(
"QMake project files"
)
);
parser
.
process
(
app
);
aboutData
.
processCommandLine
(
&
parser
);
...
...
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
return
EXIT_FAILURE
;
}
const
bool
debug
=
parser
.
isSet
(
"debug"
);
const
bool
debug
=
parser
.
isSet
(
QLatin1String
(
"debug"
)
);
foreach
(
const
auto
arg
,
parser
.
positionalArguments
())
{
QMake
::
Driver
driver
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment