Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
64a2fa2a
Commit
64a2fa2a
authored
Jun 25, 2010
by
Alessandro Portale
Browse files
Use QLatin1String and QLatin1Char
parent
1181765a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/find/searchresulttreeitemdelegate.cpp
View file @
64a2fa2a
...
...
@@ -48,7 +48,7 @@ SearchResultTreeItemDelegate::SearchResultTreeItemDelegate(QObject *parent)
void
SearchResultTreeItemDelegate
::
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
if
(
index
.
model
()
->
data
(
index
,
ItemDataRoles
::
TypeRole
).
toString
().
compare
(
"file"
)
==
0
)
{
if
(
index
.
model
()
->
data
(
index
,
ItemDataRoles
::
TypeRole
).
toString
().
compare
(
QLatin1String
(
"file"
)
)
==
0
)
{
QItemDelegate
::
paint
(
painter
,
option
,
index
);
}
else
{
painter
->
save
();
...
...
@@ -92,7 +92,7 @@ int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyle
int
lineNumber
=
index
.
model
()
->
data
(
index
,
ItemDataRoles
::
ResultLineNumberRole
).
toInt
();
int
lineNumberDigits
=
(
int
)
floor
(
log10
((
double
)
lineNumber
))
+
1
;
int
minimumLineNumberDigits
=
qMax
((
int
)
m_minimumLineNumberDigits
,
lineNumberDigits
);
int
fontWidth
=
painter
->
fontMetrics
().
width
(
QString
(
minimumLineNumberDigits
,
'0'
));
int
fontWidth
=
painter
->
fontMetrics
().
width
(
QString
(
minimumLineNumberDigits
,
QLatin1Char
(
'0'
))
)
;
int
lineNumberAreaWidth
=
lineNumberAreaHorizontalPadding
+
fontWidth
+
lineNumberAreaHorizontalPadding
;
QRect
lineNumberAreaRect
(
option
.
rect
);
lineNumberAreaRect
.
setWidth
(
lineNumberAreaWidth
);
...
...
src/plugins/find/searchresulttreemodel.cpp
View file @
64a2fa2a
...
...
@@ -48,7 +48,7 @@ SearchResultTreeModel::SearchResultTreeModel(QObject *parent)
,
m_showReplaceUI
(
false
)
{
m_rootItem
=
new
SearchResultTreeItem
;
m_textEditorFont
=
QFont
(
"Courier"
);
m_textEditorFont
=
QFont
(
QLatin1String
(
"Courier"
)
)
;
}
SearchResultTreeModel
::~
SearchResultTreeModel
()
...
...
@@ -212,7 +212,7 @@ QVariant SearchResultTreeModel::data(const SearchResultTextRow *row, int role) c
result
=
row
->
searchTermLength
();
break
;
case
ItemDataRoles
::
TypeRole
:
result
=
"row"
;
result
=
QLatin1String
(
"row"
)
;
break
;
case
ItemDataRoles
::
FileNameRole
:
{
...
...
src/plugins/find/searchresulttreeview.cpp
View file @
64a2fa2a
...
...
@@ -77,7 +77,7 @@ void SearchResultTreeView::appendResultLines(const QList<Find::SearchResultItem>
void
SearchResultTreeView
::
emitJumpToSearchResult
(
const
QModelIndex
&
index
)
{
if
(
model
()
->
data
(
index
,
ItemDataRoles
::
TypeRole
).
toString
().
compare
(
"row"
)
!=
0
)
if
(
model
()
->
data
(
index
,
ItemDataRoles
::
TypeRole
).
toString
().
compare
(
QLatin1String
(
"row"
)
)
!=
0
)
return
;
int
position
=
model
()
->
data
(
index
,
ItemDataRoles
::
ResultIndexRole
).
toInt
();
...
...
src/plugins/find/searchresultwindow.cpp
View file @
64a2fa2a
...
...
@@ -113,7 +113,7 @@ SearchResultWindow::SearchResultWindow() : d(new SearchResultWindowPrivate)
d
->
m_expandCollapseToolButton
=
new
QToolButton
(
d
->
m_widget
);
d
->
m_expandCollapseToolButton
->
setAutoRaise
(
true
);
d
->
m_expandCollapseToolButton
->
setCheckable
(
true
);
d
->
m_expandCollapseToolButton
->
setIcon
(
QIcon
(
":/find/images/expand.png"
));
d
->
m_expandCollapseToolButton
->
setIcon
(
QIcon
(
QLatin1String
(
":/find/images/expand.png"
))
)
;
d
->
m_expandCollapseToolButton
->
setToolTip
(
tr
(
"Expand All"
));
d
->
m_replaceLabel
=
new
QLabel
(
tr
(
"Replace with:"
),
d
->
m_widget
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment