Debugger: Strip QLatin1* where possible

Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2018-10-07 22:38:47 +03:00
committed by Orgad Shaneh
parent d0d6f99491
commit 147a3c27c4
55 changed files with 491 additions and 494 deletions

View File

@@ -56,7 +56,7 @@ ConsoleItemDelegate::ConsoleItemDelegate(ConsoleItemModel *model, QObject *paren
m_errorIcon(Utils::Icons::CRITICAL.icon()),
m_expandIcon(Utils::Icons::EXPAND.icon()),
m_collapseIcon(Utils::Icons::COLLAPSE.icon()),
m_prompt(Utils::Icon({{QLatin1String(":/utils/images/next.png"),
m_prompt(Utils::Icon({{":/utils/images/next.png",
Utils::Theme::TextColorNormal}}, Utils::Icon::Tint).icon())
{
}
@@ -183,7 +183,7 @@ void ConsoleItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
if (!file.isEmpty()) {
QFontMetrics fm(option.font);
// Paint FileArea
const int pos = file.lastIndexOf(QLatin1Char('/'));
const int pos = file.lastIndexOf('/');
if (pos != -1)
file = file.mid(pos +1);
const int realFileWidth = fm.width(file);
@@ -269,11 +269,11 @@ QWidget *ConsoleItemDelegate::createEditor(QWidget *parent,
{
auto editor = new ConsoleEdit(index, parent);
// Make the background transparent so that the prompt shines through
editor->setStyleSheet(QLatin1String("QTextEdit {"
"margin-left: 24px;"
"margin-top: 4px;"
"background-color: transparent;"
"}"));
editor->setStyleSheet("QTextEdit {"
"margin-left: 24px;"
"margin-top: 4px;"
"background-color: transparent;"
"}");
connect(editor, &ConsoleEdit::editingFinished, this, [this, editor] {
auto delegate = const_cast<ConsoleItemDelegate*>(this);
emit delegate->commitData(editor);