Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
661f0500
Commit
661f0500
authored
Mar 23, 2009
by
mae
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
83c331a7
50991f2f
Changes
15
Hide whitespace changes
Inline
Side-by-side
bin/qtcreator
View file @
661f0500
#!/bin/sh
bindir
=
$(
dirname
"
$0
"
)
libdir
=
$(
cd
${
bindir
}
/../lib
;
pwd
)
if
test
"
$(
uname
-m
)
"
=
"x86_64"
;
then
libdir
=
$(
cd
${
bindir
}
/../lib64
;
pwd
)
else
libdir
=
$(
cd
${
bindir
}
/../lib
;
pwd
)
fi
LD_LIBRARY_PATH
=
"
${
libdir
}
:
${
LD_LIBRARY_PATH
}
"
"
${
bindir
}
/qtcreator.bin"
${
1
+
"
$@
"
}
src/app/main.cpp
View file @
661f0500
...
...
@@ -179,7 +179,11 @@ static inline QStringList getPluginPaths()
// 1) "plugins" (Win/Linux)
QString
pluginPath
=
rootDirPath
;
pluginPath
+=
QDir
::
separator
();
#ifdef QT_ARCH_X86_64
pluginPath
+=
QLatin1String
(
"lib64"
);
#else
pluginPath
+=
QLatin1String
(
"lib"
);
#endif
pluginPath
+=
QDir
::
separator
();
pluginPath
+=
QLatin1String
(
"qtcreator"
);
pluginPath
+=
QDir
::
separator
();
...
...
src/plugins/debugger/debuggeractions.cpp
View file @
661f0500
...
...
@@ -32,6 +32,7 @@
#include <utils/qtcassert.h>
#include <utils/pathchooser.h>
#include <QtCore/QDebug>
#include <QtCore/QSettings>
#include <QtGui/QAction>
#include <QtGui/QAbstractButton>
...
...
@@ -39,9 +40,11 @@
#include <QtGui/QCheckBox>
#include <QtGui/QLineEdit>
namespace
Debugger
{
namespace
Internal
{
//////////////////////////////////////////////////////////////////////////
//
// DebuggerAction
...
...
@@ -119,6 +122,14 @@ void DebuggerAction::setTextPattern(const QString &value)
m_textPattern
=
value
;
}
QString
DebuggerAction
::
toString
()
const
{
return
"value: "
+
m_value
.
toString
()
+
" defaultvalue: "
+
m_defaultValue
.
toString
()
+
" settingskey: "
+
m_settingsGroup
+
'/'
+
m_settingsKey
+
" deferedValue: "
+
m_deferedValue
.
toString
();
}
QAction
*
DebuggerAction
::
updatedAction
(
const
QString
&
text0
)
{
QString
text
=
text0
;
...
...
@@ -155,7 +166,7 @@ void DebuggerAction::writeSettings(QSettings *settings)
return
;
settings
->
beginGroup
(
m_settingsGroup
);
settings
->
setValue
(
m_settingsKey
,
m_value
);
//qDebug() << "WRITING: " << m_settingsKey << " -> " <<
m_value
;
//qDebug() << "WRITING: " << m_settingsKey << " -> " <<
toString()
;
settings
->
endGroup
();
}
...
...
@@ -424,6 +435,7 @@ DebuggerSettings *theDebuggerSettings()
item
=
new
DebuggerAction
(
instance
);
instance
->
insertItem
(
BuildDumpersOnTheFly
,
item
);
item
->
setDefaultValue
(
true
);
item
->
setSettingsKey
(
"DebugMode"
,
"BuildDumpersOnTheFly"
);
item
->
setCheckable
(
true
);
...
...
src/plugins/debugger/debuggeractions.h
View file @
661f0500
...
...
@@ -80,6 +80,8 @@ public:
virtual
QString
textPattern
()
const
;
Q_SLOT
virtual
void
setTextPattern
(
const
QString
&
value
);
QString
toString
()
const
;
signals:
void
valueChanged
(
const
QVariant
&
newValue
);
void
boolValueChanged
(
bool
newValue
);
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
661f0500
...
...
@@ -375,9 +375,16 @@ QWidget *DumperOptionPage::createPage(QWidget *parent)
m_ui
.
dumperLocationChooser
->
setExpectedKind
(
Core
::
Utils
::
PathChooser
::
Command
);
m_ui
.
dumperLocationChooser
->
setPromptDialogTitle
(
tr
(
"Choose Dumper Location"
));
m_ui
.
dumperLocationChooser
->
setInitialBrowsePathBackup
(
Core
::
ICore
::
instance
()
->
resourcePath
()
+
"../../lib"
);
connect
(
m_ui
.
radioButtonUsePrebuiltDumpers
,
SIGNAL
(
toggled
(
bool
)),
m_ui
.
dumperLocationChooser
,
SLOT
(
setEnabled
(
bool
)));
theDebuggerAction
(
UsePrebuiltDumpers
)
->
connectWidget
(
m_ui
.
radioButtonUsePrebuiltDumpers
);
theDebuggerAction
(
BuildDumpersOnTheFly
)
->
connectWidget
(
m_ui
.
radioButtonBuildDumpersOnTheFly
);
theDebuggerAction
(
PrebuiltDumpersLocation
)
->
connectWidget
(
m_ui
.
dumperLocationChooser
);
...
...
@@ -388,8 +395,6 @@ QWidget *DumperOptionPage::createPage(QWidget *parent)
m_ui
.
dumperLocationChooser
->
setEnabled
(
theDebuggerAction
(
UsePrebuiltDumpers
)
->
value
().
toBool
());
connect
(
m_ui
.
radioButtonUsePrebuiltDumpers
,
SIGNAL
(
toggled
(
bool
)),
m_ui
.
dumperLocationChooser
,
SLOT
(
setEnabled
(
bool
)));
#ifndef QT_DEBUG
#if 0
...
...
@@ -410,6 +415,7 @@ void DumperOptionPage::apply()
theDebuggerAction
(
UseDumpers
)
->
apply
(
s
);
theDebuggerAction
(
UsePrebuiltDumpers
)
->
apply
(
s
);
theDebuggerAction
(
BuildDumpersOnTheFly
)
->
apply
(
s
);
theDebuggerAction
(
PrebuiltDumpersLocation
)
->
apply
(
s
);
theDebuggerAction
(
DebugDumpers
)
->
apply
(
s
);
}
...
...
@@ -1019,7 +1025,7 @@ void DebuggerPlugin::focusCurrentEditor(IMode *mode)
void
DebuggerPlugin
::
showSettingsDialog
()
{
Core
::
ICore
::
instance
()
->
showOptionsDialog
(
"Debugger"
,
"G
db
"
);
Core
::
ICore
::
instance
()
->
showOptionsDialog
(
"Debugger"
,
"G
eneral
"
);
}
#include "debuggerplugin.moc"
...
...
src/plugins/debugger/dumperoptionpage.ui
View file @
661f0500
...
...
@@ -21,7 +21,7 @@
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"radioButtonDumpersOnTheFly"
>
<widget
class=
"QRadioButton"
name=
"radioButton
Build
DumpersOnTheFly"
>
<property
name=
"toolTip"
>
<string>
This is the slowest but safest option.
</string>
</property>
...
...
src/plugins/debugger/gdbengine.cpp
View file @
661f0500
...
...
@@ -4230,6 +4230,19 @@ void GdbEngine::assignValueInDebugger(const QString &expression, const QString &
sendCommand
(
"-var-assign assign "
+
value
,
WatchVarAssign
);
}
QString
GdbEngine
::
dumperLibraryName
()
const
{
if
(
theDebuggerAction
(
UsePrebuiltDumpers
))
return
theDebuggerAction
(
PrebuiltDumpersLocation
)
->
value
().
toString
();
#if defined(Q_OS_WIN)
return
q
->
m_buildDir
+
"/qtc-gdbmacros/debug/gdbmacros.dll"
;
#elif defined(Q_OS_MAC)
return
q
->
m_buildDir
+
"/qtc-gdbmacros/libgdbmacros.dylib"
;
#else // generic UNIX
return
q
->
m_buildDir
+
"/qtc-gdbmacros/libgdbmacros.so"
;
#endif
}
void
GdbEngine
::
tryLoadCustomDumpers
()
{
if
(
m_dataDumperState
!=
DataDumperUninitialized
)
...
...
@@ -4237,26 +4250,18 @@ void GdbEngine::tryLoadCustomDumpers()
PENDING_DEBUG
(
"TRY LOAD CUSTOM DUMPERS"
);
m_dataDumperState
=
DataDumperUnavailable
;
QString
lib
=
dumperLibraryName
();
#if defined(Q_OS_LINUX)
QString
lib
=
q
->
m_buildDir
+
"/qtc-gdbmacros/libgdbmacros.so"
;
if
(
QFileInfo
(
lib
).
exists
())
{
#if defined(Q_OS_WIN)
m_dataDumperState
=
DataDumperLoadTried
;
//sendCommand("p dlopen");
QString
flag
=
QString
::
number
(
RTLD_NOW
);
sendCommand
(
"sharedlibrary libc"
);
// for malloc
sendCommand
(
"sharedlibrary libdl"
);
// for dlopen
sendCommand
(
"call (void)dlopen(
\"
"
+
lib
+
"
\"
, "
+
flag
+
")"
,
WatchDumpCustomSetup
);
// some older systems like CentOS 4.6 prefer this:
sendCommand
(
"call (void)__dlopen(
\"
"
+
lib
+
"
\"
, "
+
flag
+
")"
,
sendCommand
(
"sharedlibrary .*"
);
// for LoadLibraryA
//sendCommand("handle SIGSEGV pass stop print");
//sendCommand("set unwindonsignal off");
sendCommand
(
"call LoadLibraryA(
\"
"
+
lib
+
"
\"
)"
,
WatchDumpCustomSetup
);
sendCommand
(
"sharedlibrary "
+
dotEscape
(
lib
));
}
#endif
#if defined(Q_OS_MAC)
QString
lib
=
q
->
m_buildDir
+
"/qtc-gdbmacros/libgdbmacros.dylib"
;
if
(
QFileInfo
(
lib
).
exists
())
{
#elif defined(Q_OS_MAC)
m_dataDumperState
=
DataDumperLoadTried
;
//sendCommand("sharedlibrary libc"); // for malloc
//sendCommand("sharedlibrary libdl"); // for dlopen
...
...
@@ -4264,20 +4269,20 @@ void GdbEngine::tryLoadCustomDumpers()
sendCommand
(
"call (void)dlopen(
\"
"
+
lib
+
"
\"
, "
+
flag
+
")"
,
WatchDumpCustomSetup
);
//sendCommand("sharedlibrary " + dotEscape(lib));
}
#endif
#if defined(Q_OS_WIN)
QString
lib
=
q
->
m_buildDir
+
"/qtc-gdbmacros/debug/gdbmacros.dll"
;
if
(
QFileInfo
(
lib
).
exists
())
{
m_dataDumperState
=
DataDumperLoadTried
;
sendCommand
(
"sharedlibrary .*"
);
// for LoadLibraryA
//sendCommand("handle SIGSEGV pass stop print");
//sendCommand("set unwindonsignal off");
sendCommand
(
"call LoadLibraryA(
\"
"
+
lib
+
"
\"
)"
,
#else
//sendCommand("p dlopen");
QString
flag
=
QString
::
number
(
RTLD_NOW
);
sendCommand
(
"sharedlibrary libc"
);
// for malloc
sendCommand
(
"sharedlibrary libdl"
);
// for dlopen
sendCommand
(
"call (void)dlopen(
\"
"
+
lib
+
"
\"
, "
+
flag
+
")"
,
WatchDumpCustomSetup
);
// some older systems like CentOS 4.6 prefer this:
sendCommand
(
"call (void)__dlopen(
\"
"
+
lib
+
"
\"
, "
+
flag
+
")"
,
WatchDumpCustomSetup
);
sendCommand
(
"sharedlibrary "
+
dotEscape
(
lib
));
}
#endif
}
if
(
m_dataDumperState
==
DataDumperLoadTried
)
{
// retreive list of dumpable classes
...
...
src/plugins/debugger/gdbengine.h
View file @
661f0500
...
...
@@ -199,6 +199,7 @@ private:
void
handleQuerySources
(
const
GdbResultRecord
&
response
);
void
handleTargetCore
(
const
GdbResultRecord
&
response
);
void
debugMessage
(
const
QString
&
msg
);
QString
dumperLibraryName
()
const
;
OutputCollector
m_outputCollector
;
QTextCodec
*
m_outputCodec
;
...
...
src/plugins/debugger/gdbmi.cpp
View file @
661f0500
...
...
@@ -37,7 +37,7 @@
namespace
Debugger
{
namespace
Internal
{
QTextStream
&
operator
<<
(
QTextStream
&
os
,
const
GdbMi
&
mi
)
QTextStream
&
operator
<<
(
QTextStream
&
os
,
const
GdbMi
&
mi
)
{
return
os
<<
mi
.
toString
();
}
...
...
src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp
View file @
661f0500
...
...
@@ -187,6 +187,7 @@ void Qt4BuildConfigWidget::updateImportLabel()
void
Qt4BuildConfigWidget
::
shadowBuildLineEditTextChanged
()
{
if
(
m_pro
->
value
(
m_buildConfiguration
,
"buildDirectory"
).
toString
()
==
m_ui
->
shadowBuildDirEdit
->
path
())
return
;
m_pro
->
setValue
(
m_buildConfiguration
,
"buildDirectory"
,
m_ui
->
shadowBuildDirEdit
->
path
());
// if the directory already exists
// check if we have a build in there and
...
...
src/qworkbench.pri
View file @
661f0500
...
...
@@ -6,6 +6,12 @@ isEmpty(TEST):CONFIG(debug, debug|release) {
}
}
linux-g++-64 {
IDE_LIBRARY_BASENAME = lib64
} else {
IDE_LIBRARY_BASENAME = lib
}
equals(TEST, 1) {
QT +=testlib
DEFINES += WITH_TESTS
...
...
@@ -21,7 +27,7 @@ macx {
contains(QT_CONFIG, ppc):CONFIG += ppc x86
} else {
IDE_APP_TARGET = qtcreator.bin
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/
lib
/qtcreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/
$$IDE_LIBRARY_BASENAME
/qtcreator
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins/
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
...
...
src/qworkbenchlibrary.pri
View file @
661f0500
...
...
@@ -14,6 +14,6 @@ TARGET = $$qtLibraryTarget($$TARGET)
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
linux-* {
target.path = /
lib
/qtcreator
target.path = /
$$IDE_LIBRARY_BASENAME
/qtcreator
INSTALLS += target
}
}
src/qworkbenchplugin.pri
View file @
661f0500
...
...
@@ -17,7 +17,7 @@ isEmpty(TARGET) {
error("qworkbenchplugin.pri: You must provide a TARGET")
}
# Copy the pluginspec file to the lib
e
rary direct
y
ory.
# Copy the pluginspec file to the library directory.
# Note: On Windows/MinGW with some sh.exe in the path,
# QMAKE_COPY is some cp command that does not understand
# "\". Force the standard windows copy.
...
...
@@ -54,8 +54,8 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
CONFIG += plugin plugin_with_soname
linux-* {
target.path = /
lib
/qtcreator/plugins/$$PROVIDER
target.path = /
$$IDE_LIBRARY_BASENAME
/qtcreator/plugins/$$PROVIDER
pluginspec.files += $${TARGET}.pluginspec
pluginspec.path = /
lib
/qtcreator/plugins/$$PROVIDER
pluginspec.path = /
$$IDE_LIBRARY_BASENAME
/qtcreator/plugins/$$PROVIDER
INSTALLS += target pluginspec
}
src/rpath.pri
View file @
661f0500
...
...
@@ -3,7 +3,7 @@ macx {
} else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
# this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
QMAKE_RPATHDIR += \$\$ORIGIN/../
lib
/qtcreator
QMAKE_RPATHDIR += \$\$ORIGIN/../
$$IDE_LIBRARY_BASENAME
/qtcreator
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
661f0500
...
...
@@ -702,7 +702,6 @@ void testStdVector()
void
testQString
()
{
int
i
=
0
;
QString
str
=
"Hello "
;
str
+=
" big, "
;
str
+=
" fat "
;
...
...
Write
Preview
Supports
Markdown
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