Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
56233f67
Commit
56233f67
authored
Apr 25, 2017
by
Eike Ziller
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/4.3'
Change-Id: I01d7d8aa282f2bca94f85f55c832c76672e229f7
parents
73f210da
e574860c
Changes
28
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
41044 additions
and
64 deletions
+41044
-64
docs.pri
docs.pri
+2
-2
share/qtcreator/debugger/dumper.py
share/qtcreator/debugger/dumper.py
+18
-11
share/qtcreator/debugger/gdbbridge.py
share/qtcreator/debugger/gdbbridge.py
+4
-1
share/qtcreator/translations/qtcreator_da.ts
share/qtcreator/translations/qtcreator_da.ts
+40869
-0
share/qtcreator/translations/translations.pro
share/qtcreator/translations/translations.pro
+1
-1
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
+1
-1
src/libs/utils/mimetypes/mimedatabase.cpp
src/libs/utils/mimetypes/mimedatabase.cpp
+2
-2
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+7
-4
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
+3
-1
src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
+10
-3
src/plugins/cmakeprojectmanager/servermodereader.cpp
src/plugins/cmakeprojectmanager/servermodereader.cpp
+47
-1
src/plugins/cmakeprojectmanager/servermodereader.h
src/plugins/cmakeprojectmanager/servermodereader.h
+2
-0
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+1
-0
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+1
-1
src/plugins/projectexplorer/abstractprocessstep.cpp
src/plugins/projectexplorer/abstractprocessstep.cpp
+2
-1
src/plugins/projectexplorer/project.cpp
src/plugins/projectexplorer/project.cpp
+7
-1
src/plugins/projectexplorer/projectmodels.cpp
src/plugins/projectexplorer/projectmodels.cpp
+8
-2
src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
...designer/components/componentcore/modelnodeoperations.cpp
+6
-6
src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
...ins/qmldesigner/components/formeditor/formeditorscene.cpp
+2
-1
src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
...ns/qmldesigner/components/itemlibrary/itemlibraryview.cpp
+11
-0
src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h
...gins/qmldesigner/components/itemlibrary/itemlibraryview.h
+2
-0
src/plugins/qmldesigner/components/texteditor/texteditorwidget.cpp
...ns/qmldesigner/components/texteditor/texteditorwidget.cpp
+1
-1
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
...lugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+17
-16
src/plugins/qmlprojectmanager/qmlproject.cpp
src/plugins/qmlprojectmanager/qmlproject.cpp
+1
-0
src/shared/help/bookmarkmanager.cpp
src/shared/help/bookmarkmanager.cpp
+3
-0
src/shared/help/bookmarkmanager.h
src/shared/help/bookmarkmanager.h
+1
-0
src/shared/qbs
src/shared/qbs
+1
-1
tests/auto/debugger/tst_dumpers.cpp
tests/auto/debugger/tst_dumpers.cpp
+14
-7
No files found.
docs.pri
View file @
56233f67
...
...
@@ -6,9 +6,9 @@
isEmpty(VERSION): error("Include qtcreator.pri before including docs.pri!")
qtcver.name = QTC_VERSION
qtcver.value = $$VERSION
qtcver.value = $$
QTCREATOR_DISPLAY_
VERSION
qtcvertag.name = QTC_VERSION_TAG
qtcvertag.value = $$replace(
qtcver.value
, \.,)
qtcvertag.value = $$replace(
VERSION
, \.,)
qtdocs.name = QT_INSTALL_DOCS
qtdocs.value = $$[QT_INSTALL_DOCS/src]
qdocindex.name = QDOC_INDEX_DIR
...
...
share/qtcreator/debugger/dumper.py
View file @
56233f67
...
...
@@ -1304,6 +1304,17 @@ class DumperBase:
self
.
putFormattedPointerX
(
value
)
self
.
ping
(
'formattedPointer'
)
def
putDerefedPointer
(
self
,
value
):
derefValue
=
value
.
dereference
()
innerType
=
value
.
type
.
target
()
#.unqualified()
self
.
putType
(
innerType
)
savedCurrentChildType
=
self
.
currentChildType
self
.
currentChildType
=
innerType
.
name
derefValue
.
name
=
'*'
self
.
putItem
(
derefValue
)
self
.
currentChildType
=
savedCurrentChildType
self
.
putOriginalAddress
(
value
.
pointer
())
def
putFormattedPointerX
(
self
,
value
):
#warn("PUT FORMATTED: %s" % value)
pointer
=
value
.
pointer
()
...
...
@@ -1328,6 +1339,10 @@ class DumperBase:
self
.
putNumChild
(
0
)
return
if
self
.
currentIName
.
endswith
(
'.this'
):
self
.
putDerefedPointer
(
value
)
return
displayFormat
=
self
.
currentItemFormat
(
value
.
type
.
name
)
innerType
=
value
.
type
.
target
()
#.unqualified()
...
...
@@ -1375,18 +1390,10 @@ class DumperBase:
#warn('AUTODEREF: %s' % self.autoDerefPointers)
#warn('INAME: %s' % self.currentIName)
#warn('INNER: %s' % innerType.name)
if
self
.
autoDerefPointers
or
self
.
currentIName
.
endswith
(
'.this'
):
derefValue
=
value
.
dereference
()
# Never dereference char types.
if
self
.
autoDerefPointers
:
# Generic pointer type with AutomaticFormat, but never dereference char types:
if
innerType
.
name
not
in
(
'char'
,
'signed char'
,
'unsigned char'
,
'wchar_t'
):
# Generic pointer type with AutomaticFormat.
self
.
putType
(
innerType
)
savedCurrentChildType
=
self
.
currentChildType
self
.
currentChildType
=
innerType
.
name
derefValue
.
name
=
'*'
self
.
putItem
(
derefValue
)
self
.
currentChildType
=
savedCurrentChildType
self
.
putOriginalAddress
(
pointer
)
self
.
putDerefedPointer
(
value
)
return
#warn('GENERIC PLAIN POINTER: %s' % value.type)
...
...
share/qtcreator/debugger/gdbbridge.py
View file @
56233f67
...
...
@@ -264,7 +264,10 @@ class Dumper(DumperBase):
y
=
nativeValue
.
cast
(
chars
.
array
(
0
,
int
(
nativeType
.
sizeof
-
1
)))
buf
=
bytearray
(
struct
.
pack
(
'x'
*
size
))
for
i
in
range
(
size
):
try
:
buf
[
i
]
=
int
(
y
[
i
])
except
:
pass
val
.
ldata
=
bytes
(
buf
)
val
.
type
=
self
.
fromNativeType
(
nativeType
)
...
...
share/qtcreator/translations/qtcreator_da.ts
0 → 100755
View file @
56233f67
This diff is collapsed.
Click to expand it.
share/qtcreator/translations/translations.pro
View file @
56233f67
...
...
@@ -2,7 +2,7 @@ TEMPLATE = aux
include
(..
/../../
qtcreator
.
pri
)
LANGUAGES
=
cs
de
fr
ja
pl
ru
sl
uk
zh_CN
zh_TW
LANGUAGES
=
cs
da
de
fr
ja
pl
ru
sl
uk
zh_CN
zh_TW
#
*
don't* re-enable these without a prior rework
BAD_LANGUAGES = hu
...
...
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
View file @
56233f67
...
...
@@ -283,7 +283,7 @@ extern "C" HRESULT CALLBACK pid(CIDebugClient *client, PCSTR args)
int
token
;
commandTokens
<
StringList
>
(
args
,
&
token
);
dprintf
(
"Qt Creator CDB extension version 4.
2
%d bit.
\n
"
,
dprintf
(
"Qt Creator CDB extension version 4.
3
%d bit.
\n
"
,
sizeof
(
void
*
)
*
8
);
if
(
const
ULONG
pid
=
currentProcessId
(
client
))
ExtensionContext
::
instance
().
report
(
'R'
,
token
,
0
,
"pid"
,
"%u"
,
pid
);
...
...
src/libs/utils/mimetypes/mimedatabase.cpp
View file @
56233f67
...
...
@@ -693,14 +693,14 @@ void Utils::setGlobPatternsForMimeType(const MimeType &mimeType, const QStringLi
{
auto
d
=
MimeDatabasePrivate
::
instance
();
QMutexLocker
locker
(
&
d
->
mutex
);
return
d
->
provider
()
->
setGlobPatternsForMimeType
(
mimeType
,
patterns
);
d
->
provider
()
->
setGlobPatternsForMimeType
(
mimeType
,
patterns
);
}
void
Utils
::
setMagicRulesForMimeType
(
const
MimeType
&
mimeType
,
const
QMap
<
int
,
QList
<
MimeMagicRule
>
>
&
rules
)
{
auto
d
=
MimeDatabasePrivate
::
instance
();
QMutexLocker
locker
(
&
d
->
mutex
);
return
d
->
provider
()
->
setMagicRulesForMimeType
(
mimeType
,
rules
);
d
->
provider
()
->
setMagicRulesForMimeType
(
mimeType
,
rules
);
}
void
Utils
::
setMimeStartupPhase
(
MimeStartupPhase
phase
)
...
...
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
View file @
56233f67
...
...
@@ -145,7 +145,7 @@ void CMakeBuildConfiguration::ctor()
connect
(
m_buildDirManager
.
get
(),
&
BuildDirManager
::
dataAvailable
,
this
,
[
this
,
project
]()
{
project
->
updateProjectData
(
this
);
emit
enabledChanged
();
clearError
();
emit
dataAvailable
();
});
connect
(
m_buildDirManager
.
get
(),
&
BuildDirManager
::
errorOccured
,
...
...
@@ -153,7 +153,7 @@ void CMakeBuildConfiguration::ctor()
connect
(
m_buildDirManager
.
get
(),
&
BuildDirManager
::
configurationStarted
,
this
,
[
this
,
project
]()
{
project
->
handleParsingStarted
();
emit
e
nabledChanged
(
);
clearError
(
ForceE
nabledChanged
::
True
);
emit
parsingStarted
();
});
...
...
@@ -176,6 +176,7 @@ bool CMakeBuildConfiguration::isParsing() const
void
CMakeBuildConfiguration
::
resetData
()
{
clearError
();
m_buildDirManager
->
resetData
();
}
...
...
@@ -342,12 +343,14 @@ void CMakeBuildConfiguration::setCurrentCMakeConfiguration(const QList<ConfigMod
m_buildDirManager
->
forceReparse
();
}
void
CMakeBuildConfiguration
::
clearError
()
void
CMakeBuildConfiguration
::
clearError
(
ForceEnabledChanged
fec
)
{
if
(
!
m_error
.
isEmpty
())
{
m_error
.
clear
();
emit
e
nabledChanged
()
;
fec
=
ForceE
nabledChanged
::
True
;
}
if
(
fec
==
ForceEnabledChanged
::
True
)
emit
enabledChanged
();
}
void
CMakeBuildConfiguration
::
emitBuildTypeChanged
()
...
...
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
View file @
56233f67
...
...
@@ -109,10 +109,12 @@ protected:
private:
void
ctor
();
enum
ForceEnabledChanged
:
quint8
{
False
,
True
};
void
clearError
(
ForceEnabledChanged
fec
=
ForceEnabledChanged
::
False
);
QList
<
ConfigModel
::
DataItem
>
completeCMakeConfiguration
()
const
;
void
setCurrentCMakeConfiguration
(
const
QList
<
ConfigModel
::
DataItem
>
&
items
);
void
clearError
();
void
setError
(
const
QString
&
message
);
void
setWarning
(
const
QString
&
message
);
...
...
src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
View file @
56233f67
...
...
@@ -172,6 +172,13 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
emit
addTask
(
Task
::
buildConfigurationMissingTask
());
canInit
=
false
;
}
if
(
!
bc
->
isEnabled
())
{
emit
addTask
(
Task
(
Task
::
Error
,
QCoreApplication
::
translate
(
"CMakeProjectManager::CMakeBuildStep"
,
"The build configuration is currently disabled."
),
Utils
::
FileName
(),
-
1
,
ProjectExplorer
::
Constants
::
TASK_CATEGORY_BUILDSYSTEM
));
canInit
=
false
;
}
CMakeTool
*
tool
=
CMakeKitInformation
::
cmakeTool
(
target
()
->
kit
());
if
(
!
tool
||
!
tool
->
isValid
())
{
...
...
@@ -185,7 +192,7 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
}
CMakeRunConfiguration
*
rc
=
targetsActiveRunConfiguration
();
if
(
isCurrentExecutableTarget
(
m_buildTarget
)
&&
(
!
rc
||
rc
->
title
().
isEmpty
()))
{
if
(
isCurrentExecutableTarget
(
m_buildTarget
)
&&
(
!
rc
||
rc
->
buildSystemTarget
().
isEmpty
()))
{
emit
addTask
(
Task
(
Task
::
Error
,
QCoreApplication
::
translate
(
"ProjectExplorer::Task"
,
"You asked to build the current Run Configuration's build target only, "
...
...
@@ -232,7 +239,7 @@ void CMakeBuildStep::run(QFutureInterface<bool> &fi)
// Make sure CMake state was written to disk before trying to build:
CMakeBuildConfiguration
*
bc
=
cmakeBuildConfiguration
();
if
(
!
bc
)
bc
=
qobject_cast
<
CMakeBuildConfiguration
*>
(
target
()
->
a
ctiveBuildConfiguration
()
)
;
bc
=
target
sA
ctiveBuildConfiguration
();
QTC_ASSERT
(
bc
,
return
);
bool
mustDelay
=
false
;
...
...
@@ -348,7 +355,7 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const
if
(
isCurrentExecutableTarget
(
m_buildTarget
))
{
if
(
rc
)
target
=
rc
->
title
();
target
=
rc
->
buildSystemTarget
();
else
target
=
QLatin1String
(
"<i><"
)
+
tr
(
ADD_RUNCONFIGURATION_TEXT
)
+
QLatin1String
(
"></i>"
);
}
else
{
...
...
src/plugins/cmakeprojectmanager/servermodereader.cpp
View file @
56233f67
...
...
@@ -40,6 +40,7 @@
#include <projectexplorer/taskhub.h>
#include <utils/algorithm.h>
#include <utils/asconst.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
...
...
@@ -294,7 +295,7 @@ void ServerModeReader::generateProjectTree(CMakeProjectNode *root,
void
ServerModeReader
::
updateCodeModel
(
CppTools
::
RawProjectParts
&
rpps
)
{
int
counter
=
0
;
for
each
(
const
FileGroup
*
fg
,
m_fileGroups
)
{
for
(
const
FileGroup
*
fg
:
Utils
::
asConst
(
m_fileGroups
)
)
{
++
counter
;
const
QString
defineArg
=
transform
(
fg
->
defines
,
[](
const
QString
&
s
)
->
QString
{
...
...
@@ -469,6 +470,8 @@ ServerModeReader::Target *ServerModeReader::extractTargetData(const QVariantMap
target
->
fileGroups
.
append
(
extractFileGroupData
(
fgData
,
srcDir
,
target
));
}
fixTarget
(
target
);
m_targets
.
append
(
target
);
return
target
;
}
...
...
@@ -547,6 +550,49 @@ void ServerModeReader::extractCacheData(const QVariantMap &data)
m_cmakeCache
=
config
;
}
void
ServerModeReader
::
fixTarget
(
ServerModeReader
::
Target
*
target
)
const
{
QHash
<
QString
,
const
FileGroup
*>
languageFallbacks
;
for
(
const
FileGroup
*
group
:
Utils
::
asConst
(
target
->
fileGroups
))
{
if
(
group
->
includePaths
.
isEmpty
()
&&
group
->
compileFlags
.
isEmpty
()
&&
group
->
defines
.
isEmpty
())
continue
;
const
FileGroup
*
fallback
=
languageFallbacks
.
value
(
group
->
language
);
if
(
!
fallback
||
fallback
->
sources
.
count
()
<
group
->
sources
.
count
())
languageFallbacks
.
insert
(
group
->
language
,
group
);
}
if
(
!
languageFallbacks
.
value
(
""
))
return
;
// No empty language groups found, no need to proceed.
const
FileGroup
*
fallback
=
languageFallbacks
.
value
(
"CXX"
);
if
(
!
fallback
)
fallback
=
languageFallbacks
.
value
(
"C"
);
if
(
!
fallback
)
fallback
=
languageFallbacks
.
value
(
""
);
if
(
!
fallback
)
return
;
for
(
auto
it
=
target
->
fileGroups
.
begin
();
it
!=
target
->
fileGroups
.
end
();
++
it
)
{
if
(
!
(
*
it
)
->
language
.
isEmpty
())
continue
;
(
*
it
)
->
language
=
fallback
->
language
.
isEmpty
()
?
"CXX"
:
fallback
->
language
;
if
(
*
it
==
fallback
||
!
(
*
it
)
->
includePaths
.
isEmpty
()
||
!
(
*
it
)
->
defines
.
isEmpty
()
||
!
(
*
it
)
->
compileFlags
.
isEmpty
())
continue
;
for
(
const
IncludePath
*
ip
:
fallback
->
includePaths
)
(
*
it
)
->
includePaths
.
append
(
new
IncludePath
(
*
ip
));
(
*
it
)
->
defines
=
fallback
->
defines
;
(
*
it
)
->
compileFlags
=
fallback
->
compileFlags
;
}
}
QHash
<
Utils
::
FileName
,
ProjectNode
*>
ServerModeReader
::
addCMakeLists
(
CMakeProjectNode
*
root
,
const
QList
<
FileNode
*>
&
cmakeLists
)
{
...
...
src/plugins/cmakeprojectmanager/servermodereader.h
View file @
56233f67
...
...
@@ -113,6 +113,8 @@ private:
void
extractCMakeInputsData
(
const
QVariantMap
&
data
);
void
extractCacheData
(
const
QVariantMap
&
data
);
void
fixTarget
(
Target
*
target
)
const
;
QHash
<
Utils
::
FileName
,
ProjectExplorer
::
ProjectNode
*>
addCMakeLists
(
CMakeProjectNode
*
root
,
const
QList
<
ProjectExplorer
::
FileNode
*>
&
cmakeLists
);
void
addProjects
(
const
QHash
<
Utils
::
FileName
,
ProjectExplorer
::
ProjectNode
*>
&
cmakeListsNodes
,
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
56233f67
...
...
@@ -1397,6 +1397,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_snapshotHandler
=
new
SnapshotHandler
;
m_snapshotView
=
new
SnapshotTreeView
(
m_snapshotHandler
);
m_snapshotView
->
setSettings
(
settings
,
"Debugger.SnapshotView"
);
m_snapshotView
->
setIconSize
(
QSize
(
10
,
10
));
m_snapshotView
->
setModel
(
m_snapshotHandler
->
model
());
m_snapshotWindow
=
addSearch
(
m_snapshotView
,
tr
(
"Snapshots"
),
DOCKWIDGET_SNAPSHOTS
);
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
56233f67
...
...
@@ -3867,7 +3867,7 @@ void GdbEngine::startGdb(const QStringList &args)
QString
msg
;
QString
wd
=
m_gdbProc
.
workingDirectory
();
if
(
!
QFileInfo
(
wd
).
isDir
())
msg
=
failedToStartMessage
()
+
' '
+
tr
(
"The working directory
\"
%
s
\"
is not usable."
).
arg
(
wd
);
msg
=
failedToStartMessage
()
+
' '
+
tr
(
"The working directory
\"
%
1
\"
is not usable."
).
arg
(
wd
);
else
msg
=
errorMessage
(
QProcess
::
FailedToStart
);
handleAdapterStartFailed
(
msg
);
...
...
src/plugins/projectexplorer/abstractprocessstep.cpp
View file @
56233f67
...
...
@@ -158,7 +158,7 @@ void AbstractProcessStep::setIgnoreReturnValue(bool b)
bool
AbstractProcessStep
::
init
(
QList
<
const
BuildStep
*>
&
earlierSteps
)
{
Q_UNUSED
(
earlierSteps
);
return
true
;
return
!
m_process
;
}
/*!
...
...
@@ -205,6 +205,7 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
if
(
!
m_process
->
waitForStarted
())
{
processStartupFailed
();
m_process
.
reset
();
m_outputParserChain
.
reset
();
reportRunResult
(
fi
,
false
);
return
;
}
...
...
src/plugins/projectexplorer/project.cpp
View file @
56233f67
...
...
@@ -555,13 +555,19 @@ QStringList Project::files(Project::FilesMode fileMode,
if
(
!
rootProjectNode
())
return
result
;
QSet
<
QString
>
alreadySeen
;
rootProjectNode
()
->
forEachNode
([
&
](
const
FileNode
*
fn
)
{
if
(
filter
&&
!
filter
(
fn
))
return
;
const
QString
path
=
fn
->
filePath
().
toString
();
const
int
count
=
alreadySeen
.
count
();
alreadySeen
.
insert
(
path
);
if
(
count
==
alreadySeen
.
count
())
return
;
// skip duplicates
if
((
fileMode
==
AllFiles
)
||
(
fileMode
==
SourceFiles
&&
!
fn
->
isGenerated
())
||
(
fileMode
==
GeneratedFiles
&&
fn
->
isGenerated
()))
result
.
append
(
fn
->
filePath
().
toString
()
);
result
.
append
(
path
);
});
return
result
;
}
...
...
src/plugins/projectexplorer/projectmodels.cpp
View file @
56233f67
...
...
@@ -82,6 +82,7 @@ FlatModel::FlatModel(QObject *parent)
connect
(
sm
,
&
SessionManager
::
aboutToSaveSession
,
this
,
&
FlatModel
::
saveExpandData
);
connect
(
sm
,
&
SessionManager
::
projectAdded
,
this
,
&
FlatModel
::
handleProjectAdded
);
connect
(
sm
,
&
SessionManager
::
startupProjectChanged
,
this
,
[
this
]
{
layoutChanged
();
});
rebuildModel
();
}
QVariant
FlatModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
...
...
@@ -104,10 +105,15 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
break
;
}
case
Qt
::
DecorationRole
:
{
if
(
folderNode
)
if
(
folderNode
)
{
result
=
folderNode
->
icon
();
else
if
(
ContainerNode
*
containerNode
=
folderNode
->
asContainerNode
())
{
if
(
ProjectNode
*
projectNode
=
containerNode
->
rootProjectNode
())
result
=
projectNode
->
icon
();
}
}
else
{
result
=
Core
::
FileIconProvider
::
icon
(
node
->
filePath
().
toString
());
}
break
;
}
case
Qt
::
FontRole
:
{
...
...
src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
View file @
56233f67
...
...
@@ -987,6 +987,12 @@ void addTabBarToStackedContainer(const SelectionContext &selectionContext)
const
int
maxValue
=
container
.
directSubModelNodes
().
count
();
QmlItemNode
tabBarItem
(
tabBarNode
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineLeft
,
containerItemNode
,
AnchorLineLeft
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineRight
,
containerItemNode
,
AnchorLineRight
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineBottom
,
containerItemNode
,
AnchorLineTop
);
for
(
int
i
=
0
;
i
<
maxValue
;
++
i
)
{
ModelNode
tabButtonNode
=
view
->
createModelNode
(
"QtQuick.Controls.TabButton"
,
...
...
@@ -997,12 +1003,6 @@ void addTabBarToStackedContainer(const SelectionContext &selectionContext)
tabBarNode
.
defaultNodeListProperty
().
reparentHere
(
tabButtonNode
);
}
QmlItemNode
tabBarItem
(
tabBarNode
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineLeft
,
containerItemNode
,
AnchorLineLeft
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineRight
,
containerItemNode
,
AnchorLineRight
);
tabBarItem
.
anchors
().
setAnchor
(
AnchorLineBottom
,
containerItemNode
,
AnchorLineTop
);
const
QString
id
=
tabBarNode
.
validId
();
container
.
removeProperty
(
indexPropertyName
);
...
...
src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
View file @
56233f67
...
...
@@ -43,6 +43,7 @@
#include <QTime>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
namespace
QmlDesigner
{
...
...
@@ -85,7 +86,7 @@ void FormEditorScene::resetScene()
FormEditorItem
*
FormEditorScene
::
itemForQmlItemNode
(
const
QmlItemNode
&
qmlItemNode
)
const
{
Q_ASSERT
(
qmlItemNode
.
isValid
());
Q
TC
_ASSERT
(
qmlItemNode
.
isValid
()
,
return
0
);
return
m_qmlItemNodeItemHash
.
value
(
qmlItemNode
);
}
...
...
src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
View file @
56233f67
...
...
@@ -27,6 +27,7 @@
#include "itemlibrarywidget.h"
#include <import.h>
#include <importmanagerview.h>
#include <rewriterview.h>
namespace
QmlDesigner
{
...
...
@@ -69,6 +70,7 @@ void ItemLibraryView::modelAttached(Model *model)
m_widget
->
setModel
(
model
);
updateImports
();
model
->
attachView
(
m_importManagerView
);
m_hasErrors
=
!
rewriterView
()
->
errors
().
isEmpty
();
}
void
ItemLibraryView
::
modelAboutToBeDetached
(
Model
*
model
)
...
...
@@ -93,6 +95,15 @@ void ItemLibraryView::setResourcePath(const QString &resourcePath)
m_widget
->
setResourcePath
(
resourcePath
);
}
void
ItemLibraryView
::
documentMessagesChanged
(
const
QList
<
DocumentMessage
>
&
errors
,
const
QList
<
DocumentMessage
>
&
)
{
if
(
m_hasErrors
&&
errors
.
isEmpty
())
/* For some reason we have to call update from the event loop */
QTimer
::
singleShot
(
0
,
m_widget
,
&
ItemLibraryWidget
::
updateModel
);
m_hasErrors
=
!
errors
.
isEmpty
();
}
void
ItemLibraryView
::
updateImports
()
{
m_widget
->
updateModel
();
...
...
src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h
View file @
56233f67
...
...
@@ -50,6 +50,7 @@ public:
void
modelAttached
(
Model
*
model
)
override
;
void
modelAboutToBeDetached
(
Model
*
model
)
override
;
void
importsChanged
(
const
QList
<
Import
>
&
addedImports
,
const
QList
<
Import
>
&
removedImports
)
override
;
void
documentMessagesChanged
(
const
QList
<
DocumentMessage
>
&
errors
,
const
QList
<
DocumentMessage
>
&
warnings
)
override
;
void
setResourcePath
(
const
QString
&
resourcePath
);
...
...
@@ -59,6 +60,7 @@ protected:
private:
QPointer
<
ItemLibraryWidget
>
m_widget
;
ImportManagerView
*
m_importManagerView
;
bool
m_hasErrors
=
false
;
};
}
src/plugins/qmldesigner/components/texteditor/texteditorwidget.cpp
View file @
56233f67
...
...
@@ -177,7 +177,7 @@ bool TextEditorWidget::eventFilter( QObject *, QEvent *event)
{
static
std
::
vector
<
int
>
overrideKeys
=
{
Qt
::
Key_Delete
,
Qt
::
Key_Backspace
,
Qt
::
Key_Left
,
Qt
::
Key_Right
,
Qt
::
Key_Up
,
Qt
::
Key_Down
,
Qt
::
Key_Insert
,
Qt
::
Key_Escape
,
Qt
::
Key_Home
,
Qt
::
Key_End
};
Qt
::
Key_Escape
};
static
std
::
vector
<
QKeySequence
>
overrideSequences
=
{
QKeySequence
::
SelectAll
,
QKeySequence
::
Cut
,
QKeySequence
::
Copy
,
QKeySequence
::
Delete
,
...
...
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
View file @
56233f67
...
...
@@ -575,10 +575,10 @@ private:
void
initialiseProperties
();
TypeName
m_qualfiedTypeName
;
int
m_majorVersion
;
int
m_minorVersion
;
bool
m_isValid
;
bool
m_isFileComponent
;
int
m_majorVersion
=
-
1
;
int
m_minorVersion
=
-
1
;
bool
m_isValid
=
false
;
bool
m_isFileComponent
=
false
;
PropertyNameList
m_properties
;
PropertyNameList
m_signals
;
QList
<
TypeName
>
m_propertyTypes
;
...
...
@@ -673,10 +673,11 @@ NodeMetaInfoPrivate::NodeMetaInfoPrivate() : m_isValid(false)
}
NodeMetaInfoPrivate
::
NodeMetaInfoPrivate
(
Model
*
model
,
TypeName
type
,
int
maj
,
int
min
)
:
m_qualfiedTypeName
(
type
),
m_majorVersion
(
maj
),
m_minorVersion
(
min
),
m_isValid
(
false
),
m_isFileComponent
(
false
),
m_model
(
model
)
NodeMetaInfoPrivate
::
NodeMetaInfoPrivate
(
Model
*
model
,
TypeName
type
,
int
maj
,
int
min
)
:
m_qualfiedTypeName
(
type
)
,
m_majorVersion
(
maj
)
,
m_minorVersion
(
min
)
,
m_model
(
model
)
{
if
(
context
())
{
const
CppComponentValue
*
cppObjectValue
=
getCppComponentValue
();
...
...
@@ -1415,7 +1416,6 @@ QStringList NodeMetaInfo::propertyKeysForEnum(const PropertyName &propertyName)
QVariant
NodeMetaInfo
::
propertyCastedValue
(
const
PropertyName
&
propertyName
,
const
QVariant
&
value
)
const
{
const
QVariant
variant
=
value
;
QVariant
copyVariant
=
variant
;
if
(
propertyIsEnumType
(
propertyName
)
...
...
@@ -1489,10 +1489,12 @@ TypeName NodeMetaInfo::typeName() const
{
return
m_privateData
->
qualfiedTypeName
();
}
int
NodeMetaInfo
::
majorVersion
()
const
{
return
m_privateData
->
majorVersion
();
}
int
NodeMetaInfo
::
minorVersion
()
const
{
return
m_privateData
->
minorVersion
();
...
...
@@ -1537,8 +1539,7 @@ bool NodeMetaInfo::isSubclassOf(const TypeName &type, int majorVersion, int mino
if
(
typeName
().
isEmpty
())
return
false
;
if
(
typeName
()
==
type
&&
availableInVersion
(
majorVersion
,
minorVersion
))
if
(
typeName
()
==
type
&&
availableInVersion
(
majorVersion
,
minorVersion
))
return
true
;
if
(
m_privateData
->
prototypeCachePositives
().
contains
(
Internal
::
stringIdentifier
(
type
,
majorVersion
,
minorVersion
)))
...
...
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
56233f67
...
...
@@ -357,6 +357,7 @@ void QmlProject::generateProjectTree()
fileType
=
FileType
::
Project
;
newRoot
->
addNestedNode
(
new
FileNode
(
Utils
::
FileName
::
fromString
(
f
),
fileType
,
false
));
}
newRoot
->
addNestedNode
(
new
FileNode
(
projectFilePath
(),
FileType
::
Project
,
false
));
setRootProjectNode
(
newRoot
);
}
...
...
src/shared/help/bookmarkmanager.cpp
View file @
56233f67
...
...
@@ -596,6 +596,8 @@ BookmarkModel* BookmarkManager::listBookmarkModel() const
void
BookmarkManager
::
saveBookmarks
()
{
if
(
!
m_isModelSetup
)
return
;
QByteArray
bookmarks
;
QDataStream
stream
(
&
bookmarks
,
QIODevice
::
WriteOnly
);
...
...
@@ -708,6 +710,7 @@ void BookmarkManager::itemChanged(QStandardItem *item)
void
BookmarkManager
::
setupBookmarkModels
()
{
m_isModelSetup
=
true
;
treeModel
->
clear
();
listModel
->
clear
();
...
...
src/shared/help/bookmarkmanager.h
View file @
56233f67
...
...
@@ -176,4 +176,5 @@ private:
BookmarkModel
*
treeModel
;
BookmarkModel
*
listModel
;
QStandardItem
*
renameItem
;
bool
m_isModelSetup
=
false
;
};
qbs
@
96f182fd
Compare
cc99f7de
...
96f182fd
Subproject commit
cc99f7de4e1578feb1ca8e5a2ca7384b25b6d427
Subproject commit
96f182fd975c7fe90f4e54de887d04b633c85383
tests/auto/debugger/tst_dumpers.cpp
View file @
56233f67
...
...
@@ -1282,7 +1282,8 @@ void tst_Dumpers::dumper()