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
f6e304f0
Commit
f6e304f0
authored
Mar 11, 2009
by
dt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
0cd8da28
fd320012
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
212 additions
and
69 deletions
+212
-69
share/qtcreator/gdbmacros/gdbmacros.cpp
share/qtcreator/gdbmacros/gdbmacros.cpp
+49
-0
src/libs/utils/consoleprocess_unix.cpp
src/libs/utils/consoleprocess_unix.cpp
+6
-1
src/libs/utils/process_stub.pro
src/libs/utils/process_stub.pro
+8
-1
src/libs/utils/process_stub_win.c
src/libs/utils/process_stub_win.c
+1
-1
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+11
-0
src/plugins/debugger/dumper.pro
src/plugins/debugger/dumper.pro
+9
-0
src/plugins/debugger/gdbengine.cpp
src/plugins/debugger/gdbengine.cpp
+15
-0
src/plugins/debugger/watchhandler.cpp
src/plugins/debugger/watchhandler.cpp
+13
-1
src/plugins/debugger/watchhandler.h
src/plugins/debugger/watchhandler.h
+1
-0
src/plugins/designer/formeditorw.cpp
src/plugins/designer/formeditorw.cpp
+64
-47
src/plugins/designer/formeditorw.h
src/plugins/designer/formeditorw.h
+1
-0
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/fakevim/fakevimhandler.cpp
+4
-1
src/plugins/plugins.pro
src/plugins/plugins.pro
+2
-1
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+1
-1
src/shared/proparser/profileevaluator.cpp
src/shared/proparser/profileevaluator.cpp
+2
-11
src/shared/proparser/proparserutils.h
src/shared/proparser/proparserutils.h
+2
-4
tests/manual/gdbdebugger/simple/app.cpp
tests/manual/gdbdebugger/simple/app.cpp
+23
-0
No files found.
share/qtcreator/gdbmacros/gdbmacros.cpp
View file @
f6e304f0
...
...
@@ -60,6 +60,7 @@ int qtGhVersion = QT_VERSION;
#include <list>
#include <map>
#include <string>
#include <set>
#include <vector>
#include <ctype.h>
...
...
@@ -797,6 +798,7 @@ static void qDumpInnerValueOrPointer(QDumper &d,
if
(
strippedtype
)
{
if
(
deref
(
addr
))
{
P
(
d
,
"addr"
,
deref
(
addr
));
P
(
d
,
"saddr"
,
deref
(
addr
));
P
(
d
,
"type"
,
strippedtype
);
qDumpInnerValueHelper
(
d
,
strippedtype
,
deref
(
addr
));
}
else
{
...
...
@@ -1223,6 +1225,7 @@ static void qDumpQList(QDumper &d)
P
(
d
,
"name"
,
i
);
if
(
innerTypeIsPointer
)
{
void
*
p
=
ldata
.
d
->
array
+
i
+
pdata
->
begin
;
P
(
d
,
"saddr"
,
p
);
if
(
p
)
{
//P(d, "value","@" << p);
qDumpInnerValue
(
d
,
strippedInnerType
.
data
(),
deref
(
p
));
...
...
@@ -2236,6 +2239,49 @@ static void qDumpStdMap(QDumper &d)
d
.
disarm
();
}
static
void
qDumpStdSet
(
QDumper
&
d
)
{
typedef
std
::
set
<
int
>
DummyType
;
const
DummyType
&
set
=
*
reinterpret_cast
<
const
DummyType
*>
(
d
.
data
);
const
void
*
p
=
d
.
data
;
qCheckAccess
(
p
);
p
=
deref
(
p
);
int
nn
=
set
.
size
();
qCheck
(
nn
>=
0
);
DummyType
::
const_iterator
it
=
set
.
begin
();
for
(
int
i
=
0
;
i
<
nn
&&
i
<
10
&&
it
!=
set
.
end
();
++
i
,
++
it
)
qCheckAccess
(
it
.
operator
->
());
P
(
d
,
"numchild"
,
nn
);
P
(
d
,
"value"
,
"<"
<<
nn
<<
" items>"
);
P
(
d
,
"valuedisabled"
,
"true"
);
P
(
d
,
"valueoffset"
,
d
.
extraInt
[
0
]);
if
(
d
.
dumpChildren
)
{
int
valueOffset
=
0
;
// d.extraInt[0];
QByteArray
strippedInnerType
=
stripPointerType
(
d
.
innertype
);
const
char
*
stripped
=
isPointerType
(
d
.
innertype
)
?
strippedInnerType
.
data
()
:
0
;
P
(
d
,
"extra"
,
" valueOffset: "
<<
valueOffset
);
d
<<
",children=["
;
it
=
set
.
begin
();
for
(
int
i
=
0
;
i
<
1000
&&
it
!=
set
.
end
();
++
i
,
++
it
)
{
const
void
*
node
=
it
.
operator
->
();
d
.
beginHash
();
P
(
d
,
"name"
,
i
);
qDumpInnerValueOrPointer
(
d
,
d
.
innertype
,
stripped
,
node
);
d
.
endHash
();
}
if
(
it
!=
set
.
end
())
d
.
putEllipsis
();
d
<<
"]"
;
}
d
.
disarm
();
}
static
void
qDumpStdString
(
QDumper
&
d
)
{
const
std
::
string
&
str
=
*
reinterpret_cast
<
const
std
::
string
*>
(
d
.
data
);
...
...
@@ -2452,6 +2498,8 @@ static void handleProtocolVersion2and3(QDumper & d)
qDumpStdList
(
d
);
else
if
(
isEqual
(
type
,
"std::map"
))
qDumpStdMap
(
d
);
else
if
(
isEqual
(
type
,
"std::set"
))
qDumpStdSet
(
d
);
else
if
(
isEqual
(
type
,
"std::string"
)
||
isEqual
(
type
,
"string"
))
qDumpStdString
(
d
);
else
if
(
isEqual
(
type
,
"std::wstring"
))
...
...
@@ -2527,6 +2575,7 @@ void qDumpObjectData440(
"
\"
std::basic_string
\"
,"
"
\"
std::list
\"
,"
"
\"
std::map
\"
,"
"
\"
std::set
\"
,"
"
\"
std::string
\"
,"
"
\"
std::vector
\"
,"
"
\"
std::wstring
\"
,"
...
...
src/libs/utils/consoleprocess_unix.cpp
View file @
f6e304f0
...
...
@@ -73,7 +73,12 @@ bool ConsoleProcess::start(const QString &program, const QStringList &args)
}
QStringList
xtermArgs
;
xtermArgs
<<
"-e"
<<
(
QCoreApplication
::
applicationDirPath
()
+
"/qtcreator_process_stub"
)
xtermArgs
<<
"-e"
#ifdef Q_OS_MAC
<<
(
QCoreApplication
::
applicationDirPath
()
+
"/../Resources/qtcreator_process_stub"
)
#else
<<
(
QCoreApplication
::
applicationDirPath
()
+
"/qtcreator_process_stub"
)
#endif
<<
(
m_debug
?
"debug"
:
"exec"
)
<<
m_stubServer
.
fullServerName
()
<<
tr
(
"Press <RETURN> to close this window..."
)
...
...
src/libs/utils/process_stub.pro
View file @
f6e304f0
IDE_BUILD_TREE
=../../../
include
(..
/../
qworkbench
.
pri
)
TEMPLATE
=
app
TARGET
=
qtcreator_process_stub
DESTDIR
=
..
/../../
bin
macx
{
DESTDIR
=
$$
IDE_BUILD_TREE
/
bin
/
$$
{
IDE_APP_TARGET
}.
app
/
Contents
/
Resources
}
else
{
DESTDIR
=
..
/../../
bin
}
CONFIG
+=
warn_on
console
use_c_linker
CONFIG
-=
qt
app_bundle
...
...
src/libs/utils/process_stub_win.c
View file @
f6e304f0
...
...
@@ -174,7 +174,7 @@ int main()
the Windows kernel runs amok when we attempt this.
So instead we start a debugged process, eat all the initial
debug events, suspend the process and detach from it. If gdb
tries to attach *now*, everthing goes smoothly. Yay. */
tries to attach *now*, ever
y
thing goes smoothly. Yay. */
if
(
creationFlags
&
DEBUG_ONLY_THIS_PROCESS
)
{
do
{
if
(
!
WaitForDebugEvent
(
&
dbev
,
INFINITE
))
...
...
src/plugins/cpptools/cppmodelmanager.cpp
View file @
f6e304f0
...
...
@@ -712,6 +712,17 @@ QFuture<void> CppModelManager::refreshSourceFiles(const QStringList &sourceFiles
QFuture
<
void
>
result
=
QtConcurrent
::
run
(
&
CppModelManager
::
parse
,
preproc
,
sourceFiles
);
if
(
m_synchronizer
.
futures
().
size
()
>
10
)
{
QList
<
QFuture
<
void
>
>
futures
=
m_synchronizer
.
futures
();
m_synchronizer
.
clearFutures
();
foreach
(
QFuture
<
void
>
future
,
futures
)
{
if
(
!
(
future
.
isFinished
()
||
future
.
isCanceled
()))
m_synchronizer
.
addFuture
(
future
);
}
}
m_synchronizer
.
addFuture
(
result
);
if
(
sourceFiles
.
count
()
>
1
)
{
...
...
src/plugins/debugger/dumper.pro
0 → 100644
View file @
f6e304f0
TEMPLATE
=
lib
TARGET
=
Dumper
CONFIG
+=
shared
DESTDIR
=
..
/../../
bin
include
(..
/../
qworkbenchlibrary
.
pri
)
SOURCES
+=
..
/../../
share
/
qtcreator
/
gdbmacros
/
gdbmacros
.
cpp
src/plugins/debugger/gdbengine.cpp
View file @
f6e304f0
...
...
@@ -2991,6 +2991,12 @@ static void setWatchDataAddress(WatchData &data, const GdbMi &mi)
}
}
static
void
setWatchDataSAddress
(
WatchData
&
data
,
const
GdbMi
&
mi
)
{
if
(
mi
.
isValid
())
data
.
saddr
=
mi
.
data
();
}
static
bool
extractTemplate
(
const
QString
&
type
,
QString
*
tmplate
,
QString
*
inner
)
{
// Input "Template<Inner1,Inner2,...>::Foo" will return "Template::Foo" in
...
...
@@ -3195,6 +3201,11 @@ void GdbEngine::runCustomDumper(const WatchData &data0, bool dumpChildren)
}
else
if
(
outertype
==
"std::stack"
)
{
// remove 'std::allocator<...>':
extraArgs
[
1
]
=
"0"
;
}
else
if
(
outertype
==
"std::set"
)
{
// remove 'std::less<...>':
extraArgs
[
1
]
=
"0"
;
// remove 'std::allocator<...>':
extraArgs
[
2
]
=
"0"
;
}
else
if
(
outertype
==
"std::map"
)
{
// We don't want the comparator and the allocator confuse gdb.
// But we need the offset of the second item in the value pair.
...
...
@@ -3724,6 +3735,7 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
setWatchDataValue
(
data
,
contents
.
findChild
(
"value"
),
contents
.
findChild
(
"valueencoded"
).
data
().
toInt
());
setWatchDataAddress
(
data
,
contents
.
findChild
(
"addr"
));
setWatchDataSAddress
(
data
,
contents
.
findChild
(
"saddr"
));
setWatchDataChildCount
(
data
,
contents
.
findChild
(
"numchild"
));
setWatchDataValueToolTip
(
data
,
contents
.
findChild
(
"valuetooltip"
));
setWatchDataValueDisabled
(
data
,
contents
.
findChild
(
"valuedisabled"
));
...
...
@@ -3772,6 +3784,7 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
setWatchDataValue
(
data1
,
item
.
findChild
(
"value"
),
item
.
findChild
(
"valueencoded"
).
data
().
toInt
());
setWatchDataAddress
(
data1
,
item
.
findChild
(
"addr"
));
setWatchDataSAddress
(
data1
,
item
.
findChild
(
"saddr"
));
setWatchDataValueToolTip
(
data1
,
item
.
findChild
(
"valuetooltip"
));
setWatchDataValueDisabled
(
data1
,
item
.
findChild
(
"valuedisabled"
));
if
(
!
qq
->
watchHandler
()
->
isExpandedIName
(
data1
.
iname
))
...
...
@@ -4030,6 +4043,7 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item,
setWatchDataType
(
data
,
item
.
findChild
(
"type"
));
setWatchDataValue
(
data
,
item
.
findChild
(
"value"
));
setWatchDataAddress
(
data
,
item
.
findChild
(
"addr"
));
setWatchDataSAddress
(
data
,
item
.
findChild
(
"saddr"
));
data
.
setChildCount
(
0
);
insertData
(
data
);
}
else
if
(
parent
.
iname
.
endsWith
(
'.'
))
{
...
...
@@ -4051,6 +4065,7 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item,
setWatchDataType
(
data
,
item
.
findChild
(
"type"
));
setWatchDataValue
(
data
,
item
.
findChild
(
"value"
));
setWatchDataAddress
(
data
,
item
.
findChild
(
"addr"
));
setWatchDataSAddress
(
data
,
item
.
findChild
(
"saddr"
));
setWatchDataChildCount
(
data
,
item
.
findChild
(
"numchild"
));
if
(
!
qq
->
watchHandler
()
->
isExpandedIName
(
data
.
iname
))
data
.
setChildrenUnneeded
();
...
...
src/plugins/debugger/watchhandler.cpp
View file @
f6e304f0
...
...
@@ -424,6 +424,16 @@ static QString niceType(QString type)
type
.
replace
(
re3
.
cap
(
0
),
"std::map<"
+
re3
.
cap
(
1
)
+
", "
+
re3
.
cap
(
2
)
+
">"
);
}
// std::set
static
QRegExp
re4
(
"std::set<(.*), std::less<(.*)>, std::allocator<(.*)>
\\
s*>"
);
re1
.
setMinimal
(
true
);
for
(
int
i
=
0
;
i
!=
10
;
++
i
)
{
if
(
re4
.
indexIn
(
type
)
==
-
1
||
re4
.
cap
(
1
)
!=
re4
.
cap
(
2
)
||
re4
.
cap
(
1
)
!=
re4
.
cap
(
3
))
break
;
type
.
replace
(
re4
.
cap
(
0
),
"std::set<"
+
re4
.
cap
(
1
)
+
">"
);
}
type
.
replace
(
" >"
,
">"
);
}
return
type
;
...
...
@@ -466,8 +476,10 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const
//else
tt
+=
"<tr><td>value</td><td> : </td><td>"
;
tt
+=
htmlQuote
(
data
.
value
)
+
"</td></tr>"
;
tt
+=
"<tr><td>addr</td><td> : </td><td>"
;
tt
+=
"<tr><td>
object
addr</td><td> : </td><td>"
;
tt
+=
htmlQuote
(
data
.
addr
)
+
"</td></tr>"
;
tt
+=
"<tr><td>stored addr</td><td> : </td><td>"
;
tt
+=
htmlQuote
(
data
.
saddr
)
+
"</td></tr>"
;
tt
+=
"<tr><td>iname</td><td> : </td><td>"
;
tt
+=
htmlQuote
(
data
.
iname
)
+
"</td></tr>"
;
tt
+=
"</table>"
;
...
...
src/plugins/debugger/watchhandler.h
View file @
f6e304f0
...
...
@@ -113,6 +113,7 @@ public:
QString
type
;
// displayed type
QString
variable
;
// name of internal Gdb variable if created
QString
addr
;
// displayed adress
QString
saddr
;
// stored address (pointer in container)
QString
framekey
;
// key for type cache
QScriptValue
scriptValue
;
// if needed...
int
childCount
;
...
...
src/plugins/designer/formeditorw.cpp
View file @
f6e304f0
...
...
@@ -83,6 +83,20 @@
static
const
char
*
editorWidgetStateKeyC
=
"editorWidgetState"
;
static
const
char
*
settingsGroup
=
"Designer"
;
#ifdef Q_OS_MAC
enum
{
osMac
=
1
};
#else
enum
{
osMac
=
0
};
#endif
/* Actions of the designer plugin:
* Designer provides a toolbar which is subject to a context change (to
* "edit mode" context) when it is focussed.
* In order to prevent its actions from being disabled/hidden by that context
* change, the actions are registered on the global context. In currentEditorChanged(),
* the ones that are present in the global edit menu are set visible/invisible manually.
* The designer context is currently used for Cut/Copy/Paste, etc. */
static
inline
QIcon
designerIcon
(
const
QString
&
iconName
)
{
const
QIcon
icon
=
qdesigner_internal
::
createIconSet
(
iconName
);
...
...
@@ -109,7 +123,6 @@ static inline QAction *createEditModeAction(QActionGroup *ag,
Core
::
Command
*
command
=
am
->
registerAction
(
rc
,
name
,
context
);
if
(
!
keySequence
.
isEmpty
())
command
->
setDefaultKeySequence
(
QKeySequence
(
keySequence
));
command
->
setAttribute
(
Core
::
Command
::
CA_Hide
);
medit
->
addAction
(
command
,
Core
::
Constants
::
G_EDIT_OTHER
);
rc
->
setData
(
toolNumber
);
ag
->
addAction
(
rc
);
...
...
@@ -160,7 +173,10 @@ FormEditorW::FormEditorW() :
m_core
(
Core
::
ICore
::
instance
()),
m_initStage
(
RegisterPlugins
),
m_actionGroupEditMode
(
0
),
m_actionPrint
(
0
)
m_actionPrint
(
0
),
m_actionPreview
(
0
),
m_actionGroupPreviewInStyle
(
0
),
m_actionAboutPlugins
(
0
)
{
if
(
Designer
::
Constants
::
Internal
::
debug
)
qDebug
()
<<
Q_FUNC_INFO
;
...
...
@@ -237,10 +253,14 @@ void FormEditorW::fullInit()
}
}
if
(
m_actionAboutPlugins
)
m_actionAboutPlugins
->
setEnabled
(
true
);
if
(
Designer
::
Constants
::
Internal
::
debug
)
{
qDebug
()
<<
Q_FUNC_INFO
<<
initTime
->
elapsed
()
<<
"ms"
;
delete
initTime
;
}
m_initStage
=
FullyInitialized
;
}
...
...
@@ -331,101 +351,88 @@ void FormEditorW::setupActions()
command
->
setAttribute
(
Core
::
Command
::
CA_Hide
);
medit
->
addAction
(
command
,
Core
::
Constants
::
G_EDIT_COPYPASTE
);
//editor Modes. Store ids for editor tool bars
QList
<
int
>
globalcontext
;
globalcontext
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Core
::
Constants
::
C_GLOBAL
);
m_actionGroupEditMode
=
new
QActionGroup
(
this
);
m_actionGroupEditMode
->
setExclusive
(
true
);
connect
(
m_actionGroupEditMode
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
activateEditMode
(
QAction
*
)));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.WidgetEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
m_
context
,
am
,
medit
,
createEditModeAction
(
m_actionGroupEditMode
,
global
context
,
am
,
medit
,
QLatin1String
(
"Edit widgets"
),
m_toolActionIds
.
back
(),
EditModeWidgetEditor
,
QLatin1String
(
"widgettool.png"
),
tr
(
"F3"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.SignalsSlotsEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
m_
context
,
am
,
medit
,
createEditModeAction
(
m_actionGroupEditMode
,
global
context
,
am
,
medit
,
QLatin1String
(
"Edit signals/slots"
),
m_toolActionIds
.
back
(),
EditModeSignalsSlotEditor
,
QLatin1String
(
"signalslottool.png"
),
tr
(
"F4"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.BuddyEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
m_
context
,
am
,
medit
,
createEditModeAction
(
m_actionGroupEditMode
,
global
context
,
am
,
medit
,
QLatin1String
(
"Edit buddies"
),
m_toolActionIds
.
back
(),
EditModeBuddyEditor
,
QLatin1String
(
"buddytool.png"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.TabOrderEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
m_
context
,
am
,
medit
,
createEditModeAction
(
m_actionGroupEditMode
,
global
context
,
am
,
medit
,
QLatin1String
(
"Edit tab order"
),
m_toolActionIds
.
back
(),
EditModeTabOrderEditor
,
QLatin1String
(
"tabordertool.png"
));
//tool actions
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutHorizontally"
));
#ifndef Q_OS_MAC
addToolAction
(
m_fwm
->
actionHorizontalLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Ctrl+H"
));
#else
addToolAction
(
m_fwm
->
actionHorizontalLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Meta+H"
));
#endif
const
QString
horizLayoutShortcut
=
osMac
?
tr
(
"Meta+H"
)
:
tr
(
"Ctrl+H"
);
addToolAction
(
m_fwm
->
actionHorizontalLayout
(),
am
,
globalcontext
,
m_toolActionIds
.
back
(),
mformtools
,
horizLayoutShortcut
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutVertically"
));
#ifndef Q_OS_MAC
addToolAction
(
m_fwm
->
actionVerticalLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Ctrl+L"
));
#else
addToolAction
(
m_fwm
->
actionVerticalLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Meta+L"
));
#endif
const
QString
vertLayoutShortcut
=
osMac
?
tr
(
"Meta+L"
)
:
tr
(
"Ctrl+L"
);
addToolAction
(
m_fwm
->
actionVerticalLayout
(),
am
,
globalcontext
,
m_toolActionIds
.
back
(),
mformtools
,
vertLayoutShortcut
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.SplitHorizontal"
));
addToolAction
(
m_fwm
->
actionSplitHorizontal
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionSplitHorizontal
(),
am
,
global
context
,
m_toolActionIds
.
back
(),
mformtools
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.SplitVertical"
));
addToolAction
(
m_fwm
->
actionSplitVertical
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionSplitVertical
(),
am
,
global
context
,
m_toolActionIds
.
back
(),
mformtools
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutForm"
));
addToolAction
(
m_fwm
->
actionFormLayout
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionFormLayout
(),
am
,
global
context
,
m_toolActionIds
.
back
(),
mformtools
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutGrid"
));
#ifndef Q_OS_MAC
addToolAction
(
m_fwm
->
actionGridLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Ctrl+G"
));
#else
addToolAction
(
m_fwm
->
actionGridLayout
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Meta+G"
));
#endif
const
QString
gridShortcut
=
osMac
?
tr
(
"Meta+G"
)
:
tr
(
"Ctrl+G"
);
addToolAction
(
m_fwm
->
actionGridLayout
(),
am
,
globalcontext
,
m_toolActionIds
.
back
(),
mformtools
,
gridShortcut
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutBreak"
));
addToolAction
(
m_fwm
->
actionBreakLayout
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionBreakLayout
(),
am
,
global
context
,
m_toolActionIds
.
back
(),
mformtools
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.LayoutAdjustSize"
));
#ifndef Q_OS_MAC
addToolAction
(
m_fwm
->
actionAdjustSize
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Ctrl+J"
));
#else
addToolAction
(
m_fwm
->
actionAdjustSize
(),
am
,
m_context
,
m_toolActionIds
.
back
(),
mformtools
,
tr
(
"Meta+J"
));
#endif
const
QString
adjustShortcut
=
osMac
?
tr
(
"Meta+J"
)
:
tr
(
"Ctrl+J"
);
addToolAction
(
m_fwm
->
actionAdjustSize
(),
am
,
globalcontext
,
m_toolActionIds
.
back
(),
mformtools
,
adjustShortcut
);
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.SimplifyLayout"
));
addToolAction
(
m_fwm
->
actionSimplifyLayout
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionSimplifyLayout
(),
am
,
global
context
,
m_toolActionIds
.
back
(),
mformtools
);
createSeparator
(
this
,
am
,
m_context
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator1"
));
addToolAction
(
m_fwm
->
actionLower
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionLower
(),
am
,
global
context
,
QLatin1String
(
"FormEditor.Lower"
),
mformtools
);
addToolAction
(
m_fwm
->
actionRaise
(),
am
,
m_
context
,
addToolAction
(
m_fwm
->
actionRaise
(),
am
,
global
context
,
QLatin1String
(
"FormEditor.Raise"
),
mformtools
);
// Commands that do not go into the editor toolbar
createSeparator
(
this
,
am
,
m_
context
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator2"
));
createSeparator
(
this
,
am
,
global
context
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator2"
));
m_actionPreview
=
m_fwm
->
actionDefaultPreview
();
QTC_ASSERT
(
m_actionPreview
,
return
);
addToolAction
(
m_actionPreview
,
am
,
m_
context
,
addToolAction
(
m_actionPreview
,
am
,
global
context
,
QLatin1String
(
"FormEditor.Preview"
),
mformtools
,
tr
(
"Ctrl+Alt+R"
));
// Preview in style...
...
...
@@ -435,11 +442,19 @@ void FormEditorW::setupActions()
// Form settings
createSeparator
(
this
,
am
,
m_context
,
medit
,
QLatin1String
(
"FormEditor.Edit.Separator2"
),
Core
::
Constants
::
G_EDIT_OTHER
);
#if QT_VERSION >= 0x040500
createSeparator
(
this
,
am
,
m_context
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator3"
));
createSeparator
(
this
,
am
,
globalcontext
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator3"
));
QAction
*
actionFormSettings
=
m_fwm
->
actionShowFormWindowSettingsDialog
();
addToolAction
(
actionFormSettings
,
am
,
m_context
,
QLatin1String
(
"FormEditor.FormSettings"
),
mformtools
);
addToolAction
(
actionFormSettings
,
am
,
globalcontext
,
QLatin1String
(
"FormEditor.FormSettings"
),
mformtools
);
#if QT_VERSION > 0x040500
createSeparator
(
this
,
am
,
globalcontext
,
mformtools
,
QLatin1String
(
"FormEditor.Menu.Tools.Separator4"
));
m_actionAboutPlugins
=
new
QAction
(
tr
(
"About Qt Designer plugins...."
),
this
);
addToolAction
(
m_actionAboutPlugins
,
am
,
globalcontext
,
QLatin1String
(
"FormEditor.AboutPlugins"
),
mformtools
);
connect
(
m_actionAboutPlugins
,
SIGNAL
(
triggered
()),
m_fwm
,
SLOT
(
aboutPlugins
()));
m_actionAboutPlugins
->
setEnabled
(
false
);
#endif
// FWM
connect
(
m_fwm
,
SIGNAL
(
activeFormWindowChanged
(
QDesignerFormWindowInterface
*
)),
this
,
SLOT
(
activeFormWindowChanged
(
QDesignerFormWindowInterface
*
)));
}
...
...
@@ -566,7 +581,9 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
QTC_ASSERT
(
fw
,
return
);
fw
->
activate
();
m_fwm
->
setActiveFormWindow
(
fw
->
formWindow
());
m_actionGroupEditMode
->
setVisible
(
true
);
}
else
{
m_actionGroupEditMode
->
setVisible
(
false
);
m_fwm
->
setActiveFormWindow
(
0
);
}
}
...
...
src/plugins/designer/formeditorw.h
View file @
f6e304f0
...
...
@@ -157,6 +157,7 @@ private:
QAction
*
m_actionPrint
;
QAction
*
m_actionPreview
;
QActionGroup
*
m_actionGroupPreviewInStyle
;
QAction
*
m_actionAboutPlugins
;
QList
<
int
>
m_context
;
...
...
src/plugins/fakevim/fakevimhandler.cpp
View file @
f6e304f0
...
...
@@ -1106,12 +1106,14 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
finishMovement
();
}
else
if
(
key
==
'i'
)
{
recordBeginGroup
();
m_dotCommand
=
"i"
;
//QString("%1i").arg(count());
enterInsertMode
();
updateMiniBuffer
();
if
(
atEndOfLine
())
moveLeft
();
}
else
if
(
key
==
'I'
)
{
recordBeginGroup
();
m_dotCommand
=
"I"
;
//QString("%1I").arg(count());
enterInsertMode
();
if
(
m_gflag
)
moveToStartOfLine
();
...
...
@@ -1192,6 +1194,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
}
else
if
(
key
==
'o'
||
key
==
'O'
)
{
recordBeginGroup
();
recordPosition
();
m_dotCommand
=
QString
(
"%1o"
).
arg
(
count
());
enterInsertMode
();
moveToFirstNonBlankOnLine
();
int
numSpaces
=
leftDist
();
...
...
@@ -1255,7 +1258,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
setAnchor
();
moveRight
(
qMin
(
count
(),
rightDist
()));
m_registers
[
m_register
]
=
recordRemoveSelectedText
();
//
m_dotCommand = QString("%1s").arg(count());
m_dotCommand
=
"s"
;
//
QString("%1s").arg(count());
m_opcount
.
clear
();
m_mvcount
.
clear
();
enterInsertMode
();
...
...
src/plugins/plugins.pro
View file @
f6e304f0
...
...
@@ -28,7 +28,8 @@ SUBDIRS = plugin_coreplugin \
plugin_cmakeprojectmanager
\
plugin_fakevim
\
plugin_designer
\
plugin_resourceeditor
plugin_resourceeditor
\
debugger
/
dumper
.
pro
plugin_coreplugin
.
subdir
=
coreplugin
...
...
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
View file @
f6e304f0
...
...
@@ -299,7 +299,7 @@ void Qt4RunConfiguration::updateCachedValues()
}
#if defined (Q_OS_MAC)
if
(
!
reader
->
values
(
"
-
CONFIG"
).
contains
(
"app_bundle"
))
{
if
(
reader
->
values
(
"CONFIG"
).
contains
(
"app_bundle"
))
{
destDir
+=
QLatin1Char
(
'/'
)
+
"${QMAKE_TARGET}"
+
QLatin1String
(
".app/Contents/MacOS"
);
...
...
src/shared/proparser/profileevaluator.cpp
View file @
f6e304f0
...
...
@@ -781,18 +781,9 @@ bool ProFileEvaluator::Private::visitProValue(ProValue *value)
case
ProVariable
::
RemoveOperator
:
// -=
if
(
!
m_cumulative
)
{
if
(
!
m_skipLevel
)
{
// the insertUnique is a hack for the moment to fix the
// CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before)
if
(
removeEach
(
&
m_tempValuemap
,
varName
,
v
)
==
0
)
insertUnique
(
&
m_tempValuemap
,
QString
(
"-%1"
).
arg
(
varName
),
v
);
if
(
removeEach
(
&
m_tempFilevaluemap
[
currentProFile
()],
varName
,
v
)
==
0
)
insertUnique
(
&
m_tempFilevaluemap
[
currentProFile
()],
QString
(
"-%1"
).
arg
(
varName
),
v
);
removeEach
(
&
m_tempValuemap
,
varName
,
v
);
removeEach
(
&
m_tempFilevaluemap
[
currentProFile
()],
varName
,
v
);
}
}
else
if
(
!
m_skipLevel
)
{
// the insertUnique is a hack for the moment to fix the
// CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before)
insertUnique
(
&
m_tempValuemap
,
QString
(
"-%1"
).
arg
(
varName
),
v
);
insertUnique
(
&
m_tempFilevaluemap
[
currentProFile
()],
QString
(
"-%1"
).
arg
(
varName
),
v
);
}
else
{
// We are stingy with our values, too.
}
...
...
src/shared/proparser/proparserutils.h
View file @
f6e304f0
...
...
@@ -136,14 +136,12 @@ static void insertUnique(QHash<QString, QStringList> *map,
sl
.
append
(
str
);
}
static
int
removeEach
(
QHash
<
QString
,
QStringList
>
*
map
,
static
void
removeEach
(
QHash
<
QString
,
QStringList
>
*
map
,
const
QString
&
key
,
const
QStringList
&
value
)
{
int
count
=
0
;
QStringList
&
sl
=
(
*
map
)[
key
];
foreach
(
const
QString
&
str
,
value
)
count
+=
sl
.
removeAll
(
str
);
return
count
;
sl
.
removeAll
(
str
);
}
/*
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
f6e304f0
...
...
@@ -54,6 +54,7 @@
#include <iostream>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <string>
#include <vector>
...
...
@@ -284,6 +285,11 @@ void testQList()
li
.
append
(
102
);
li
.
append
(
102
);
QList
<
int
*>
lpi
;
lpi
.
append
(
new
int
(
1
));
lpi
.
append
(
new
int
(
2
));
lpi
.
append
(
new
int
(
3
));
for
(
int
i
=
0
;
i
!=
3
;
++
i
)
{
lu
.
append
(
i
);
...
...
@@ -581,6 +587,22 @@ void testStdMap()