Fix warnings

- Use QChar to compare QString elements
- dashboard.ui: no zorder for spacer
This commit is contained in:
ballessay 2017-04-13 00:05:58 +02:00 committed by C. Balles
parent a7b70dbf8f
commit 354dcf574f
3 changed files with 6 additions and 6 deletions

View File

@ -605,7 +605,8 @@ QList<QString> QRCore::getList(const QString &type, const QString &subtype)
QStringList lines = flags.split("\n"); QStringList lines = flags.split("\n");
for (auto i : lines) for (auto i : lines)
{ {
if (i[0] != 0 && i[1] == 's') continue; // skip 'fs ..' // TODO: is 0 in a string even possible?
if (i[0] != QChar(0) && i[1] == QChar('s')) continue; // skip 'fs ..'
ret << i.mid(2).replace(" ", ","); ret << i.mid(2).replace(" ", ",");
} }
} }

View File

@ -1006,7 +1006,7 @@
} }
QTabWidget::pane { /* The tab widget frame */ QTabWidget::pane { /* The tab widget frame */
border-top: 0px; border-top: 0px;
} }
QTabBar::tab { QTabBar::tab {
@ -1017,8 +1017,8 @@ QTabBar::tab {
border-top-right-radius: 0px; border-top-right-radius: 0px;
min-width: 8ex; min-width: 8ex;
padding: 5px; padding: 5px;
margin-bottom: 3px; margin-bottom: 3px;
margin-top: 3px; margin-top: 3px;
} }
QTabBar::tab:selected { QTabBar::tab:selected {
@ -1144,7 +1144,6 @@ QTabBar::tab:hover {
</spacer> </spacer>
</item> </item>
</layout> </layout>
<zorder>verticalSpacer_3</zorder>
<zorder>polarWebView</zorder> <zorder>polarWebView</zorder>
</widget> </widget>
</widget> </widget>

View File

@ -7,7 +7,7 @@
void CMyDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const void CMyDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{ {
QStyleOptionViewItemV4 itemOption(option); QStyleOptionViewItem itemOption(option);
initStyleOption(&itemOption, index); initStyleOption(&itemOption, index);
itemOption.rect.adjust(10, 0, 0, 0); // Make the item rectangle 10 pixels smaller from the left side. itemOption.rect.adjust(10, 0, 0, 0); // Make the item rectangle 10 pixels smaller from the left side.