forked from qt-creator/qt-creator
Merge remote branch 'origin/1.3'
Trailing whitespace removal re-applied manually.
This commit is contained in:
@@ -369,7 +369,7 @@ void CMakeRunPage::initializePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_generatorComboBox->clear();
|
||||
// Find out whether we have multiple msvc versions
|
||||
QStringList msvcVersions = ProjectExplorer::ToolChain::availableMSVCVersions();
|
||||
@@ -419,7 +419,7 @@ void CMakeRunPage::runCMake()
|
||||
} else {
|
||||
m_cmakeWizard->setMsvcVersion("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else // Q_OS_WIN
|
||||
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
|
||||
|
||||
@@ -53,7 +53,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
|
||||
{
|
||||
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
||||
m_projectContext = uidm->uniqueIdentifier(CMakeProjectManager::Constants::PROJECTCONTEXT);
|
||||
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
|
||||
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
|
||||
}
|
||||
|
||||
int CMakeManager::projectContext() const
|
||||
@@ -117,7 +117,7 @@ void CMakeManager::createXmlFile(QProcess *proc, const QStringList &arguments, c
|
||||
proc->setProcessChannelMode(QProcess::MergedChannels);
|
||||
proc->setEnvironment(env.toStringList());
|
||||
|
||||
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
|
||||
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
|
||||
proc->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ SOURCES = cmakeproject.cpp \
|
||||
cmakebuildenvironmentwidget.cpp \
|
||||
cmakebuildconfiguration.cpp
|
||||
RESOURCES += cmakeproject.qrc
|
||||
FORMS +=
|
||||
FORMS +=
|
||||
|
||||
OTHER_FILES += CMakeProjectManager.pluginspec
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
struct ShortcutItem;
|
||||
|
||||
|
||||
class CommandsFile : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
const QString &contents = QString());
|
||||
|
||||
bool openExternalEditor(const QString &fileName, const QString &editorId);
|
||||
|
||||
|
||||
QStringList getOpenFileNames() const;
|
||||
QString getOpenWithEditorId(const QString &fileName, bool *isExternalEditor = 0) const;
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
|
||||
inline bool isView() const { return m_view != 0; }
|
||||
inline bool isRoot() const { return m_isRoot; }
|
||||
|
||||
|
||||
inline bool isSplitter() const { return m_splitter != 0; }
|
||||
inline Core::IEditor *editor() const { return m_view ? m_view->currentEditor() : 0; }
|
||||
inline QList<Core::IEditor *> editors() const { return m_view ? m_view->editors() : QList<Core::IEditor*>(); }
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef OPENEDITORSVIEW_H
|
||||
#define OPENEDITORSVIEW_H
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
|
||||
void mousePressEvent(QMouseEvent *ev)
|
||||
{
|
||||
if (ev->modifiers() & Qt::ShiftModifier)
|
||||
if (ev->modifiers() & Qt::ShiftModifier)
|
||||
Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent));
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
virtual QString id() const = 0;
|
||||
virtual QKeySequence activationSequence() const;
|
||||
// This design is not optimal, think about it again once we need to extend it
|
||||
// It could be implemented as returning an object which has both the widget
|
||||
// It could be implemented as returning an object which has both the widget
|
||||
// and the docktoolbar widgets
|
||||
// Similar to how IView
|
||||
virtual NavigationView createWidget() = 0;
|
||||
|
||||
@@ -165,7 +165,7 @@ static OutputPaneManager *m_instance = 0;
|
||||
|
||||
void OutputPaneManager::create()
|
||||
{
|
||||
m_instance = new OutputPaneManager;
|
||||
m_instance = new OutputPaneManager;
|
||||
}
|
||||
|
||||
void OutputPaneManager::destroy()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "progressmanager_p.h"
|
||||
|
||||
// for windows progress bar
|
||||
#ifndef __GNUC__
|
||||
#ifndef __GNUC__
|
||||
# include <shobjidl.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
/*
|
||||
/*
|
||||
* This is a set of helper classes to allow for widget animations in
|
||||
* the style. Its mostly taken from Vista style so it should be fully documented
|
||||
* there.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class Animation
|
||||
{
|
||||
public :
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
void startAnimation(Animation *);
|
||||
void stopAnimation(const QWidget *);
|
||||
Animation* widgetAnimation(const QWidget *) const;
|
||||
|
||||
|
||||
private:
|
||||
QBasicTimer animationTimer;
|
||||
QList <Animation*> animations;
|
||||
|
||||
@@ -82,8 +82,8 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
||||
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.<br/>")
|
||||
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
|
||||
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
|
||||
(QLatin1String(IDE_AUTHOR)), ideRev);
|
||||
|
||||
QLabel *copyRightLabel = new QLabel(description);
|
||||
|
||||
@@ -75,7 +75,7 @@ QString CodePasterSettingsPage::displayCategory() const
|
||||
}
|
||||
|
||||
QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
{
|
||||
QGroupBox *groupBox = new QGroupBox();
|
||||
QVBoxLayout *groupBoxLayout = new QVBoxLayout(groupBox);
|
||||
QFormLayout *formLayout = new QFormLayout;
|
||||
|
||||
@@ -78,7 +78,7 @@ ClassNamePage::ClassNamePage(QWidget *parent) :
|
||||
|
||||
connect(m_newClassWidget, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
|
||||
|
||||
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
||||
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
||||
pageLayout->addWidget(m_newClassWidget);
|
||||
QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding);
|
||||
pageLayout->addItem(vSpacer);
|
||||
|
||||
@@ -898,7 +898,7 @@ const Macro *CPPEditor::findCanonicalMacro(const QTextCursor &cursor,
|
||||
}
|
||||
|
||||
void CPPEditor::findUsages()
|
||||
{
|
||||
{
|
||||
if (Symbol *canonicalSymbol = markSymbols()) {
|
||||
m_modelManager->findUsages(canonicalSymbol);
|
||||
} else if (const Macro *macro = findCanonicalMacro(textCursor(), m_lastSemanticInfo.doc)) {
|
||||
@@ -1766,7 +1766,7 @@ void CPPEditor::keyPressEvent(QKeyEvent *e)
|
||||
// Eat backspace at start of name
|
||||
e->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Qt::Key_Delete: {
|
||||
@@ -1821,7 +1821,7 @@ QString CPPEditorEditable::id() const
|
||||
|
||||
bool CPPEditorEditable::open(const QString & fileName)
|
||||
{
|
||||
bool b = TextEditor::BaseTextEditorEditable::open(fileName);
|
||||
bool b = TextEditor::BaseTextEditorEditable::open(fileName);
|
||||
editor()->setMimeType(Core::ICore::instance()->mimeDatabase()->findByFile(QFileInfo(fileName)).type());
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
|
||||
| TextEditor::TextEditorActionHandler::UnCollapseAll);
|
||||
|
||||
m_actionHandler->initializeActions();
|
||||
|
||||
|
||||
contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR));
|
||||
|
||||
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
|
||||
|
||||
@@ -756,7 +756,7 @@ public:
|
||||
move(startOf(condition->right_expression), startOf(pattern->rparen_token), insertPos);
|
||||
insert(insertPos, QLatin1String(")"));
|
||||
copy(endOf(pattern->rparen_token), endOf(pattern->statement), insertPos);
|
||||
|
||||
|
||||
remove(endOf(condition->left_expression), startOf(condition->right_expression));
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ bool QuickFixOperation::isCursorOn(const CPlusPlus::AST *ast) const
|
||||
}
|
||||
|
||||
QuickFixOperation::Range QuickFixOperation::createRange(AST *ast) const
|
||||
{
|
||||
{
|
||||
QTextCursor tc = _textCursor;
|
||||
Range r(tc);
|
||||
r.begin.setPosition(startOf(ast));
|
||||
|
||||
@@ -55,7 +55,7 @@ struct CppFileSettings {
|
||||
|
||||
void toSettings(QSettings *) const;
|
||||
void fromSettings(QSettings *);
|
||||
bool applySuffixesToMimeDB();
|
||||
bool applySuffixesToMimeDB();
|
||||
|
||||
// Convenience to return a license template completely formatted.
|
||||
// Currently made public in
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
QString searchKeywords() const;
|
||||
|
||||
private slots:
|
||||
private slots:
|
||||
void slotEdit();
|
||||
|
||||
private:
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void updateModifiedSourceFiles();
|
||||
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
|
||||
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
|
||||
virtual void GC() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void CVSSettings::toSettings(QSettings *settings) const
|
||||
settings->setValue(QLatin1String(commandKeyC), cvsCommand);
|
||||
settings->setValue(QLatin1String(promptToSubmitKeyC), promptToSubmit);
|
||||
settings->setValue(QLatin1String(rootC), cvsRoot);
|
||||
settings->setValue(QLatin1String(diffOptionsKeyC), cvsDiffOptions);
|
||||
settings->setValue(QLatin1String(diffOptionsKeyC), cvsDiffOptions);
|
||||
settings->setValue(QLatin1String(timeOutKeyC), timeOutS);
|
||||
settings->setValue(QLatin1String(describeByCommitIdKeyC), describeByCommitId);
|
||||
settings->endGroup();
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
// return;
|
||||
if (m_data->markerLineNumber != lineNumber) {
|
||||
m_data->markerLineNumber = lineNumber;
|
||||
// FIXME: should we tell gdb about the change?
|
||||
// FIXME: should we tell gdb about the change?
|
||||
// Ignore it for now, as we would require re-compilation
|
||||
// and debugger re-start anyway.
|
||||
if (0 && !m_data->bpLineNumber.isEmpty()) {
|
||||
@@ -171,10 +171,10 @@ BreakpointData::BreakpointData(BreakHandler *handler)
|
||||
bpMultiple = false;
|
||||
//#if defined(Q_OS_MAC)
|
||||
// // full names do not work on Mac/MI
|
||||
useFullPath = false;
|
||||
useFullPath = false;
|
||||
//#else
|
||||
// //where = m_manager->shortName(data->fileName);
|
||||
// useFullPath = true;
|
||||
// useFullPath = true;
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||
// str = data->markerFileName;
|
||||
str = str.isEmpty() ? empty : str;
|
||||
if (data->useFullPath)
|
||||
str = "/.../" + str;
|
||||
str = "/.../" + str;
|
||||
return str;
|
||||
}
|
||||
if (role == Qt::UserRole)
|
||||
@@ -595,7 +595,7 @@ bool BreakHandler::setData(const QModelIndex &mi, const QVariant &value, int rol
|
||||
}
|
||||
return true;
|
||||
}
|
||||
default: {
|
||||
default: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ void BreakWindow::resizeColumnsToContents()
|
||||
void BreakWindow::setAlwaysResizeColumnsToContents(bool on)
|
||||
{
|
||||
m_alwaysResizeColumnsToContents = on;
|
||||
QHeaderView::ResizeMode mode = on
|
||||
QHeaderView::ResizeMode mode = on
|
||||
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
||||
for (int i = model()->columnCount(); --i >= 0; )
|
||||
header()->setResizeMode(i, mode);
|
||||
|
||||
@@ -105,7 +105,7 @@ void CDBBreakPoint::clear()
|
||||
ignoreCount = 0;
|
||||
oneShot = false;
|
||||
enabled = true;
|
||||
clearExpressionData();
|
||||
clearExpressionData();
|
||||
}
|
||||
|
||||
void CDBBreakPoint::clearExpressionData()
|
||||
@@ -516,7 +516,7 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl,
|
||||
CIDebugSymbols *syms,
|
||||
BreakHandler *handler,
|
||||
QString *errorMessage, QStringList *warnings)
|
||||
{
|
||||
{
|
||||
errorMessage->clear();
|
||||
warnings->clear();
|
||||
// Do an initial check whether we are in a state that allows
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Detect presence of "Debugging Tools For Windows"
|
||||
# in case VS compilers are used.
|
||||
# in case VS compilers are used.
|
||||
|
||||
win32 {
|
||||
contains(QMAKE_CXX, cl) {
|
||||
@@ -27,7 +27,7 @@ HEADERS += \
|
||||
$$PWD/coreengine.h \
|
||||
$$PWD/debugoutputbase.h \
|
||||
$$PWD/debugeventcallbackbase.h
|
||||
SOURCES += \
|
||||
SOURCES += \
|
||||
$$PWD/coreengine.cpp \
|
||||
$$PWD/debugoutputbase.cpp \
|
||||
$$PWD/debugeventcallbackbase.cpp
|
||||
|
||||
@@ -126,7 +126,7 @@ CdbDebugEnginePrivate::CdbDebugEnginePrivate(DebuggerManager *manager,
|
||||
m_eventThreadId(-1),
|
||||
m_interruptArticifialThreadId(-1),
|
||||
m_ignoreInitialBreakPoint(false),
|
||||
m_interrupted(false),
|
||||
m_interrupted(false),
|
||||
m_engine(engine),
|
||||
m_currentStackTrace(0),
|
||||
m_firstActivatedFrame(true),
|
||||
@@ -454,7 +454,7 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *
|
||||
}
|
||||
|
||||
void CdbDebugEnginePrivate::processCreatedAttached(ULONG64 processHandle, ULONG64 initialThreadHandle)
|
||||
{
|
||||
{
|
||||
m_engine->setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__);
|
||||
setDebuggeeHandles(reinterpret_cast<HANDLE>(processHandle), reinterpret_cast<HANDLE>(initialThreadHandle));
|
||||
ULONG currentThreadId;
|
||||
@@ -747,7 +747,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
|
||||
str << 'p';
|
||||
break;
|
||||
case DEBUG_STATUS_STEP_INTO:
|
||||
str << 't';
|
||||
str << 't';
|
||||
break;
|
||||
case CdbExtendedExecutionStatusStepOut:
|
||||
str << "gu";
|
||||
@@ -784,7 +784,7 @@ void CdbDebugEngine::nextExec()
|
||||
}
|
||||
|
||||
void CdbDebugEngine::stepIExec()
|
||||
{
|
||||
{
|
||||
stepExec(); // Step into by instruction (figured out by step)
|
||||
}
|
||||
|
||||
@@ -801,7 +801,7 @@ void CdbDebugEngine::stepOutExec()
|
||||
|
||||
void CdbDebugEngine::continueInferior()
|
||||
{
|
||||
QString errorMessage;
|
||||
QString errorMessage;
|
||||
if (!m_d->continueInferior(&errorMessage))
|
||||
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
|
||||
}
|
||||
@@ -979,7 +979,7 @@ void CdbDebugEngine::activateFrame(int frameIndex)
|
||||
QString errorMessage;
|
||||
bool success = false;
|
||||
StackHandler *stackHandler = manager()->stackHandler();
|
||||
do {
|
||||
do {
|
||||
WatchHandler *watchHandler = manager()->watchHandler();
|
||||
const int oldIndex = stackHandler->currentIndex();
|
||||
if (frameIndex >= stackHandler->stackSize()) {
|
||||
@@ -1091,7 +1091,7 @@ void CdbDebugEngine::fetchDisassembler(DisassemblerViewAgent *agent,
|
||||
bool ok = false;
|
||||
QString errorMessage;
|
||||
do {
|
||||
// get address
|
||||
// get address
|
||||
QString address;
|
||||
if (!frame.file.isEmpty())
|
||||
address = frame.address;
|
||||
@@ -1348,7 +1348,7 @@ bool CdbDebugEnginePrivate::setCDBThreadId(unsigned long threadId, QString *erro
|
||||
return false;
|
||||
}
|
||||
const QString msg = CdbDebugEngine::tr("Changing threads: %1 -> %2").arg(currentThreadId).arg(threadId);
|
||||
m_engine->showStatusMessage(msg, 500);
|
||||
m_engine->showStatusMessage(msg, 500);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1423,7 +1423,7 @@ void CdbDebugEnginePrivate::updateStackTrace()
|
||||
break;
|
||||
}
|
||||
// Visibly warn the users about missing top frames/all frames, as they otherwise
|
||||
// might think stepping is broken.
|
||||
// might think stepping is broken.
|
||||
if (!stackFrames.at(0).isUsable()) {
|
||||
const QString topFunction = count ? stackFrames.at(0).function : QString();
|
||||
const QString msg = current >= 0 ?
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
virtual void nextExec();
|
||||
virtual void stepIExec();
|
||||
virtual void nextIExec();
|
||||
|
||||
virtual void continueInferior();
|
||||
|
||||
virtual void continueInferior();
|
||||
virtual void interruptInferior();
|
||||
|
||||
virtual void runToLineExec(const QString &fileName, int lineNumber);
|
||||
@@ -107,7 +107,7 @@ public slots:
|
||||
private slots:
|
||||
void slotConsoleStubStarted();
|
||||
void slotConsoleStubError(const QString &msg);
|
||||
void slotConsoleStubTerminated();
|
||||
void slotConsoleStubTerminated();
|
||||
void slotBreakAttachToCrashed();
|
||||
void warning(const QString &w);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
const QSharedPointer<CdbOptions> m_options;
|
||||
HANDLE m_hDebuggeeProcess;
|
||||
HANDLE m_hDebuggeeThread;
|
||||
bool m_interrupted;
|
||||
bool m_interrupted;
|
||||
int m_currentThreadId;
|
||||
int m_eventThreadId;
|
||||
int m_interruptArticifialThreadId;
|
||||
|
||||
@@ -286,7 +286,7 @@ void CdbDumperInitThread ::run()
|
||||
case CdbDumperHelper::Loaded: // Injection load succeeded, ideally
|
||||
break;
|
||||
}
|
||||
// Perform remaining initialization
|
||||
// Perform remaining initialization
|
||||
emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 60000);
|
||||
m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage);
|
||||
}
|
||||
@@ -594,7 +594,7 @@ CdbDumperHelper::DumpResult CdbDumperHelper::dumpTypeI(const WatchData &wd, bool
|
||||
{
|
||||
errorMessage->clear();
|
||||
// Check failure cache and supported types
|
||||
if (m_state == Disabled) {
|
||||
if (m_state == Disabled) {
|
||||
*errorMessage =m_msgDisabled;
|
||||
return DumpNotHandled;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
Initialized, // List of types, etc. retrieved
|
||||
};
|
||||
|
||||
explicit CdbDumperHelper(DebuggerManager *manager,
|
||||
explicit CdbDumperHelper(DebuggerManager *manager,
|
||||
CdbCore::CoreEngine *coreEngine);
|
||||
~CdbDumperHelper();
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ ExceptionBlocker::ExceptionBlocker(CIDebugControl *ctrl, ULONG code, Mode m) :
|
||||
{
|
||||
// Retrieve current state
|
||||
memset(&m_oldParameters, 0, sizeof(DEBUG_EXCEPTION_FILTER_PARAMETERS));
|
||||
if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) {
|
||||
if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) {
|
||||
// Are we in a nested instantiation?
|
||||
const ULONG desiredExOption = m == IgnoreException ? DEBUG_FILTER_IGNORE : DEBUG_FILTER_OUTPUT;
|
||||
const bool isAlreadyBlocked = m_oldParameters.ExecutionOption == desiredExOption
|
||||
|
||||
@@ -64,7 +64,7 @@ bool getModuleNameList(CIDebugSymbols *syms, QStringList *modules, QString *erro
|
||||
}
|
||||
|
||||
bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorMessage)
|
||||
{
|
||||
{
|
||||
ULONG count;
|
||||
modules->clear();
|
||||
if (!getModuleCount(syms, &count, errorMessage))
|
||||
@@ -105,7 +105,7 @@ bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorM
|
||||
bool searchSymbols(CIDebugSymbols *syms, const QString &pattern,
|
||||
QStringList *matches, QString *errorMessage)
|
||||
{
|
||||
matches->clear();
|
||||
matches->clear();
|
||||
ULONG64 handle = 0;
|
||||
// E_NOINTERFACE means "no match". Apparently, it does not always
|
||||
// set handle.
|
||||
|
||||
@@ -131,7 +131,7 @@ WatchHandleDumperInserter::WatchHandleDumperInserter(WatchHandler *wh,
|
||||
|
||||
// Prevent recursion of the model by setting value and type
|
||||
static inline bool fixDumperType(WatchData *wd, const WatchData *source = 0)
|
||||
{
|
||||
{
|
||||
const bool missing = wd->isTypeNeeded() || wd->type.isEmpty();
|
||||
if (missing) {
|
||||
static const QString unknownType = QCoreApplication::translate("CdbStackFrameContext", "<Unknown Type>");
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
explicit CdbStackFrameContext(const QSharedPointer<CdbDumperHelper> &dumper,
|
||||
CdbSymbolGroupContext *symbolContext);
|
||||
~CdbStackFrameContext();
|
||||
~CdbStackFrameContext();
|
||||
|
||||
bool assignValue(const QString &iname, const QString &value,
|
||||
QString *newValue /* = 0 */, QString *errorMessage);
|
||||
|
||||
@@ -59,7 +59,7 @@ CdbStackTraceContext::CdbStackTraceContext(const QSharedPointer<CdbDumperHelper>
|
||||
CdbStackTraceContext *CdbStackTraceContext::create(const QSharedPointer<CdbDumperHelper> &dumper,
|
||||
unsigned long threadId,
|
||||
QString *errorMessage)
|
||||
{
|
||||
{
|
||||
if (debugCDB)
|
||||
qDebug() << Q_FUNC_INFO << threadId;
|
||||
// fill the DEBUG_STACK_FRAME array
|
||||
@@ -125,7 +125,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa
|
||||
}
|
||||
|
||||
int CdbStackTraceContext::indexOf(const QString &function) const
|
||||
{
|
||||
{
|
||||
|
||||
const QChar exclamationMark = QLatin1Char('!');
|
||||
const int count = m_frames.size();
|
||||
@@ -171,7 +171,7 @@ CdbStackFrameContext *CdbStackTraceContext::frameContextAt(int index, QString *e
|
||||
}
|
||||
// Exclude uninitialized variables if desired
|
||||
QStringList uninitializedVariables;
|
||||
if (theDebuggerAction(UseCodeModel)->isChecked()) {
|
||||
if (theDebuggerAction(UseCodeModel)->isChecked()) {
|
||||
const StackFrame &frame = m_frames.at(index);
|
||||
getUninitializedVariables(DebuggerManager::instance()->cppCodeModelSnapshot(), frame.function, frame.file, frame.line, &uninitializedVariables);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ static inline bool getStoppedThreadState(const CdbCore::ComInterfaces &cif,
|
||||
}
|
||||
ULONG frameCount;
|
||||
// Ignore the top frame if it is "ntdll!KiFastSystemCallRet", which is
|
||||
// not interesting for display.
|
||||
// not interesting for display.
|
||||
DEBUG_STACK_FRAME frames[MaxFrames];
|
||||
hr = cif.debugControl->GetStackTrace(0, 0, 0, frames, MaxFrames, &frameCount);
|
||||
if (FAILED(hr)) {
|
||||
|
||||
@@ -58,7 +58,7 @@ struct ThreadData;
|
||||
* Maintains an on-demand constructed list of CdbStackFrameContext
|
||||
* containining the local variables of the stack. */
|
||||
|
||||
class CdbStackTraceContext
|
||||
class CdbStackTraceContext
|
||||
{
|
||||
Q_DISABLE_COPY(CdbStackTraceContext)
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ static bool inline getUnsignedHexValue(QString stringValue, quint64 *value)
|
||||
return false;
|
||||
stringValue.remove(0, 2);
|
||||
// Remove 64bit separator
|
||||
if (stringValue.size() > 9) {
|
||||
if (stringValue.size() > 9) {
|
||||
const int sepPos = stringValue.size() - 9;
|
||||
if (stringValue.at(sepPos) == QLatin1Char('`'))
|
||||
stringValue.remove(sepPos, 1);
|
||||
@@ -489,8 +489,8 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
|
||||
const QString fullShadowedName = WatchData::shadowedName(name, shadowedNumber);
|
||||
wd.name = WatchData::shadowedName(removeInnerTemplateType(name), shadowedNumber);
|
||||
wd.addr = hexSymbolOffset(m_symbolGroup, index);
|
||||
const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index);
|
||||
wd.setType(type);
|
||||
const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index);
|
||||
wd.setType(type);
|
||||
// Check for uninitialized variables at level 0 only.
|
||||
const DEBUG_SYMBOL_PARAMETERS &p = m_symbolParameters.at(index);
|
||||
if (p.ParentSymbol == DEBUG_ANY_ID && m_uninitializedVariables.contains(fullShadowedName)) {
|
||||
|
||||
@@ -74,7 +74,7 @@ class CdbSymbolGroupContext
|
||||
|
||||
public:
|
||||
~CdbSymbolGroupContext();
|
||||
static CdbSymbolGroupContext *create(const QString &prefix,
|
||||
static CdbSymbolGroupContext *create(const QString &prefix,
|
||||
CIDebugSymbolGroup *symbolGroup,
|
||||
const QStringList &uninitializedVariables,
|
||||
QString *errorMessage);
|
||||
|
||||
@@ -77,7 +77,7 @@ FORMS += attachexternaldialog.ui \
|
||||
startexternaldialog.ui \
|
||||
startremotedialog.ui
|
||||
RESOURCES += debugger.qrc
|
||||
false {
|
||||
false {
|
||||
SOURCES += $$PWD/modeltest.cpp
|
||||
HEADERS += $$PWD/modeltest.h
|
||||
DEFINES += USE_MODEL_TEST=1
|
||||
|
||||
@@ -60,7 +60,7 @@ DebuggerSettings::~DebuggerSettings()
|
||||
{
|
||||
qDeleteAll(m_items);
|
||||
}
|
||||
|
||||
|
||||
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
||||
{
|
||||
QTC_ASSERT(!m_items.contains(code),
|
||||
@@ -81,7 +81,7 @@ void DebuggerSettings::writeSettings(QSettings *settings) const
|
||||
foreach (SavedAction *item, m_items)
|
||||
item->writeSettings(settings);
|
||||
}
|
||||
|
||||
|
||||
SavedAction *DebuggerSettings::item(int code) const
|
||||
{
|
||||
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
||||
|
||||
@@ -60,7 +60,7 @@ public slots:
|
||||
void writeSettings(QSettings *settings) const;
|
||||
|
||||
private:
|
||||
QHash<int, Utils::SavedAction *> m_items;
|
||||
QHash<int, Utils::SavedAction *> m_items;
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ enum DebuggerActionCode
|
||||
DebugDebuggingHelpers,
|
||||
|
||||
UseCodeModel,
|
||||
|
||||
|
||||
UseToolTipsInMainEditor,
|
||||
UseToolTipsInLocalsView,
|
||||
UseToolTipsInBreakpointsView,
|
||||
|
||||
@@ -76,7 +76,7 @@ MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr)
|
||||
}
|
||||
|
||||
MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr)
|
||||
: QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
|
||||
: QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
|
||||
{
|
||||
bool ok = true;
|
||||
init(addr.toULongLong(&ok, 0));
|
||||
@@ -242,7 +242,7 @@ void DisassemblerViewAgent::setFrame(const StackFrame &frame)
|
||||
setContents(*it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
IDebuggerEngine *engine = d->manager->currentEngine();
|
||||
QTC_ASSERT(engine, return);
|
||||
engine->fetchDisassembler(this, frame);
|
||||
@@ -296,7 +296,7 @@ void DisassemblerViewAgent::setContents(const QString &contents)
|
||||
bool DisassemblerViewAgent::contentsCoversAddress(const QString &contents) const
|
||||
{
|
||||
QTC_ASSERT(d, return false);
|
||||
for (int pos = 0, line = 0; ; ++line, ++pos) {
|
||||
for (int pos = 0, line = 0; ; ++line, ++pos) {
|
||||
if (contents.midRef(pos, d->frame.address.size()) == d->frame.address)
|
||||
return true;
|
||||
pos = contents.indexOf('\n', pos + 1);
|
||||
|
||||
@@ -118,7 +118,7 @@ enum LogChannel
|
||||
LogStatus, // Used for status changed messages
|
||||
LogTime, // Used for time stamp messages
|
||||
LogDebug,
|
||||
LogMisc
|
||||
LogMisc
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -391,9 +391,9 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
|
||||
m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
|
||||
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Start Script"));
|
||||
|
||||
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
|
||||
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(updateState()));
|
||||
|
||||
|
||||
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ void DebuggerManager::setSimpleDockWidgetArrangement()
|
||||
}
|
||||
|
||||
foreach (QDockWidget *dockWidget, dockWidgets) {
|
||||
if (dockWidget == d->m_outputDock)
|
||||
if (dockWidget == d->m_outputDock)
|
||||
d->m_mainWindow->addDockWidget(Qt::TopDockWidgetArea, dockWidget);
|
||||
else
|
||||
d->m_mainWindow->addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
|
||||
@@ -985,7 +985,7 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
||||
d->m_startParameters->toolChainType, &errorMessage);
|
||||
break;
|
||||
default:
|
||||
d->m_engine = determineDebuggerEngine(d->m_startParameters->executable,
|
||||
d->m_engine = determineDebuggerEngine(d->m_startParameters->executable,
|
||||
d->m_startParameters->toolChainType, &errorMessage, &settingsIdHint);
|
||||
break;
|
||||
}
|
||||
@@ -1439,7 +1439,7 @@ void DebuggerManager::showDebuggerInput(int channel, const QString &msg)
|
||||
{
|
||||
if (d->m_outputWindow)
|
||||
emit emitShowInput(channel, msg);
|
||||
else
|
||||
else
|
||||
qDebug() << "INPUT: " << channel << msg;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,8 +140,8 @@ enum DebuggerEngineTypeFlags
|
||||
ScriptEngineType = 0x02,
|
||||
CdbEngineType = 0x04,
|
||||
AllEngineTypes = GdbEngineType
|
||||
| ScriptEngineType
|
||||
| CdbEngineType
|
||||
| ScriptEngineType
|
||||
| CdbEngineType
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug d, DebuggerState state);
|
||||
@@ -283,7 +283,7 @@ private:
|
||||
Internal::ThreadsHandler *threadsHandler() const;
|
||||
Internal::WatchHandler *watchHandler() const;
|
||||
Internal::SourceFilesWindow *sourceFileWindow() const;
|
||||
QWidget *threadsWindow() const;
|
||||
QWidget *threadsWindow() const;
|
||||
|
||||
Internal::DebuggerManagerActions debuggerManagerActions() const;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
void bringPaneToForeground() { emit showPage(); }
|
||||
void setCursor(const QCursor &cursor);
|
||||
|
||||
|
||||
QString combinedContents() const;
|
||||
QString inputContents() const;
|
||||
|
||||
|
||||
@@ -352,16 +352,16 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
||||
m_ui.checkBoxUseMessageBoxForSignals);
|
||||
m_group.insert(theDebuggerAction(SkipKnownFrames),
|
||||
m_ui.checkBoxSkipKnownFrames);
|
||||
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
|
||||
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
|
||||
m_ui.checkBoxUseToolTipsInMainEditor);
|
||||
m_group.insert(theDebuggerAction(AutoDerefPointers), 0);
|
||||
m_group.insert(theDebuggerAction(UseToolTipsInLocalsView), 0);
|
||||
m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0);
|
||||
m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0);
|
||||
m_group.insert(theDebuggerAction(UseAddressInStackView), 0);
|
||||
m_group.insert(theDebuggerAction(EnableReverseDebugging),
|
||||
m_group.insert(theDebuggerAction(EnableReverseDebugging),
|
||||
m_ui.checkBoxEnableReverseDebugging);
|
||||
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
||||
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
||||
m_ui.spinBoxMaximalStackDepth);
|
||||
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
|
||||
m_group.insert(theDebuggerAction(ShowStdNamespace), 0);
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
virtual bool matches(const QString &s) const;
|
||||
|
||||
private:
|
||||
Ui::DebuggingHelperOptionPage m_ui;
|
||||
Ui::DebuggingHelperOptionPage m_ui;
|
||||
Utils::SavedActionSet m_group;
|
||||
QString m_searchKeywords;
|
||||
};
|
||||
|
||||
@@ -125,7 +125,7 @@ int ToolTipWidget::computeHeight(const QModelIndex &index) const
|
||||
return s;
|
||||
}
|
||||
|
||||
Q_SLOT void ToolTipWidget::computeSize()
|
||||
Q_SLOT void ToolTipWidget::computeSize()
|
||||
{
|
||||
int columns = 0;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
|
||||
@@ -92,7 +92,7 @@ signals:
|
||||
|
||||
// The adapter is still running just fine, but it failed to acquire a debuggee.
|
||||
void inferiorStartFailed(const QString &msg);
|
||||
|
||||
|
||||
protected:
|
||||
DebuggerState state() const
|
||||
{ return m_engine->state(); }
|
||||
|
||||
@@ -160,7 +160,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
|
||||
data.setValue(_("<unavailable>"));
|
||||
data.setHasChildren(false);
|
||||
insertData(data);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
m_processedNames.insert(processedName);
|
||||
|
||||
@@ -258,7 +258,7 @@ void GdbEngine::updateSubItemClassic(const WatchData &data0)
|
||||
#if DEBUG_SUBITEM
|
||||
qDebug() << "IT'S A POINTER";
|
||||
#endif
|
||||
|
||||
|
||||
if (theDebuggerBoolSetting(AutoDerefPointers)) {
|
||||
// Try automatic dereferentiation
|
||||
data.exp = "(*(" + data.exp + "))";
|
||||
@@ -496,7 +496,7 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
|
||||
// Load at least gdb macro based dumpers.
|
||||
QFile file(_(":/gdb/gdbmacros.txt"));
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QByteArray contents = file.readAll();
|
||||
QByteArray contents = file.readAll();
|
||||
m_debuggingHelperState = DebuggingHelperLoadTried;
|
||||
postCommand(contents);
|
||||
return;
|
||||
@@ -574,7 +574,7 @@ void GdbEngine::updateAllClassic()
|
||||
if (supportsThreads())
|
||||
postCommand("-thread-list-ids", WatchUpdate, CB(handleStackListThreads), 0);
|
||||
manager()->reloadRegisters();
|
||||
updateLocals();
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
void GdbEngine::setDebugDebuggingHelpersClassic(const QVariant &on)
|
||||
|
||||
@@ -196,7 +196,7 @@ void GdbEngine::connectDebuggingHelperActions()
|
||||
connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
|
||||
this, SLOT(recheckDebuggingHelperAvailabilityClassic()));
|
||||
}
|
||||
|
||||
|
||||
void GdbEngine::disconnectDebuggingHelperActions()
|
||||
{
|
||||
disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0);
|
||||
@@ -395,8 +395,8 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
||||
while (from != to) {
|
||||
GdbMi data;
|
||||
if (*from != ',') {
|
||||
// happens on archer where we get
|
||||
// 23^running <NL> *running,thread-id="all" <NL> (gdb)
|
||||
// happens on archer where we get
|
||||
// 23^running <NL> *running,thread-id="all" <NL> (gdb)
|
||||
result.m_type = GdbMi::Tuple;
|
||||
break;
|
||||
}
|
||||
@@ -431,22 +431,22 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
||||
showStatusMessage(tr("Library %1 unloaded.").arg(_(id)));
|
||||
invalidateSourcesList();
|
||||
} else if (asyncClass == "thread-group-created") {
|
||||
// Archer has "{id="28902"}"
|
||||
// Archer has "{id="28902"}"
|
||||
QByteArray id = result.findChild("id").data();
|
||||
showStatusMessage(tr("Thread group %1 created.").arg(_(id)));
|
||||
int pid = id.toInt();
|
||||
if (pid != inferiorPid())
|
||||
handleInferiorPidChanged(pid);
|
||||
} else if (asyncClass == "thread-created") {
|
||||
//"{id="1",group-id="28902"}"
|
||||
//"{id="1",group-id="28902"}"
|
||||
QByteArray id = result.findChild("id").data();
|
||||
showStatusMessage(tr("Thread %1 created.").arg(_(id)));
|
||||
} else if (asyncClass == "thread-group-exited") {
|
||||
// Archer has "{id="28902"}"
|
||||
// Archer has "{id="28902"}"
|
||||
QByteArray id = result.findChild("id").data();
|
||||
showStatusMessage(tr("Thread group %1 exited.").arg(_(id)));
|
||||
} else if (asyncClass == "thread-exited") {
|
||||
//"{id="1",group-id="28902"}"
|
||||
//"{id="1",group-id="28902"}"
|
||||
QByteArray id = result.findChild("id").data();
|
||||
QByteArray groupid = result.findChild("group-id").data();
|
||||
showStatusMessage(tr("Thread %1 in group %2 exited.")
|
||||
@@ -454,7 +454,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
||||
} else if (asyncClass == "thread-selected") {
|
||||
QByteArray id = result.findChild("id").data();
|
||||
showStatusMessage(tr("Thread %1 selected.").arg(_(id)));
|
||||
//"{id="2"}"
|
||||
//"{id="2"}"
|
||||
#if defined(Q_OS_MAC)
|
||||
} else if (asyncClass == "shlibs-updated") {
|
||||
// MAC announces updated libs
|
||||
@@ -598,7 +598,7 @@ void GdbEngine::readGdbStandardError()
|
||||
|
||||
void GdbEngine::readGdbStandardOutput()
|
||||
{
|
||||
if (m_commandTimer->isActive())
|
||||
if (m_commandTimer->isActive())
|
||||
m_commandTimer->start(); // Retrigger
|
||||
|
||||
int newstart = 0;
|
||||
@@ -665,7 +665,7 @@ void GdbEngine::maybeHandleInferiorPidChanged(const QString &pid0)
|
||||
}
|
||||
if (pid == inferiorPid())
|
||||
return;
|
||||
debugMessage(_("FOUND PID %1").arg(pid));
|
||||
debugMessage(_("FOUND PID %1").arg(pid));
|
||||
|
||||
handleInferiorPidChanged(pid);
|
||||
}
|
||||
@@ -828,7 +828,7 @@ void GdbEngine::commandTimeout()
|
||||
"the operation.\nYou can choose between waiting "
|
||||
"longer or abort debugging.").arg(timeOut / 1000);
|
||||
QMessageBox *mb = showMessageBox(QMessageBox::Critical,
|
||||
tr("Gdb not responding"), msg,
|
||||
tr("Gdb not responding"), msg,
|
||||
QMessageBox::Ok | QMessageBox::Cancel);
|
||||
mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time"));
|
||||
mb->button(QMessageBox::Ok)->setText(tr("Stop debugging"));
|
||||
@@ -873,7 +873,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
|
||||
tr("Executable failed"), QString::fromLocal8Bit(msg));
|
||||
showStatusMessage(tr("Process failed to start."));
|
||||
shutdown();
|
||||
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
|
||||
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
|
||||
// Handle a case known to appear on gdb 6.4 symbianelf when
|
||||
// the stack is cut due to access to protected memory.
|
||||
debugMessage(_("APPLYING WORKAROUND #2"));
|
||||
@@ -1678,7 +1678,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &s
|
||||
void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
{
|
||||
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
|
||||
// This should be set by the constructor or in exitDebugger()
|
||||
// This should be set by the constructor or in exitDebugger()
|
||||
// via initializeVariables()
|
||||
//QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized,
|
||||
// initializeVariables());
|
||||
@@ -1967,7 +1967,7 @@ void GdbEngine::sendInsertBreakpoint(int index)
|
||||
|
||||
void GdbEngine::reloadBreakListInternal()
|
||||
{
|
||||
m_breakListUpdating = true;
|
||||
m_breakListUpdating = true;
|
||||
// "Discardable" as long as we do in each step
|
||||
postCommand("-break-list", NeedsStop | Discardable, CB(handleBreakList));
|
||||
}
|
||||
@@ -2457,7 +2457,7 @@ void GdbEngine::handleStackSelectThread(const GdbResponse &)
|
||||
showStatusMessage(tr("Retrieving data for stack view..."), 3000);
|
||||
manager()->reloadRegisters();
|
||||
reloadStack(true);
|
||||
updateLocals();
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
void GdbEngine::reloadFullStack()
|
||||
@@ -2555,7 +2555,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
|
||||
targetFrame = i;
|
||||
}
|
||||
|
||||
bool canExpand = !cookie.isFull
|
||||
bool canExpand = !cookie.isFull
|
||||
&& (n >= theDebuggerAction(MaximalStackDepth)->value().toInt());
|
||||
theDebuggerAction(ExpandStack)->setEnabled(canExpand);
|
||||
manager()->stackHandler()->setFrames(stackFrames, canExpand);
|
||||
@@ -2581,7 +2581,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
|
||||
// For targetFrame == 0 we already issued a 'gotoLocation'
|
||||
// when reading the *stopped message.
|
||||
bool jump = (m_isMacGdb || targetFrame != 0);
|
||||
|
||||
|
||||
manager()->stackHandler()->setCurrentIndex(targetFrame);
|
||||
if (jump || cookie.gotoLocation) {
|
||||
const StackFrame &frame = manager()->stackHandler()->currentFrame();
|
||||
@@ -2978,7 +2978,7 @@ void GdbEngine::updateWatchData(const WatchData &data)
|
||||
data1.setValue(_("<unavailable>"));
|
||||
data1.setHasChildren(false);
|
||||
insertData(data1);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
m_processedNames.insert(processedName);
|
||||
|
||||
@@ -3207,7 +3207,7 @@ void GdbEngine::updateLocals(const QVariant &cookie)
|
||||
m_pendingRequests = 0;
|
||||
if (hasPython())
|
||||
updateLocalsPython(QByteArray());
|
||||
else
|
||||
else
|
||||
updateLocalsClassic(cookie);
|
||||
}
|
||||
|
||||
@@ -3246,10 +3246,10 @@ WatchData GdbEngine::localVariable(const GdbMi &item,
|
||||
data.setError(WatchData::msgNotInScope());
|
||||
return data;
|
||||
}
|
||||
//: Type of local variable or parameter shadowed by another
|
||||
//: Type of local variable or parameter shadowed by another
|
||||
//: variable of the same name in a nested block.
|
||||
setWatchDataValue(data, item.findChild("value"));
|
||||
data.setType(GdbEngine::tr("<shadowed>"));
|
||||
data.setType(GdbEngine::tr("<shadowed>"));
|
||||
data.setHasChildren(false);
|
||||
return data;
|
||||
}
|
||||
@@ -3431,7 +3431,7 @@ void GdbEngine::fetchDisassemblerByAddress(DisassemblerViewAgent *agent,
|
||||
QByteArray end = QByteArray::number(address + 100, 16);
|
||||
// -data-disassemble [ -s start-addr -e end-addr ]
|
||||
// | [ -f filename -l linenum [ -n lines ] ] -- mode
|
||||
if (useMixedMode)
|
||||
if (useMixedMode)
|
||||
postCommand("-data-disassemble -s 0x" + start + " -e 0x" + end + " -- 1",
|
||||
Discardable, CB(handleFetchDisassemblerByAddress1),
|
||||
QVariant::fromValue(DisassemblerAgentCookie(agent)));
|
||||
@@ -3491,7 +3491,7 @@ QString GdbEngine::parseDisassembler(const GdbMi &lines)
|
||||
if (line >= 0 && line < fileContents.size())
|
||||
ba += " " + fileContents.at(line) + '\n';
|
||||
GdbMi insn = child.findChild("line_asm_insn");
|
||||
foreach (const GdbMi &line, insn.children())
|
||||
foreach (const GdbMi &line, insn.children())
|
||||
ba += parseLine(line);
|
||||
} else {
|
||||
// the non-mixed version
|
||||
|
||||
@@ -454,7 +454,7 @@ private: ////////// View & Data Stuff //////////
|
||||
void updateLocalsClassic(const QVariant &cookie);
|
||||
void updateLocalsPython(const QByteArray &varList);
|
||||
void handleStackFramePython(const GdbResponse &response);
|
||||
|
||||
|
||||
void handleStackListLocalsClassic(const GdbResponse &response);
|
||||
void handleStackListLocalsPython(const GdbResponse &response);
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ QByteArray GdbMi::toString(bool multiline, int indent) const
|
||||
else
|
||||
result += "Invalid";
|
||||
break;
|
||||
case Const:
|
||||
case Const:
|
||||
if (!m_name.isEmpty())
|
||||
result += m_name + "=";
|
||||
result += "\"" + escapeCString(m_data) + "\"";
|
||||
|
||||
@@ -39,50 +39,50 @@ namespace Internal {
|
||||
|
||||
/*
|
||||
|
||||
output ==>
|
||||
( out-of-band-record )* [ result-record ] "(gdb)" nl
|
||||
result-record ==>
|
||||
[ token ] "^" result-class ( "," result )* nl
|
||||
out-of-band-record ==>
|
||||
async-record | stream-record
|
||||
async-record ==>
|
||||
exec-async-output | status-async-output | notify-async-output
|
||||
exec-async-output ==>
|
||||
[ token ] "*" async-output
|
||||
status-async-output ==>
|
||||
[ token ] "+" async-output
|
||||
notify-async-output ==>
|
||||
[ token ] "=" async-output
|
||||
async-output ==>
|
||||
async-class ( "," result )* nl
|
||||
result-class ==>
|
||||
"done" | "running" | "connected" | "error" | "exit"
|
||||
async-class ==>
|
||||
"stopped" | others (where others will be added depending on the needs--this is still in development).
|
||||
result ==>
|
||||
variable "=" value
|
||||
variable ==>
|
||||
string
|
||||
value ==>
|
||||
const | tuple | list
|
||||
const ==>
|
||||
c-string
|
||||
tuple ==>
|
||||
"{}" | "{" result ( "," result )* "}"
|
||||
list ==>
|
||||
"[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
|
||||
stream-record ==>
|
||||
console-stream-output | target-stream-output | log-stream-output
|
||||
console-stream-output ==>
|
||||
"~" c-string
|
||||
target-stream-output ==>
|
||||
"@" c-string
|
||||
log-stream-output ==>
|
||||
"&" c-string
|
||||
nl ==>
|
||||
CR | CR-LF
|
||||
token ==>
|
||||
any sequence of digits.
|
||||
output ==>
|
||||
( out-of-band-record )* [ result-record ] "(gdb)" nl
|
||||
result-record ==>
|
||||
[ token ] "^" result-class ( "," result )* nl
|
||||
out-of-band-record ==>
|
||||
async-record | stream-record
|
||||
async-record ==>
|
||||
exec-async-output | status-async-output | notify-async-output
|
||||
exec-async-output ==>
|
||||
[ token ] "*" async-output
|
||||
status-async-output ==>
|
||||
[ token ] "+" async-output
|
||||
notify-async-output ==>
|
||||
[ token ] "=" async-output
|
||||
async-output ==>
|
||||
async-class ( "," result )* nl
|
||||
result-class ==>
|
||||
"done" | "running" | "connected" | "error" | "exit"
|
||||
async-class ==>
|
||||
"stopped" | others (where others will be added depending on the needs--this is still in development).
|
||||
result ==>
|
||||
variable "=" value
|
||||
variable ==>
|
||||
string
|
||||
value ==>
|
||||
const | tuple | list
|
||||
const ==>
|
||||
c-string
|
||||
tuple ==>
|
||||
"{}" | "{" result ( "," result )* "}"
|
||||
list ==>
|
||||
"[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
|
||||
stream-record ==>
|
||||
console-stream-output | target-stream-output | log-stream-output
|
||||
console-stream-output ==>
|
||||
"~" c-string
|
||||
target-stream-output ==>
|
||||
"@" c-string
|
||||
log-stream-output ==>
|
||||
"&" c-string
|
||||
nl ==>
|
||||
CR | CR-LF
|
||||
token ==>
|
||||
any sequence of digits.
|
||||
|
||||
*/
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
inline const QList<GdbMi> &children() const { return m_children; }
|
||||
inline int childCount() const { return m_children.size(); }
|
||||
|
||||
const GdbMi &childAt(int index) const { return m_children[index]; }
|
||||
const GdbMi &childAt(int index) const { return m_children[index]; }
|
||||
GdbMi &childAt(int index) { return m_children[index]; }
|
||||
GdbMi findChild(const char *name) const;
|
||||
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
|
||||
enum GdbResultClass
|
||||
{
|
||||
// "done" | "running" | "connected" | "error" | "exit"
|
||||
// "done" | "running" | "connected" | "error" | "exit"
|
||||
GdbResultUnknown,
|
||||
GdbResultDone,
|
||||
GdbResultRunning,
|
||||
|
||||
@@ -78,9 +78,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
|
||||
m_ui.scriptFileChooser);
|
||||
m_group.insert(theDebuggerAction(GdbEnvironment),
|
||||
m_ui.environmentEdit);
|
||||
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
||||
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
||||
m_ui.checkBoxUsePreciseBreakpoints);
|
||||
m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
|
||||
m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
|
||||
m_ui.spinBoxGdbWatchdogTimeout);
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
static QString settingsId();
|
||||
|
||||
private:
|
||||
private:
|
||||
Ui::GdbOptionsPage m_ui;
|
||||
Utils::SavedActionSet m_group;
|
||||
QString m_searchKeywords;
|
||||
|
||||
@@ -127,7 +127,7 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
|
||||
GdbMi all;
|
||||
all.fromStringMultiple(out);
|
||||
//qDebug() << "ALL: " << all.toString();
|
||||
|
||||
|
||||
GdbMi data = all.findChild("data");
|
||||
QList<WatchData> list;
|
||||
foreach (const GdbMi &child, data.children()) {
|
||||
@@ -166,7 +166,7 @@ void GdbEngine::updateAllPython()
|
||||
if (supportsThreads())
|
||||
postCommand("-thread-list-ids", WatchUpdate, CB(handleStackListThreads), 0);
|
||||
manager()->reloadRegisters();
|
||||
updateLocals();
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Internal {
|
||||
* Provides a static convenience to prompt for both connection types. */
|
||||
|
||||
class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter
|
||||
{
|
||||
{
|
||||
public:
|
||||
static trk::PromptStartCommunicationResult
|
||||
startCommunication(const TrkDevicePtr &trkDevice,
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
QWidget *msgBoxParent,
|
||||
QString *errorMessage);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual trk::BluetoothListener *createListener();
|
||||
|
||||
private:
|
||||
|
||||
@@ -172,7 +172,7 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
|
||||
{
|
||||
QTC_ASSERT(range.size() == uint(ba.size()),
|
||||
qDebug() << "RANGE: " << range << " BA SIZE: " << ba.size(); return);
|
||||
|
||||
|
||||
MEMORY_DEBUG("INSERT: " << range);
|
||||
// Try to combine with existing chunk.
|
||||
Snapshot::Memory::iterator it = memory.begin();
|
||||
@@ -700,7 +700,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
|
||||
// Kill inferior process
|
||||
logMessage(msgGdbPacket(QLatin1String("kill")));
|
||||
sendTrkMessage(0x41, TrkCB(handleDeleteProcess),
|
||||
trkDeleteProcessMessage(), "Delete process");
|
||||
trkDeleteProcessMessage(), "Delete process");
|
||||
}
|
||||
|
||||
else if (cmd.startsWith("m")) {
|
||||
@@ -1015,7 +1015,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
|
||||
if (data.startsWith("auxv:read::")) {
|
||||
const int offsetPos = data.lastIndexOf(':') + 1;
|
||||
const int commaPos = data.lastIndexOf(',');
|
||||
if (commaPos != -1) {
|
||||
if (commaPos != -1) {
|
||||
bool ok1 = false, ok2 = false;
|
||||
const int offset = data.mid(offsetPos, commaPos - offsetPos)
|
||||
.toUInt(&ok1, 16);
|
||||
@@ -1282,7 +1282,7 @@ void TrkGdbAdapter::handleReadRegisters(const TrkResult &result)
|
||||
for (int i = 0; i < RegisterCount; ++i)
|
||||
m_snapshot.registers[i] = extractInt(data + 4 * i);
|
||||
m_snapshot.registerValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
void TrkGdbAdapter::handleWriteRegister(const TrkResult &result)
|
||||
{
|
||||
@@ -1293,7 +1293,7 @@ void TrkGdbAdapter::handleWriteRegister(const TrkResult &result)
|
||||
return;
|
||||
}
|
||||
sendGdbServerMessage("OK");
|
||||
}
|
||||
}
|
||||
|
||||
void TrkGdbAdapter::reportRegisters()
|
||||
{
|
||||
@@ -1446,7 +1446,7 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
|
||||
Snapshot::Memory::const_iterator et = m_snapshot.memory.end();
|
||||
for ( ; it != et; ++it) {
|
||||
MEMORY_DEBUG(" NEEDED STEP: " << needed);
|
||||
needed -= it.key();
|
||||
needed -= it.key();
|
||||
}
|
||||
MEMORY_DEBUG("NEEDED FINAL: " << needed);
|
||||
|
||||
@@ -1621,7 +1621,7 @@ void TrkGdbAdapter::handleClearBreakpoint(const TrkResult &result)
|
||||
if (result.errorCode()) {
|
||||
logMessage("ERROR: " + result.errorString());
|
||||
//return;
|
||||
}
|
||||
}
|
||||
sendGdbServerMessage("OK");
|
||||
}
|
||||
|
||||
@@ -1716,7 +1716,7 @@ void TrkGdbAdapter::startAdapter()
|
||||
logMessage(QLatin1String("### Starting TrkGdbAdapter"));
|
||||
m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth);
|
||||
// Prompt the user to start communication
|
||||
QString message;
|
||||
QString message;
|
||||
const trk::PromptStartCommunicationResult src =
|
||||
S60DebuggerBluetoothStarter::startCommunication(m_trkDevice,
|
||||
effectiveTrkDevice(),
|
||||
@@ -1807,8 +1807,8 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
|
||||
m_engine->postCommand("set breakpoint always-inserted on");
|
||||
m_engine->postCommand("set trust-readonly-sections"); // No difference?
|
||||
m_engine->postCommand("set displaced-stepping on"); // No difference?
|
||||
m_engine->postCommand("mem 0x00400000 0x00800000 cache");
|
||||
m_engine->postCommand("mem 0x78000000 0x88000000 cache ro");
|
||||
m_engine->postCommand("mem 0x00400000 0x00800000 cache");
|
||||
m_engine->postCommand("mem 0x78000000 0x88000000 cache ro");
|
||||
// FIXME: replace with stack-cache for newer gdb?
|
||||
m_engine->postCommand("set remotecache on"); // "info dcache" to check
|
||||
m_engine->postCommand("target remote " + gdbServerName().toLatin1(),
|
||||
@@ -1900,16 +1900,16 @@ void TrkGdbAdapter::handleDirectWrite1(const TrkResult &response)
|
||||
appendByte(&ba, 0xe5);
|
||||
#else
|
||||
// Thumb:
|
||||
// subs r0, #16
|
||||
// subs r0, #16
|
||||
appendByte(&ba, 0x08);
|
||||
appendByte(&ba, 0x3b);
|
||||
// subs r0, #16
|
||||
// subs r0, #16
|
||||
appendByte(&ba, 0x08);
|
||||
appendByte(&ba, 0x3b);
|
||||
//
|
||||
appendByte(&ba, 0x08);
|
||||
appendByte(&ba, 0x3b);
|
||||
// subs r0, #16
|
||||
// subs r0, #16
|
||||
appendByte(&ba, 0x08);
|
||||
appendByte(&ba, 0x3b);
|
||||
#endif
|
||||
|
||||
@@ -250,7 +250,7 @@ private:
|
||||
QByteArray trkWriteMemoryMessage(uint addr, const QByteArray &date);
|
||||
QByteArray trkBreakpointMessage(uint addr, uint len, bool armMode = true);
|
||||
QByteArray trkStepRangeMessage(byte option);
|
||||
QByteArray trkDeleteProcessMessage();
|
||||
QByteArray trkDeleteProcessMessage();
|
||||
QByteArray trkInterruptMessage();
|
||||
|
||||
QSharedPointer<trk::TrkDevice> m_trkDevice;
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
virtual void nextExec() = 0;
|
||||
virtual void stepIExec() = 0;
|
||||
virtual void nextIExec() = 0;
|
||||
|
||||
|
||||
virtual void continueInferior() = 0;
|
||||
virtual void interruptInferior() = 0;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ QVariant ModulesModel::headerData(int section,
|
||||
{
|
||||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||
static QString headers[] = {
|
||||
tr("Module name") + " ",
|
||||
tr("Module name") + " ",
|
||||
tr("Symbols read") + " ",
|
||||
tr("Start address") + " ",
|
||||
tr("End address") + " "
|
||||
@@ -115,7 +115,7 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
|
||||
break;
|
||||
case 1:
|
||||
if (role == Qt::DisplayRole)
|
||||
return module.symbolsRead ? "yes" : "no";
|
||||
return module.symbolsRead ? "yes" : "no";
|
||||
break;
|
||||
case 2:
|
||||
if (role == Qt::DisplayRole)
|
||||
|
||||
@@ -175,7 +175,7 @@ void ModulesWindow::resizeColumnsToContents()
|
||||
void ModulesWindow::setAlwaysResizeColumnsToContents(bool on)
|
||||
{
|
||||
m_alwaysResizeColumnsToContents = on;
|
||||
QHeaderView::ResizeMode mode = on
|
||||
QHeaderView::ResizeMode mode = on
|
||||
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
||||
header()->setResizeMode(0, mode);
|
||||
header()->setResizeMode(1, mode);
|
||||
@@ -189,7 +189,7 @@ void ModulesWindow::setModel(QAbstractItemModel *model)
|
||||
QTreeView::setModel(model);
|
||||
setAlwaysResizeColumnsToContents(true);
|
||||
}
|
||||
|
||||
|
||||
void ModulesWindow::showSymbols(const QString &name)
|
||||
{
|
||||
if (name.isEmpty())
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#endif // DO_TRACE
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
namespace Internal {
|
||||
|
||||
class NameDemanglerPrivate
|
||||
{
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
QLatin1String(""))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const QString makeExpr(const QStringList &exprs) const
|
||||
{
|
||||
Q_ASSERT(exprs.size() == 2);
|
||||
@@ -166,7 +166,7 @@ private:
|
||||
QLatin1String(""))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const QString makeExpr(const QStringList &exprs) const
|
||||
{
|
||||
Q_ASSERT(exprs.size() == 2);
|
||||
@@ -182,7 +182,7 @@ private:
|
||||
QLatin1String(""))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual const QString makeExpr(const QStringList &exprs) const
|
||||
{
|
||||
Q_ASSERT(exprs.size() == 3);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
bool demangle(const QString &mangledName);
|
||||
|
||||
/*
|
||||
* A textual description of the error encountered, if there was one.
|
||||
* A textual description of the error encountered, if there was one.
|
||||
* Only valid if demangle() returned false.
|
||||
*/
|
||||
const QString &errorString() const;
|
||||
|
||||
@@ -100,7 +100,7 @@ QVariant RegisterHandler::data(const QModelIndex &index, int role) const
|
||||
|
||||
if (role == RegisterChangedRole)
|
||||
return reg.changed;
|
||||
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ enum RegisterRole
|
||||
{
|
||||
RegisterNumberBaseRole = Qt::UserRole, // Currently used number base
|
||||
RegisterAddressRole, // Start value for opening memory view
|
||||
RegisterChangedRole // Used for painting changed values
|
||||
RegisterChangedRole // Used for painting changed values
|
||||
};
|
||||
|
||||
class Register
|
||||
@@ -76,7 +76,7 @@ private:
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &idx) const;
|
||||
|
||||
|
||||
QList<Register> m_registers;
|
||||
int m_base;
|
||||
int m_strlen; // approximate width of an value in chars
|
||||
|
||||
@@ -205,7 +205,7 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(theDebuggerAction(SettingsDialog));
|
||||
|
||||
QAction *act = menu.exec(ev->globalPos());
|
||||
|
||||
|
||||
if (act == actAdjust)
|
||||
resizeColumnsToContents();
|
||||
else if (act == actAlwaysAdjust)
|
||||
|
||||
@@ -4,6 +4,6 @@ HEADERS += \
|
||||
SOURCES += \
|
||||
$$PWD/scriptengine.cpp \
|
||||
|
||||
FORMS +=
|
||||
FORMS +=
|
||||
|
||||
RESOURCES +=
|
||||
RESOURCES +=
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
private:
|
||||
void maybeBreakNow(bool byFunction);
|
||||
|
||||
ScriptEngine *q;
|
||||
ScriptEngine *q;
|
||||
};
|
||||
|
||||
ScriptAgent::ScriptAgent(ScriptEngine *debugger, QScriptEngine *script)
|
||||
@@ -208,7 +208,7 @@ void ScriptEngine::executeDebuggerCommand(const QString &command)
|
||||
|
||||
void ScriptEngine::shutdown()
|
||||
{
|
||||
exitDebugger();
|
||||
exitDebugger();
|
||||
}
|
||||
|
||||
void ScriptEngine::exitDebugger()
|
||||
@@ -618,7 +618,7 @@ bool ScriptEngine::checkForBreakCondition(bool byFunction)
|
||||
showStatusMessage(tr("Stopped at %1:%2.").arg(fileName).arg(lineNumber), 5000);
|
||||
|
||||
StackFrame frame;
|
||||
frame.file = fileName;
|
||||
frame.file = fileName;
|
||||
frame.line = lineNumber;
|
||||
manager()->gotoLocation(frame, true);
|
||||
updateLocals();
|
||||
@@ -633,7 +633,7 @@ void ScriptEngine::updateLocals()
|
||||
|
||||
//
|
||||
// Build stack
|
||||
//
|
||||
//
|
||||
QList<StackFrame> stackFrames;
|
||||
int i = 0;
|
||||
for (QScriptContext *c = context; c; c = c->parentContext(), ++i) {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Internal {
|
||||
|
||||
void dumpBacktrace(int maxdepth = -1);
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGER_BACKTRACE_H
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
#ifdef USE_PSAPI
|
||||
static inline QString imageName(DWORD processId)
|
||||
{
|
||||
|
||||
@@ -160,7 +160,7 @@ static bool getDebugDirectory(IMAGE_NT_HEADERS *ntHeaders,
|
||||
#endif
|
||||
// Empty. This is the case for MinGW binaries
|
||||
if (debugDirSize == 0)
|
||||
return true;
|
||||
return true;
|
||||
// Look up in file
|
||||
DWORD debugDirOffset;
|
||||
if (!getFileOffsetFromRVA(ntHeaders, debugDirRva, &debugDirOffset)) {
|
||||
@@ -221,7 +221,7 @@ static void collectPDBfiles(void *fileMemory, IMAGE_DEBUG_DIRECTORY *directoryBa
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage)
|
||||
{
|
||||
HANDLE hFile = NULL;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Internal {
|
||||
// Return a list of Program-Database (*.pdb) files a PE executable refers to. */
|
||||
bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage);
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGER_PEUTILS_H
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
SOURCES += $$PWD/backtrace.cpp
|
||||
HEADERS += $$PWD/backtrace.h
|
||||
HEADERS += $$PWD/backtrace.h
|
||||
|
||||
win32 {
|
||||
|
||||
@@ -19,6 +19,6 @@ contains(QMAKE_CXX, cl) {
|
||||
# For the Privilege manipulation functions in sharedlibraryinjector.cpp.
|
||||
# Not required for MinGW.
|
||||
LIBS += advapi32.lib
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ QVariant SourceFilesModel::headerData(int section,
|
||||
{
|
||||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||
static QString headers[] = {
|
||||
tr("Internal name") + " ",
|
||||
tr("Internal name") + " ",
|
||||
tr("Full name") + " ",
|
||||
};
|
||||
return headers[section];
|
||||
@@ -178,7 +178,7 @@ SourceFilesWindow::SourceFilesWindow(QWidget *parent)
|
||||
setRootIsDecorated(false);
|
||||
setIconSize(QSize(10, 10));
|
||||
//header()->setDefaultAlignment(Qt::AlignLeft);
|
||||
|
||||
|
||||
connect(this, SIGNAL(activated(QModelIndex)),
|
||||
this, SLOT(sourceFileActivated(QModelIndex)));
|
||||
connect(act, SIGNAL(toggled(bool)),
|
||||
@@ -210,7 +210,7 @@ void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
act2 = new QAction(tr("Open file \"%1\"'").arg(name), &menu);
|
||||
act2->setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
menu.addAction(act1);
|
||||
menu.addAction(act2);
|
||||
menu.addSeparator();
|
||||
@@ -235,5 +235,5 @@ void SourceFilesWindow::removeAll()
|
||||
m_model->setSourceFiles(QMap<QString, QString>());
|
||||
header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||
}
|
||||
|
||||
|
||||
#include "sourcefileswindow.moc"
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class SourceFilesModel;
|
||||
|
||||
|
||||
class SourceFilesWindow : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -139,9 +139,9 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
|
||||
if (index.row() == m_stackFrames.size()) {
|
||||
if (role == Qt::DisplayRole && index.column() == 0)
|
||||
if (role == Qt::DisplayRole && index.column() == 0)
|
||||
return tr("...");
|
||||
if (role == Qt::DisplayRole && index.column() == 1)
|
||||
if (role == Qt::DisplayRole && index.column() == 1)
|
||||
return tr("<More>");
|
||||
if (role == Qt::DecorationRole && index.column() == 0)
|
||||
return m_emptyIcon;
|
||||
@@ -209,7 +209,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const
|
||||
}
|
||||
|
||||
StackFrame StackHandler::currentFrame() const
|
||||
{
|
||||
{
|
||||
QTC_ASSERT(m_currentIndex >= 0, return StackFrame());
|
||||
QTC_ASSERT(m_currentIndex < m_stackFrames.size(), return StackFrame());
|
||||
return m_stackFrames.at(m_currentIndex);
|
||||
|
||||
@@ -93,7 +93,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
QModelIndex idx = indexAt(ev->pos());
|
||||
StackFrame frame = model()->data(idx, Qt::UserRole).value<StackFrame>();
|
||||
QString address = frame.address;
|
||||
|
||||
|
||||
QMenu menu;
|
||||
|
||||
menu.addAction(theDebuggerAction(ExpandStack));
|
||||
@@ -107,7 +107,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
actShowMemory->setEnabled(false);
|
||||
} else {
|
||||
actShowMemory->setText(tr("Open memory editor at %1").arg(address));
|
||||
}
|
||||
}
|
||||
|
||||
QAction *actShowDisassembler = menu.addAction(QString());
|
||||
if (address.isEmpty()) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class DebuggerManager;
|
||||
|
||||
namespace Internal {
|
||||
class DisassemblerViewAgent;
|
||||
|
||||
|
||||
class StackWindow : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
class ThreadsWindow : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#if DEBUG_MODEL
|
||||
# define MODEL_DEBUG(s) qDebug() << s
|
||||
#else
|
||||
# define MODEL_DEBUG(s)
|
||||
# define MODEL_DEBUG(s)
|
||||
#endif
|
||||
#define MODEL_DEBUGX(s) qDebug() << s
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
// WatchData
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
WatchData::WatchData() :
|
||||
hasChildren(false),
|
||||
generation(-1),
|
||||
@@ -173,7 +173,7 @@ void WatchData::setValue(const QString &value0)
|
||||
// column. No need to duplicate it here.
|
||||
if (value.startsWith("(" + type + ") 0x"))
|
||||
value = value.section(" ", -1, -1);
|
||||
|
||||
|
||||
setValueUnneeded();
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ static QString niceTypeHelper(const QString typeIn)
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
int start = type.indexOf("std::allocator<");
|
||||
if (start == -1)
|
||||
break;
|
||||
break;
|
||||
// search for matching '>'
|
||||
int pos;
|
||||
int level = 0;
|
||||
@@ -738,7 +738,7 @@ bool WatchModel::hasChildren(const QModelIndex &parent) const
|
||||
|
||||
WatchItem *WatchModel::watchItem(const QModelIndex &idx) const
|
||||
{
|
||||
return idx.isValid()
|
||||
return idx.isValid()
|
||||
? static_cast<WatchItem*>(idx.internalPointer()) : m_root;
|
||||
}
|
||||
|
||||
@@ -747,7 +747,7 @@ QModelIndex WatchModel::watchIndex(const WatchItem *item) const
|
||||
return watchIndexHelper(item, m_root, QModelIndex());
|
||||
}
|
||||
|
||||
QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
||||
QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
||||
const WatchItem *parentItem, const QModelIndex &parentIndex) const
|
||||
{
|
||||
if (needle == parentItem)
|
||||
@@ -762,7 +762,7 @@ QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
|
||||
void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
|
||||
{
|
||||
QModelIndex idx1 = index(0, column, parentIndex);
|
||||
QModelIndex idx2 = index(rowCount(parentIndex) - 1, column, parentIndex);
|
||||
@@ -841,7 +841,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
||||
case ActiveDataRole:
|
||||
qDebug() << "ASK FOR" << data.iname;
|
||||
return true;
|
||||
|
||||
|
||||
case TypeFormatListRole:
|
||||
if (isIntType(data.type))
|
||||
return QStringList() << tr("decimal") << tr("hexadecimal")
|
||||
@@ -872,7 +872,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
@@ -890,7 +890,7 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro
|
||||
}
|
||||
} else if (role == TypeFormatRole) {
|
||||
m_handler->setFormat(data.type, value.toInt());
|
||||
} else if (role == IndividualFormatRole) {
|
||||
} else if (role == IndividualFormatRole) {
|
||||
const int format = value.toInt();
|
||||
if (format == -1) {
|
||||
m_handler->m_individualFormats.remove(data.iname);
|
||||
@@ -944,7 +944,7 @@ QVariant WatchModel::headerData(int section, Qt::Orientation orientation, int ro
|
||||
case 2: return QString(tr("Type") + QLatin1String(" "));
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
struct IName : public QByteArray
|
||||
@@ -964,7 +964,7 @@ bool iNameLess(const QString &iname1, const QString &iname2)
|
||||
return i1 < i2;
|
||||
}
|
||||
}
|
||||
return name1 < name2;
|
||||
return name1 < name2;
|
||||
}
|
||||
|
||||
bool operator<(const IName &iname1, const IName &iname2)
|
||||
@@ -981,7 +981,7 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
|
||||
{
|
||||
QList<WatchItem *>::const_iterator it =
|
||||
qLowerBound(list.begin(), list.end(), item, iNameSorter);
|
||||
return it - list.begin();
|
||||
return it - list.begin();
|
||||
}
|
||||
|
||||
void WatchModel::insertData(const WatchData &data)
|
||||
@@ -1032,7 +1032,7 @@ void WatchModel::insertData(const WatchData &data)
|
||||
void WatchModel::insertBulkData(const QList<WatchData> &list)
|
||||
{
|
||||
#if 0
|
||||
for (int i = 0; i != list.size(); ++i)
|
||||
for (int i = 0; i != list.size(); ++i)
|
||||
insertData(list.at(i));
|
||||
return;
|
||||
#endif
|
||||
@@ -1524,7 +1524,7 @@ WatchModel *WatchHandler::model(WatchType type) const
|
||||
QTC_ASSERT(false, /**/);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
WatchModel *WatchHandler::modelForIName(const QByteArray &iname) const
|
||||
{
|
||||
if (iname.startsWith("local"))
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
bool isLocal() const { return iname.startsWith("local."); }
|
||||
bool isWatcher() const { return iname.startsWith("watch."); }
|
||||
bool isValid() const { return !iname.isEmpty(); }
|
||||
|
||||
|
||||
bool isEqual(const WatchData &other) const;
|
||||
|
||||
static QString msgNotInScope();
|
||||
@@ -181,7 +181,7 @@ enum PointerFomat
|
||||
enum DumpableFormat
|
||||
{
|
||||
PrettyFormat = 0, // keep that at 0 as default
|
||||
PlainFomat,
|
||||
PlainFomat,
|
||||
};
|
||||
|
||||
class WatchModel : public QAbstractItemModel
|
||||
|
||||
@@ -329,7 +329,7 @@ static void blockRecursion(const CPlusPlus::Overview &overview,
|
||||
it = seenHash->insert(name, 0);
|
||||
} else {
|
||||
++(it.value());
|
||||
}
|
||||
}
|
||||
// Is the declaration on or past the current line, that is,
|
||||
// the variable not initialized.
|
||||
if (symbol->line() >= line)
|
||||
@@ -1396,7 +1396,7 @@ static void gbdMiToWatchData(const GdbMi &root,
|
||||
{
|
||||
if (debug > 1)
|
||||
qDebug() << Q_FUNC_INFO << '\n' << root.toString(false, 0);
|
||||
WatchData w;
|
||||
WatchData w;
|
||||
QString v;
|
||||
QByteArray b;
|
||||
// Check for name/iname and use as expression default
|
||||
@@ -1438,7 +1438,7 @@ static void gbdMiToWatchData(const GdbMi &root,
|
||||
w.exp = b;
|
||||
gdbMiGetByteArrayValue(&w.addr, root, "addr");
|
||||
gdbMiGetByteArrayValue(&w.saddr, root, "saddr");
|
||||
gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled");
|
||||
gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled");
|
||||
gdbMiGetBoolValue(&w.valueEditable, root, "valueeditable");
|
||||
if (gdbMiGetStringValue(&v, root, "valuetooltip", "valuetooltipencoded"))
|
||||
w.setValue(v);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
{
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor);
|
||||
QTC_ASSERT(lineEdit, return);
|
||||
if (index.column() == 1)
|
||||
if (index.column() == 1)
|
||||
lineEdit->setText(index.model()->data(index, Qt::DisplayRole).toString());
|
||||
else
|
||||
lineEdit->setText(index.model()->data(index, ExpressionRole).toString());
|
||||
@@ -140,15 +140,15 @@ WatchWindow::WatchWindow(Type type, DebuggerManager *manager, QWidget *parent)
|
||||
this, SLOT(expandNode(QModelIndex)));
|
||||
connect(this, SIGNAL(collapsed(QModelIndex)),
|
||||
this, SLOT(collapseNode(QModelIndex)));
|
||||
}
|
||||
|
||||
void WatchWindow::expandNode(const QModelIndex &idx)
|
||||
{
|
||||
}
|
||||
|
||||
void WatchWindow::expandNode(const QModelIndex &idx)
|
||||
{
|
||||
model()->setData(idx, true, ExpandedRole);
|
||||
}
|
||||
|
||||
void WatchWindow::collapseNode(const QModelIndex &idx)
|
||||
{
|
||||
}
|
||||
|
||||
void WatchWindow::collapseNode(const QModelIndex &idx)
|
||||
{
|
||||
model()->setData(idx, false, ExpandedRole);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
QString exp = model()->data(mi0, ExpressionRole).toString();
|
||||
QString type = model()->data(mi2).toString();
|
||||
|
||||
QStringList alternativeFormats =
|
||||
QStringList alternativeFormats =
|
||||
model()->data(mi0, TypeFormatListRole).toStringList();
|
||||
const int typeFormat =
|
||||
qMax(int(DecimalFormat), model()->data(mi0, TypeFormatRole).toInt());
|
||||
@@ -271,7 +271,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addSeparator();
|
||||
|
||||
QAction *actWatchOrRemove;
|
||||
if (m_type == LocalsType) {
|
||||
if (m_type == LocalsType) {
|
||||
actWatchOrRemove = theDebuggerAction(WatchExpression)->updatedAction(exp);
|
||||
} else {
|
||||
actWatchOrRemove = theDebuggerAction(RemoveWatchExpression)->updatedAction(exp);
|
||||
@@ -296,7 +296,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(actClearCodeModelSnapshot);
|
||||
menu.addSeparator();
|
||||
menu.addAction(theDebuggerAction(UseToolTipsInLocalsView));
|
||||
|
||||
|
||||
menu.addAction(theDebuggerAction(AutoDerefPointers));
|
||||
menu.addAction(theDebuggerAction(ShowStdNamespace));
|
||||
menu.addAction(theDebuggerAction(ShowQtNamespace));
|
||||
@@ -334,7 +334,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
m_manager->clearCppCodeModelSnapshot();
|
||||
} else if (clearIndividualFormatAction && act == clearIndividualFormatAction) {
|
||||
model()->setData(mi1, -1, IndividualFormatRole);
|
||||
} else {
|
||||
} else {
|
||||
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
||||
if (act == typeFormatActions.at(i))
|
||||
model()->setData(mi1, i, TypeFormatRole);
|
||||
@@ -355,7 +355,7 @@ void WatchWindow::setAlwaysResizeColumnsToContents(bool on)
|
||||
if (!header())
|
||||
return;
|
||||
m_alwaysResizeColumnsToContents = on;
|
||||
QHeaderView::ResizeMode mode = on
|
||||
QHeaderView::ResizeMode mode = on
|
||||
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
|
||||
header()->setResizeMode(0, mode);
|
||||
header()->setResizeMode(1, mode);
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
WatchWindow(Type type, DebuggerManager *manager, QWidget *parent = 0);
|
||||
void setType(Type type) { m_type = type; }
|
||||
Type type() const { return m_type; }
|
||||
|
||||
|
||||
public slots:
|
||||
void resizeColumnsToContents();
|
||||
void setAlwaysResizeColumnsToContents(bool on = true);
|
||||
|
||||
@@ -57,7 +57,7 @@ class FormClassWizardGenerationParametersPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
FormClassWizardGenerationParametersPrivate();
|
||||
void fromSettings(const QSettings *);
|
||||
void fromSettings(const QSettings *);
|
||||
void toSettings(QSettings *) const;
|
||||
bool equals(const FormClassWizardGenerationParametersPrivate &rhs) const;
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QS
|
||||
qDebug() << '<' << Q_FUNC_INFO << newUiClassName << rc;
|
||||
return rc;
|
||||
}
|
||||
#endif // USE_XSLT
|
||||
#endif // USE_XSLT
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Designer
|
||||
|
||||
@@ -374,7 +374,7 @@ QString FormWindowEditor::contents() const
|
||||
return QString::null;
|
||||
// Activate once all Qt branches around have integrated 4.5.2
|
||||
// (Kinetic)
|
||||
/*
|
||||
/*
|
||||
#if QT_VERSION > 0x040501
|
||||
// Quiet save as of Qt 4.5.2
|
||||
qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(m_formWindow);
|
||||
|
||||
@@ -183,7 +183,7 @@ private slots:
|
||||
private:
|
||||
void syncGridFeature();
|
||||
|
||||
FormWindowBasePrivate *m_d;
|
||||
FormWindowBasePrivate *m_d;
|
||||
};
|
||||
|
||||
} // namespace qdesigner_internal
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "fakevimactions.h"
|
||||
|
||||
// Please do not add any direct dependencies to other Qt Creator code here.
|
||||
// Please do not add any direct dependencies to other Qt Creator code here.
|
||||
// Instead emit signals and let the FakeVimPlugin channel the information to
|
||||
// Qt Creator. The idea is to keep this file here in a "clean" state that
|
||||
// allows easy reuse with any QTextEdit or QPlainTextEdit derived class.
|
||||
@@ -66,7 +66,7 @@ FakeVimSettings::~FakeVimSettings()
|
||||
{
|
||||
qDeleteAll(m_items);
|
||||
}
|
||||
|
||||
|
||||
void FakeVimSettings::insertItem(int code, SavedAction *item,
|
||||
const QString &longName, const QString &shortName)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ void FakeVimSettings::writeSettings(QSettings *settings)
|
||||
foreach (SavedAction *item, m_items)
|
||||
item->writeSettings(settings);
|
||||
}
|
||||
|
||||
|
||||
SavedAction *FakeVimSettings::item(int code)
|
||||
{
|
||||
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
||||
|
||||
@@ -80,9 +80,9 @@ public:
|
||||
void writeSettings(QSettings *settings);
|
||||
|
||||
private:
|
||||
QHash<int, Utils::SavedAction *> m_items;
|
||||
QHash<QString, int> m_nameToCode;
|
||||
QHash<int, QString> m_codeToName;
|
||||
QHash<int, Utils::SavedAction *> m_items;
|
||||
QHash<QString, int> m_nameToCode;
|
||||
QHash<int, QString> m_codeToName;
|
||||
};
|
||||
|
||||
FakeVimSettings *theFakeVimSettings();
|
||||
|
||||
@@ -150,30 +150,30 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
|
||||
m_ui.setupUi(w);
|
||||
|
||||
m_group.clear();
|
||||
m_group.insert(theFakeVimSetting(ConfigUseFakeVim),
|
||||
m_group.insert(theFakeVimSetting(ConfigUseFakeVim),
|
||||
m_ui.groupBox);
|
||||
|
||||
m_group.insert(theFakeVimSetting(ConfigExpandTab),
|
||||
m_group.insert(theFakeVimSetting(ConfigExpandTab),
|
||||
m_ui.checkBoxExpandTab);
|
||||
m_group.insert(theFakeVimSetting(ConfigHlSearch),
|
||||
m_group.insert(theFakeVimSetting(ConfigHlSearch),
|
||||
m_ui.checkBoxHlSearch);
|
||||
m_group.insert(theFakeVimSetting(ConfigShiftWidth),
|
||||
m_group.insert(theFakeVimSetting(ConfigShiftWidth),
|
||||
m_ui.lineEditShiftWidth);
|
||||
|
||||
m_group.insert(theFakeVimSetting(ConfigSmartTab),
|
||||
m_group.insert(theFakeVimSetting(ConfigSmartTab),
|
||||
m_ui.checkBoxSmartTab);
|
||||
m_group.insert(theFakeVimSetting(ConfigStartOfLine),
|
||||
m_group.insert(theFakeVimSetting(ConfigStartOfLine),
|
||||
m_ui.checkBoxStartOfLine);
|
||||
m_group.insert(theFakeVimSetting(ConfigTabStop),
|
||||
m_group.insert(theFakeVimSetting(ConfigTabStop),
|
||||
m_ui.lineEditTabStop);
|
||||
m_group.insert(theFakeVimSetting(ConfigBackspace),
|
||||
m_group.insert(theFakeVimSetting(ConfigBackspace),
|
||||
m_ui.lineEditBackspace);
|
||||
|
||||
m_group.insert(theFakeVimSetting(ConfigAutoIndent),
|
||||
m_group.insert(theFakeVimSetting(ConfigAutoIndent),
|
||||
m_ui.checkBoxAutoIndent);
|
||||
m_group.insert(theFakeVimSetting(ConfigSmartIndent),
|
||||
m_group.insert(theFakeVimSetting(ConfigSmartIndent),
|
||||
m_ui.checkBoxSmartIndent);
|
||||
m_group.insert(theFakeVimSetting(ConfigIncSearch),
|
||||
m_group.insert(theFakeVimSetting(ConfigIncSearch),
|
||||
m_ui.checkBoxIncSearch);
|
||||
|
||||
connect(m_ui.pushButtonCopyTextEditorSettings, SIGNAL(clicked()),
|
||||
@@ -202,9 +202,9 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
|
||||
|
||||
void FakeVimOptionPage::copyTextEditorSettings()
|
||||
{
|
||||
TextEditor::TabSettings ts =
|
||||
TextEditor::TabSettings ts =
|
||||
TextEditor::TextEditorSettings::instance()->tabSettings();
|
||||
|
||||
|
||||
m_ui.checkBoxExpandTab->setChecked(ts.m_spacesForTabs);
|
||||
m_ui.lineEditTabStop->setText(QString::number(ts.m_tabSize));
|
||||
m_ui.lineEditShiftWidth->setText(QString::number(ts.m_indentSize));
|
||||
@@ -554,7 +554,7 @@ private:
|
||||
} // namespace FakeVim
|
||||
|
||||
FakeVimPluginPrivate::FakeVimPluginPrivate(FakeVimPlugin *plugin)
|
||||
{
|
||||
{
|
||||
q = plugin;
|
||||
m_fakeVimOptionsPage = 0;
|
||||
m_fakeVimExCommandsPage = 0;
|
||||
@@ -600,7 +600,7 @@ bool FakeVimPluginPrivate::initialize()
|
||||
m_fakeVimExCommandsPage = new FakeVimExCommandsPage;
|
||||
q->addObject(m_fakeVimExCommandsPage);
|
||||
readSettings(Core::ICore::instance()->settings());
|
||||
|
||||
|
||||
Core::Command *cmd = 0;
|
||||
cmd = actionManager->registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
||||
Constants::INSTALL_HANDLER, globalcontext);
|
||||
@@ -799,7 +799,7 @@ void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor)
|
||||
// we can only handle QTextEdit and QPlainTextEdit
|
||||
if (!qobject_cast<QTextEdit *>(widget) && !qobject_cast<QPlainTextEdit *>(widget))
|
||||
return;
|
||||
|
||||
|
||||
//qDebug() << "OPENING: " << editor << editor->widget()
|
||||
// << "MODE: " << theFakeVimSetting(ConfigUseFakeVim)->value();
|
||||
|
||||
@@ -839,7 +839,7 @@ void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor)
|
||||
|
||||
handler->setCurrentFileName(editor->file()->fileName());
|
||||
handler->installEventFilter();
|
||||
|
||||
|
||||
// pop up the bar
|
||||
if (theFakeVimSetting(ConfigUseFakeVim)->value().toBool())
|
||||
showCommandBuffer(QString());
|
||||
@@ -858,8 +858,8 @@ void FakeVimPluginPrivate::setUseFakeVim(const QVariant &value)
|
||||
if (Find::Internal::FindPlugin::instance())
|
||||
Find::Internal::FindPlugin::instance()->setUseFakeVim(on);
|
||||
if (on) {
|
||||
Core::EditorManager::instance()->showEditorStatusBar(
|
||||
QLatin1String(Constants::MINI_BUFFER),
|
||||
Core::EditorManager::instance()->showEditorStatusBar(
|
||||
QLatin1String(Constants::MINI_BUFFER),
|
||||
"vi emulation mode. Type :q to leave. Use , Ctrl-R to trigger run.",
|
||||
tr("Quit FakeVim"), this, SLOT(quitFakeVim()));
|
||||
foreach (Core::IEditor *editor, m_editorToHandler.keys())
|
||||
@@ -909,7 +909,7 @@ void FakeVimPluginPrivate::writeFile(bool *handled,
|
||||
file->save(fileName);
|
||||
Core::ICore::instance()->fileManager()->unblockFileChange(file);
|
||||
*handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::handleExCommand(const QString &cmd)
|
||||
@@ -1072,7 +1072,7 @@ void FakeVimPluginPrivate::quitFakeVim()
|
||||
void FakeVimPluginPrivate::showCommandBuffer(const QString &contents)
|
||||
{
|
||||
//qDebug() << "SHOW COMMAND BUFFER" << contents;
|
||||
Core::EditorManager::instance()->showEditorStatusBar(
|
||||
Core::EditorManager::instance()->showEditorStatusBar(
|
||||
QLatin1String(Constants::MINI_BUFFER), contents,
|
||||
tr("Quit FakeVim"), this, SLOT(quitFakeVim()));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ProjectFilesFactory: public Core::IEditorFactory
|
||||
public:
|
||||
ProjectFilesFactory(Manager *manager, TextEditor::TextEditorActionHandler *handler);
|
||||
virtual ~ProjectFilesFactory();
|
||||
|
||||
|
||||
Manager *manager() const;
|
||||
|
||||
virtual Core::IEditor *createEditor(QWidget *parent);
|
||||
|
||||
@@ -149,7 +149,7 @@ bool GenericProjectWizard::isValidDir(const QFileInfo &fileInfo) const
|
||||
return false;
|
||||
|
||||
else if (fileName == QLatin1String("CVS"))
|
||||
return false;
|
||||
return false;
|
||||
|
||||
// ### user include/exclude
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
public slots:
|
||||
void selectWorkingDirectory();
|
||||
|
||||
private:
|
||||
private:
|
||||
Ui_ChangeSelectionDialog m_ui;
|
||||
};
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ void GitCommand::run()
|
||||
output += process.readAllStandardOutput();
|
||||
error += QString::fromLocal8Bit(process.readAllStandardError());
|
||||
switch (m_reportTerminationMode) {
|
||||
case NoReport:
|
||||
case NoReport:
|
||||
break;
|
||||
case ReportStdout:
|
||||
output += msgTermination(process.exitCode(), m_binaryPath, m_jobs.at(j).arguments).toUtf8();
|
||||
|
||||
@@ -228,7 +228,7 @@ void GitoriousHostWidget::slotBrowse()
|
||||
}
|
||||
|
||||
void GitoriousHostWidget::slotDelete()
|
||||
{
|
||||
{
|
||||
const QModelIndex index = ui->hostView->selectionModel()->currentIndex();
|
||||
ui->hostView->selectionModel()->clear();
|
||||
if (index.isValid()) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user