Commit b9d15b11 authored by hjk's avatar hjk Committed by hjk

debugger: remove a few too-fancy typedefs

Change-Id: I0c8ba3c2d22ca7128527da42b81919dabbd82d14
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 29a7ee6c
......@@ -705,7 +705,7 @@ bool StartExternalDialog::run(QWidget *parent,
if (!newParameters.arguments.isEmpty())
sp->processArgs = newParameters.arguments;
// Fixme: 1 of 3 testing hacks.
if (sp->processArgs.startsWith(__("@tcf@ ")) || sp->processArgs.startsWith(__("@sym@ ")))
if (sp->processArgs.startsWith(QLatin1String("@tcf@ ")) || sp->processArgs.startsWith(QLatin1String("@sym@ ")))
// Set up an ARM Symbian Abi
sp->toolChainAbi = ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture,
ProjectExplorer::Abi::SymbianOS,
......
......@@ -2858,13 +2858,13 @@ void DebuggerPluginPrivate::extensionsInitialized()
const Context cppeditorcontext(CppEditor::Constants::C_CPPEDITOR);
m_startIcon = QIcon(_(":/debugger/images/debugger_start_small.png"));
m_startIcon.addFile(__(":/debugger/images/debugger_start.png"));
m_startIcon.addFile(QLatin1String(":/debugger/images/debugger_start.png"));
m_exitIcon = QIcon(_(":/debugger/images/debugger_stop_small.png"));
m_exitIcon.addFile(__(":/debugger/images/debugger_stop.png"));
m_continueIcon = QIcon(__(":/debugger/images/debugger_continue_small.png"));
m_continueIcon.addFile(__(":/debugger/images/debugger_continue.png"));
m_exitIcon.addFile(QLatin1String(":/debugger/images/debugger_stop.png"));
m_continueIcon = QIcon(QLatin1String(":/debugger/images/debugger_continue_small.png"));
m_continueIcon.addFile(QLatin1String(":/debugger/images/debugger_continue.png"));
m_interruptIcon = QIcon(_(":/debugger/images/debugger_interrupt_small.png"));
m_interruptIcon.addFile(__(":/debugger/images/debugger_interrupt.png"));
m_interruptIcon.addFile(QLatin1String(":/debugger/images/debugger_interrupt.png"));
m_locationMarkIcon = QIcon(_(":/debugger/images/location_16.png"));
m_busy = false;
......@@ -2937,15 +2937,15 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(act, SIGNAL(triggered()), SLOT(handleAbort()));
act = m_nextAction = new QAction(tr("Step Over"), this);
act->setIcon(QIcon(__(":/debugger/images/debugger_stepover_small.png")));
act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_stepover_small.png")));
connect(act, SIGNAL(triggered()), SLOT(handleExecNext()));
act = m_stepAction = new QAction(tr("Step Into"), this);
act->setIcon(QIcon(__(":/debugger/images/debugger_stepinto_small.png")));
act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_stepinto_small.png")));
connect(act, SIGNAL(triggered()), SLOT(handleExecStep()));
act = m_stepOutAction = new QAction(tr("Step Out"), this);
act->setIcon(QIcon(__(":/debugger/images/debugger_stepout_small.png")));
act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_stepout_small.png")));
connect(act, SIGNAL(triggered()), SLOT(handleExecStepOut()));
act = m_runToLineAction = new QAction(tr("Run to Line"), this);
......@@ -2980,7 +2980,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
act->setCheckable(true);
act->setChecked(false);
act->setCheckable(false);
act->setIcon(QIcon(__(":/debugger/images/debugger_reversemode_16.png")));
act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_reversemode_16.png")));
act->setIconVisibleInMenu(false);
act = m_frameDownAction = new QAction(tr("Move to Called Frame"), this);
......
......@@ -530,7 +530,7 @@ static QList<DebuggerEngineType> engineTypes(const DebuggerStartParameters &sp)
}
// FIXME: 1 of 3 testing hacks.
if (sp.processArgs.startsWith(__("@tcf@ "))) {
if (sp.processArgs.startsWith(QLatin1String("@tcf@ "))) {
result.push_back(GdbEngineType);
return result;
}
......
......@@ -40,8 +40,6 @@
namespace Debugger {
namespace Internal {
typedef QLatin1Char _c;
typedef QLatin1String __;
inline QString _(const char *s) { return QString::fromLatin1(s); }
inline QString _(const QByteArray &ba) { return QString::fromLatin1(ba, ba.size()); }
......
......@@ -1047,7 +1047,7 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response)
int l = out.isEmpty() ? 0 : list.size();
for (int i = 0; i < l; ++i)
str.append(list.at(i).toInt());
data.setValue(_c('"') + str + _c('"'));
data.setValue(QLatin1Char('"') + str + QLatin1Char('"'));
data.setHasChildren(false);
data.setAllUnneeded();
insertData(data);
......@@ -1425,9 +1425,9 @@ void GdbEngine::handleVarListChildrenHelperClassic(const GdbMi &item,
data.exp = "*(" + parent.exp + ')';
} else if (startsWithDigit(data.name)) {
// An array. No variables needed?
data.name = _c('[') + data.name + _c(']');
data.name = QLatin1Char('[') + data.name + QLatin1Char(']');
data.exp = parent.exp + '[' + exp + ']';
} else if (0 && parent.name.endsWith(_c('.'))) {
} else if (0 && parent.name.endsWith(QLatin1Char('.'))) {
// Happens with anonymous unions
data.exp = parent.exp + data.name.toLatin1();
//data.name = "<anonymous union>";
......
......@@ -135,7 +135,7 @@ void CoreGdbAdapter::handleTemporaryTargetCore(const GdbResponse &response)
m_executable = QLatin1String(console.mid(pos1 + 1, pos2 - pos1 - 1));
// Strip off command line arguments. FIXME: make robust.
int idx = m_executable.indexOf(_c(' '));
int idx = m_executable.indexOf(QLatin1Char(' '));
if (idx >= 0)
m_executable.truncate(idx);
if (m_executable.isEmpty()) {
......
......@@ -3265,16 +3265,16 @@ void GdbEngine::handleModulesList(const GdbResponse &response)
Module module;
QString symbolsRead;
QTextStream ts(&line, QIODevice::ReadOnly);
if (line.startsWith(__("0x"))) {
if (line.startsWith(QLatin1String("0x"))) {
ts >> module.startAddress >> module.endAddress >> symbolsRead;
module.moduleName = ts.readLine().trimmed();
module.symbolsRead =
(symbolsRead == __("Yes") ? Module::ReadOk : Module::ReadFailed);
(symbolsRead == QLatin1String("Yes") ? Module::ReadOk : Module::ReadFailed);
modules.append(module);
} else if (line.trimmed().startsWith(__("No"))) {
} else if (line.trimmed().startsWith(QLatin1String("No"))) {
// gdb 6.4 symbianelf
ts >> symbolsRead;
QTC_ASSERT(symbolsRead == __("No"), continue);
QTC_ASSERT(symbolsRead == QLatin1String("No"), continue);
module.startAddress = 0;
module.endAddress = 0;
module.moduleName = ts.readLine().trimmed();
......@@ -3796,19 +3796,19 @@ bool GdbEngine::setToolTipExpression(const QPoint &mousePos,
}
exp = exp.mid(pos1, pos2 - pos1);
if (exp.isEmpty() || exp.startsWith(_c('#')) || !hasLetterOrNumber(exp) || isKeyWord(exp))
if (exp.isEmpty() || exp.startsWith(QLatin1Char('#')) || !hasLetterOrNumber(exp) || isKeyWord(exp))
return false;
if (exp.startsWith(_c('"')) && exp.endsWith(_c('"')))
if (exp.startsWith(QLatin1Char('"')) && exp.endsWith(QLatin1Char('"')))
return false;
if (exp.startsWith(__("++")) || exp.startsWith(__("--")))
if (exp.startsWith(QLatin1String("++")) || exp.startsWith(QLatin1String("--")))
exp = exp.mid(2);
if (exp.endsWith(__("++")) || exp.endsWith(__("--")))
if (exp.endsWith(QLatin1String("++")) || exp.endsWith(QLatin1String("--")))
exp = exp.mid(2);
if (exp.startsWith(_c('<')) || exp.startsWith(_c('[')))
if (exp.startsWith(QLatin1Char('<')) || exp.startsWith(QLatin1Char('[')))
return false;
if (hasSideEffects(exp) || exp.isEmpty())
......@@ -4130,7 +4130,7 @@ WatchData GdbEngine::localVariable(const GdbMi &item,
GdbMi t = item.findChild("numchild");
if (t.isValid())
data.setHasChildren(t.data().toInt() > 0);
else if (isPointerType(data.type) || data.name == __("this"))
else if (isPointerType(data.type) || data.name == QLatin1String("this"))
data.setHasChildren(true);
return data;
}
......@@ -4139,7 +4139,7 @@ void GdbEngine::insertData(const WatchData &data0)
{
PENDING_DEBUG("INSERT DATA" << data0.toString());
WatchData data = data0;
if (data.value.startsWith(__("mi_cmd_var_create:"))) {
if (data.value.startsWith(QLatin1String("mi_cmd_var_create:"))) {
qDebug() << "BOGUS VALUE:" << data.toString();
return;
}
......
......@@ -888,7 +888,7 @@ void parseWatchData(const QSet<QByteArray> &expandedINames,
data1.iname += data1.name.toLatin1();
}
if (!data1.name.isEmpty() && data1.name.at(0).isDigit())
data1.name = _c('[') + data1.name + _c(']');
data1.name = QLatin1Char('[') + data1.name + QLatin1Char(']');
if (addressStep) {
setWatchDataAddress(data1, addressBase);
addressBase += addressStep;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment