From 051ac9dd0ed2f0f1844919154b3182f5f64fadd3 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 1 Apr 2016 20:23:58 +0200 Subject: [PATCH 01/25] Core: New and themable locked/unlocked icon This change replaces the existing locked/unlocked icons with Diana's icons and makes them themable. Now, they fit much better into the UI. Especially in the dark theme. Change-Id: I51beb3be202af8f2f467e81701cd5f27a6837d1c Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/core.qrc | 2 + src/plugins/coreplugin/coreicons.cpp | 9 +- src/plugins/coreplugin/images/locked.png | Bin 331 -> 175 bytes src/plugins/coreplugin/images/locked@2x.png | Bin 613 -> 187 bytes .../coreplugin/images/lockedbackground.png | Bin 0 -> 151 bytes .../coreplugin/images/lockedbackground@2x.png | Bin 0 -> 164 bytes src/plugins/coreplugin/images/unlocked.png | Bin 319 -> 179 bytes src/plugins/coreplugin/images/unlocked@2x.png | Bin 515 -> 189 bytes src/tools/icons/qtcreatoricons.svg | 103 +++++++++--------- 9 files changed, 61 insertions(+), 53 deletions(-) create mode 100644 src/plugins/coreplugin/images/lockedbackground.png create mode 100644 src/plugins/coreplugin/images/lockedbackground@2x.png diff --git a/src/plugins/coreplugin/core.qrc b/src/plugins/coreplugin/core.qrc index 291038d870f..b5a3a862b38 100644 --- a/src/plugins/coreplugin/core.qrc +++ b/src/plugins/coreplugin/core.qrc @@ -24,6 +24,8 @@ images/linkicon@2x.png images/locked.png images/locked@2x.png + images/lockedbackground.png + images/lockedbackground@2x.png images/magnifier.png images/magnifier@2x.png images/minus.png diff --git a/src/plugins/coreplugin/coreicons.cpp b/src/plugins/coreplugin/coreicons.cpp index 3b1d2793344..d0f88817fa3 100644 --- a/src/plugins/coreplugin/coreicons.cpp +++ b/src/plugins/coreplugin/coreicons.cpp @@ -52,10 +52,11 @@ const Icon RESET( QLatin1String(":/core/images/reset.png")); const Icon DARK_CLOSE( QLatin1String(":/core/images/darkclose.png")); -const Icon LOCKED( - QLatin1String(":/core/images/locked.png")); -const Icon UNLOCKED( - QLatin1String(":/core/images/unlocked.png")); +const Icon LOCKED({ + {QLatin1String(":/core/images/lockedbackground.png"), Theme::PanelStatusBarBackgroundColor}, + {QLatin1String(":/core/images/locked.png"), Theme::IconsBaseColor}}, Icon::Tint); +const Icon UNLOCKED({ + {QLatin1String(":/core/images/unlocked.png"), Theme::IconsDisabledColor}}, Icon::Tint); const Icon FIND_CASE_INSENSITIVELY( QLatin1String(":/find/images/casesensitively.png")); const Icon FIND_WHOLE_WORD( diff --git a/src/plugins/coreplugin/images/locked.png b/src/plugins/coreplugin/images/locked.png index ad832b5846afee1747c88cdd8c3e722cc93bd64e..7ce4f1f35995bbe847956c6e5e9a285f724e8f42 100644 GIT binary patch delta 159 zcmX@jw4QN-L_G^L0|Ud`yN`kx7#Iu!d_r6q7#JiaC8eaKJUu+9-{G-~Z?CsRj&;Qq7wgPd%8$kh($K;6Z>yPntD@om@O;UF7bs Q3=9kmp00i_>zopr0JoS%HUIzs literal 331 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QUcKY#w* zxpNyfY*@d3{nDjNXV0EJZQ8WSlP6D{II*UtrnI!QxVSh!KR+)oFDWT0K0ZD+HZ~$6 z;=|K>pBNYzluCm9f*BZDd4wg@3~Ze|y#r$7(~7HW`ue9YSiEfI!PDoiTzmcgi*ads z5(5K6zNd?0h(vhqxtn4R3IYue13FB;&As&7eo3*>wjb}G?Vcg&^zW1Nyi}Vn=Wlwi z3S7C-%cf<;wc5ZhyZQt!ZSBA6)qya+5=ayU614 zH$F2iv6dD68iJb-9H}|N(#?8c?-!<+Z}KOqCTcY*yqdB=HEW8pf}+aWP;J0S3F7 zYm68e7@SLj{DK)+Sh;z4`2@@ zPMR@q!IBM|cAYwZ`RcX%4<0>z_Wb3WPv3w1E7MtfjDdlX)zif>#NzbYN!N>-0z_PO zZ)l6{*(JD9MbJd5bK(ut-~az>@>@J>Vo6WBc6;VlxpTT3Z`4oHxi;%<+2$~xwpTt| zo4My^J-fC%`i0-L-=8b@&nda+#a_FI@$~_2cJAH^g#bgFLTl-n&oZ_>&E&ZHzSy9= zq$Hp9?!$8~=fp(}o*r|sob8cv+Q4kiq6gew5e0o+<{<{pnN;Hgj(3@Tx;LTytmvzK z4i8S)1>KwAG~b=$rZxj7r%-^3{voE1!7C(o^E~KVy81%FV^8s0rVJ8HAEqbd^4>Y| zfU}~Pr>Y{-o$dUOj(ZPd&F8!buGx1po?rI!^at-k@7L7CI*xSSPh_)Vy)_6a)L3-G-tyQxY7QgyaoHz8EcNh~r_swt{Po zp~#2Eqs;Mpxmb)V3`HDF?Ee1$ui4V-%&65Z!pakIU`10P>l5t-3gyfUu4kpSbge`G PfUNg)^>bP0l+XkKH?A}8 literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/images/unlocked.png b/src/plugins/coreplugin/images/unlocked.png index 3b8a5b660f8b0016345ca27b6516e6b716c7457a..a281db1a8c92657873f32a3f4a776aa040bb98b9 100644 GIT binary patch delta 163 zcmdnbw3%^&L_G^L0|Ud`yN`kx7#Iu!d_r6q7#JiaC8eaKJUu+9QUlpinR(g8$%zH2dih1^v)|cB zF)%QA1o(uw{{R0!G&I!D&o3e(A~ZBKDk>^8G&DRsJR%|jnT&vea4?9BjD!h5>4%1~ zH4F?4;w3?T!3>h|!3G8f1~*R^#}J9j$q5Ts z3_f;sa2Y6bekj;%RLrT!$+6kMz@ST!v*R#l3ZsF5NIR3`3=tUx&Vmh#IX8S<$oZjo j5$A##jfvb`3=GAS+3uRWn=iz`z`)??>gTe~DWM4fzMW;g diff --git a/src/plugins/coreplugin/images/unlocked@2x.png b/src/plugins/coreplugin/images/unlocked@2x.png index 2935eddf7d101984800b90c2381efaef60548e8f..4867e1568eb1be2f8d0b6dc54050690bfa92182a 100644 GIT binary patch delta 172 zcmZo>*~>UVvYvr~fgwy#RfBV)Nr?gW7|K5 b=d}!KdmMkUAGy~48{{xgS3j3^P6O>_%)lVM9)ua=q$bKRFfd4#xJHx&=ckpFCl;kLl$V$5W#(lUCnpx9>g5-u&wghk z#lXNYKfou%_5c6>3=9kn4Gp28p`Mi0-Fe23c@%tA$SD?1A|FPkY6wZBNH<_ z7mu{8f~J;^skx<K2 diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index 21bfa82a241..b55acf4ef92 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -1964,71 +1964,76 @@ style="" /> + transform="translate(0,16)"> - - - - + y="552" + x="297" + style="fill:#ffffff;fill-opacity:1" /> - + d="m 304.999,554 c -1.656,0 -2.999,1.343 -2.999,3 l 0,3 1,0 0,-3 c 0,-1.103 0.896,-2 1.999,-2 1.103,0 2.001,0.897 2.001,2 l 0,3 1,0 0,-3 c 0,-1.657 -1.343,-3 -3.001,-3 z" + id="lockbow" /> + + id="src/plugins/coreplugin/images/lockedbackground" + transform="translate(0,16)"> + y="552" + x="313" + style="fill:#ffffff;fill-opacity:1" /> + sodipodi:nodetypes="ccczcccccc" /> + + + + + xlink:href="#lockbow" + id="use6038" + width="100%" + height="100%" /> + Date: Sat, 2 Apr 2016 01:44:19 +0200 Subject: [PATCH 02/25] Core: Dedicated lock/unlock icons for toolbar and documents view This change enables us to have a variation of the lock icon for toolbars and for non-toolbars. This gives removes the need for an outlined locked icon which would work on dark and light backgrounds. Change-Id: I5b825b11e892928515112f6f49b1b0639862bc42 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/core.qrc | 2 -- src/plugins/coreplugin/coreicons.cpp | 9 +++--- src/plugins/coreplugin/coreicons.h | 3 +- .../editormanager/documentmodel.cpp | 27 +++++++----------- .../coreplugin/editormanager/documentmodel.h | 2 -- src/plugins/coreplugin/editortoolbar.cpp | 6 ++-- .../coreplugin/images/lockedbackground.png | Bin 151 -> 0 bytes .../coreplugin/images/lockedbackground@2x.png | Bin 164 -> 0 bytes src/tools/icons/qtcreatoricons.svg | 24 +--------------- 9 files changed, 22 insertions(+), 51 deletions(-) delete mode 100644 src/plugins/coreplugin/images/lockedbackground.png delete mode 100644 src/plugins/coreplugin/images/lockedbackground@2x.png diff --git a/src/plugins/coreplugin/core.qrc b/src/plugins/coreplugin/core.qrc index b5a3a862b38..291038d870f 100644 --- a/src/plugins/coreplugin/core.qrc +++ b/src/plugins/coreplugin/core.qrc @@ -24,8 +24,6 @@ images/linkicon@2x.png images/locked.png images/locked@2x.png - images/lockedbackground.png - images/lockedbackground@2x.png images/magnifier.png images/magnifier@2x.png images/minus.png diff --git a/src/plugins/coreplugin/coreicons.cpp b/src/plugins/coreplugin/coreicons.cpp index d0f88817fa3..827caa16a65 100644 --- a/src/plugins/coreplugin/coreicons.cpp +++ b/src/plugins/coreplugin/coreicons.cpp @@ -52,11 +52,12 @@ const Icon RESET( QLatin1String(":/core/images/reset.png")); const Icon DARK_CLOSE( QLatin1String(":/core/images/darkclose.png")); +const Icon LOCKED_TOOLBAR({ + {QLatin1String(":/core/images/locked.png"), Theme::IconsBaseColor}}); const Icon LOCKED({ - {QLatin1String(":/core/images/lockedbackground.png"), Theme::PanelStatusBarBackgroundColor}, - {QLatin1String(":/core/images/locked.png"), Theme::IconsBaseColor}}, Icon::Tint); -const Icon UNLOCKED({ - {QLatin1String(":/core/images/unlocked.png"), Theme::IconsDisabledColor}}, Icon::Tint); + {QLatin1String(":/core/images/locked.png"), Theme::PanelTextColorDark}}, Icon::Tint); +const Icon UNLOCKED_TOOLBAR({ + {QLatin1String(":/core/images/unlocked.png"), Theme::IconsBaseColor}}); const Icon FIND_CASE_INSENSITIVELY( QLatin1String(":/find/images/casesensitively.png")); const Icon FIND_WHOLE_WORD( diff --git a/src/plugins/coreplugin/coreicons.h b/src/plugins/coreplugin/coreicons.h index c0a3ee6fcf0..1aa28d0244f 100644 --- a/src/plugins/coreplugin/coreicons.h +++ b/src/plugins/coreplugin/coreicons.h @@ -44,8 +44,9 @@ CORE_EXPORT extern const Utils::Icon CUT; CORE_EXPORT extern const Utils::Icon DIR; CORE_EXPORT extern const Utils::Icon RESET; CORE_EXPORT extern const Utils::Icon DARK_CLOSE; +CORE_EXPORT extern const Utils::Icon LOCKED_TOOLBAR; CORE_EXPORT extern const Utils::Icon LOCKED; -CORE_EXPORT extern const Utils::Icon UNLOCKED; +CORE_EXPORT extern const Utils::Icon UNLOCKED_TOOLBAR; CORE_EXPORT extern const Utils::Icon FIND_CASE_INSENSITIVELY; CORE_EXPORT extern const Utils::Icon FIND_WHOLE_WORD; CORE_EXPORT extern const Utils::Icon FIND_REGEXP; diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp index 03da7fadc51..efdcf8bace5 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.cpp +++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp @@ -48,7 +48,6 @@ class DocumentModelPrivate : public QAbstractItemModel Q_OBJECT public: - DocumentModelPrivate(); ~DocumentModelPrivate(); int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -70,6 +69,8 @@ public: bool disambiguateDisplayNames(DocumentModel::Entry *entry); + static QIcon lockedIcon(); + private: friend class DocumentModel; void itemChanged(); @@ -101,20 +102,11 @@ private: } }; - const QIcon m_lockedIcon; - const QIcon m_unlockedIcon; - QList m_entries; QMap > m_editors; QHash m_entryByFixedPath; }; -DocumentModelPrivate::DocumentModelPrivate() : - m_lockedIcon(Icons::LOCKED.icon()), - m_unlockedIcon(Icons::UNLOCKED.icon()) -{ -} - DocumentModelPrivate::~DocumentModelPrivate() { qDeleteAll(m_entries); @@ -150,12 +142,7 @@ void DocumentModel::destroy() QIcon DocumentModel::lockedIcon() { - return d->m_lockedIcon; -} - -QIcon DocumentModel::unlockedIcon() -{ - return d->m_unlockedIcon; + return DocumentModelPrivate::lockedIcon(); } QAbstractItemModel *DocumentModel::model() @@ -340,6 +327,12 @@ bool DocumentModelPrivate::disambiguateDisplayNames(DocumentModel::Entry *entry) return true; } +QIcon DocumentModelPrivate::lockedIcon() +{ + const static QIcon icon = Icons::LOCKED.icon(); + return icon; +} + int DocumentModelPrivate::indexOfFilePath(const Utils::FileName &filePath) const { if (filePath.isEmpty()) @@ -535,7 +528,7 @@ QVariant DocumentModelPrivate::data(const QModelIndex &index, int role) const return name; } case Qt::DecorationRole: - return e->document->isFileReadOnly() ? m_lockedIcon : QIcon(); + return e->document->isFileReadOnly() ? lockedIcon() : QIcon(); case Qt::ToolTipRole: return e->fileName().isEmpty() ? e->displayName() : e->fileName().toUserOutput(); default: diff --git a/src/plugins/coreplugin/editormanager/documentmodel.h b/src/plugins/coreplugin/editormanager/documentmodel.h index 122e9330d31..c79a98b71f9 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.h +++ b/src/plugins/coreplugin/editormanager/documentmodel.h @@ -48,8 +48,6 @@ public: static void destroy(); static QIcon lockedIcon(); - static QIcon unlockedIcon(); - static QAbstractItemModel *model(); struct CORE_EXPORT Entry { diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index 26ad0b5d7c4..c472c8c29c4 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -413,11 +413,13 @@ void EditorToolBar::updateDocumentStatus(IDocument *document) d->m_lockButton->setEnabled(false); d->m_lockButton->setToolTip(QString()); } else if (document->isFileReadOnly()) { - d->m_lockButton->setIcon(DocumentModel::lockedIcon()); + const static QIcon locked = Icons::LOCKED_TOOLBAR.icon(); + d->m_lockButton->setIcon(locked); d->m_lockButton->setEnabled(true); d->m_lockButton->setToolTip(tr("Make Writable")); } else { - d->m_lockButton->setIcon(DocumentModel::unlockedIcon()); + const static QIcon unlocked = Icons::UNLOCKED_TOOLBAR.icon(); + d->m_lockButton->setIcon(unlocked); d->m_lockButton->setEnabled(false); d->m_lockButton->setToolTip(tr("File is writable")); } diff --git a/src/plugins/coreplugin/images/lockedbackground.png b/src/plugins/coreplugin/images/lockedbackground.png deleted file mode 100644 index 731a9403df0bcd6a37452d073f5a628e7d4bbcc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdu3Nd_r6q7#J8C8Ch6Z`1ts& ztgLKoY&LG(xOMB+!-o(5|NnnwWzJy+1_l#P7sn8e=;RrktUSi)e*9)@S&W4wC5{~6 zVP|6#GjMKP+{k$*;lUgRrF6dp1|~l(qXi5M2a`1IenoKqVPIfj@O1TaS?83{1ON;- BDYgIr diff --git a/src/plugins/coreplugin/images/lockedbackground@2x.png b/src/plugins/coreplugin/images/lockedbackground@2x.png deleted file mode 100644 index f322a45a425b30165700950c1eb213ed3d1d821b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4h9AWhA=@@4F(2=Y)==*5R22vKl~XCCM7CI*xSSPh_)Vy)_6a)L3-G-tyQxY7QgyaoHz8EcNh~r_swt{Po zp~#2Eqs;Mpxmb)V3`HDF?Ee1$ui4V-%&65Z!pakIU`10P>l5t-3gyfUu4kpSbge`G PfUNg)^>bP0l+XkKH?A}8 diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index b55acf4ef92..e325bb9ab5a 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -1984,31 +1984,9 @@ d="m 301,559 0,7 8,0 0,-7 -8,0 z m 4.5,3.847 0,1.153 -1,0 0,-1.153 c -0.293,-0.175 -0.5,-0.48 -0.5,-0.847 0,-0.553 0.448,-1 1,-1 0.552,0 1,0.447 1,1 0,0.366 -0.207,0.672 -0.5,0.847 z" id="lockbody" /> - - - - - + transform="translate(-16,16)"> Date: Sat, 2 Apr 2016 20:24:00 +0200 Subject: [PATCH 03/25] Flat themes: remove the shadow from pressed manhattan toolbuttons That's flatter and more consistent with the flat pressed buttons in the mode bar and status bar. Change-Id: I29edd2b184b8468005bffe8fe8c9f2e275355df1 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/manhattanstyle.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index e25346785db..0c5cd6c39be 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -485,15 +485,16 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption anim->paint(painter, option); } else { bool pressed = option->state & State_Sunken || option->state & State_On; - QColor shadow(0, 0, 0, 30); - painter->setPen(shadow); + painter->setPen(StyleHelper::sidebarShadow()); if (pressed) { const QColor shade = creatorTheme()->color(Theme::FancyToolButtonSelectedColor); painter->fillRect(rect, shade); - const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5); - painter->drawLine(borderRect.topLeft() + QPointF(1, 0), borderRect.topRight() - QPointF(1, 0)); - painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft()); - painter->drawLine(borderRect.topRight(), borderRect.bottomRight()); + if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5); + painter->drawLine(borderRect.topLeft() + QPointF(1, 0), borderRect.topRight() - QPointF(1, 0)); + painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft()); + painter->drawLine(borderRect.topRight(), borderRect.bottomRight()); + } } else if (option->state & State_Enabled && option->state & State_MouseOver) { painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor)); } else if (widget && widget->property("highlightWidget").toBool()) { From 57d01156ed9170959e93b157b9e076ed48dc4121 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Sun, 3 Apr 2016 20:23:11 +0200 Subject: [PATCH 04/25] ProgressBar: Conditional highlight and HighDPI fix This change makes drawing of the highlight above each progress bar depend on the current Theme::DrawToolBarHighlights flag. Also some off-by-ones issues in HighDPI are fixed. Change-Id: I80bb21d001784a8622fff795f3751d7b1697ddf1 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/progressmanager/progressbar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index a1c3fcbd919..13481968939 100644 --- a/src/plugins/coreplugin/progressmanager/progressbar.cpp +++ b/src/plugins/coreplugin/progressmanager/progressbar.cpp @@ -244,11 +244,14 @@ void ProgressBar::paintEvent(QPaintEvent *) // Draw separator int separatorHeight = m_separatorVisible ? SEPARATOR_HEIGHT : 0; if (m_separatorVisible) { + QRectF innerRect = QRectF(this->rect()).adjusted(0.5, 0.5, -0.5, -0.5); p.setPen(StyleHelper::sidebarShadow()); - p.drawLine(0,0, size().width(), 0); + p.drawLine(innerRect.topLeft(), innerRect.topRight()); - p.setPen(StyleHelper::sidebarHighlight()); - p.drawLine(1, 1, size().width(), 1); + if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) { + p.setPen(StyleHelper::sidebarHighlight()); + p.drawLine(innerRect.topLeft() + QPointF(1, 1), innerRect.topRight() + QPointF(0, 1)); + } } if (m_titleVisible) { From 9647a97c66147ec89c3d69a5ac1c7525458e6e88 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 4 Apr 2016 09:32:04 +0200 Subject: [PATCH 05/25] Default Flat Theme: Improve toolbar separator color Make it the same as disabled icons, so that they are clearly different from enabled icons. Change-Id: I8b467745a91dc94cbf2db1cb9a83c927d90ce5c1 Reviewed-by: Alessandro Portale --- share/qtcreator/themes/defaultflat.creatortheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/themes/defaultflat.creatortheme b/share/qtcreator/themes/defaultflat.creatortheme index a3899aed899..9b208b961c2 100644 --- a/share/qtcreator/themes/defaultflat.creatortheme +++ b/share/qtcreator/themes/defaultflat.creatortheme @@ -42,7 +42,7 @@ DoubleTabWidget2ndTabActiveTextColor=ffffffff DoubleTabWidget2ndTabBackgroundColor=ffff0000 DoubleTabWidget2ndTabInactiveTextColor=ff000000 EditorPlaceholderColor=ffdddddd -FancyToolBarSeparatorColor=43ffffff +FancyToolBarSeparatorColor=toolBarItemDisabled FancyTabBarBackgroundColor=shadowBackground FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled From 215e2ae60cc5cb23d867a256dc870a68ee0647a2 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 4 Apr 2016 10:35:21 +0200 Subject: [PATCH 06/25] TextEditor: Fix URL for highlight definitions Task-number: QTCREATORBUG-15997 Change-Id: Ibd90a8cdcf01892768b8a7fcbec7735d10d7b65c Reviewed-by: David Schulz --- src/plugins/texteditor/generichighlighter/manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index 2ab4e58e2b0..33cb5b88a36 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -408,7 +408,7 @@ QList Manager::parseAvailableDefinitionsList(QIODevice *d void Manager::downloadAvailableDefinitionsMetaData() { - QUrl url(QLatin1String("http://www.kate-editor.org/syntax/update-5.17.xml")); + QUrl url(QLatin1String("https://www.kate-editor.org/syntax/update-5.17.xml")); QNetworkRequest request(url); // Currently this takes a couple of seconds on Windows 7: QTBUG-10106. QNetworkReply *reply = Utils::NetworkAccessManager::instance()->get(request); From 5a2ba4d7c55f7a164251155a6149b516c07a6c12 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 24 Mar 2016 10:38:17 +0100 Subject: [PATCH 07/25] README: Update supported platform of binaries. Change-Id: I6ca56f0bf3dfb7c0208ac85ecd5ab85c041d4c48 Reviewed-by: Kai Koehne Reviewed-by: Eike Ziller --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a07dc05249..551174e0947 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Qt Creator is a cross-platform IDE for development with the Qt framework. The standalone binary packages support the following platforms: -Windows XP SP3 or later -(K)Ubuntu Linux 11.10 (32-bit and 64-bit) or later +Windows 7 or later +(K)Ubuntu Linux 14.04 (64-bit) or later Mac OS X 10.7 or later Building the sources requires Qt 5.5.0 or later. From a4d00327331f41c3240cdb6c358c330680823ff9 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 21 Mar 2016 15:10:43 +0100 Subject: [PATCH 08/25] iOS: Make "skipping platform" debug message instead of warning. Since there are WatchOS/Simulator and TVOS/Simulator nowadays, skipping these platforms is not worth a warning. Change-Id: I3671f8e9186dd521887acc81e5e60844bc9e9bcf Reviewed-by: Tobias Hunger --- src/plugins/ios/iosprobe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp index 8abe8b0f03e..72069fb91b1 100644 --- a/src/plugins/ios/iosprobe.cpp +++ b/src/plugins/ios/iosprobe.cpp @@ -137,7 +137,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco if (name != QLatin1String("macosx") && name != QLatin1String("iphoneos") && name != QLatin1String("iphonesimulator")) { - qCWarning(probeLog) << indent << QString::fromLatin1("Skipping unknown platform %1").arg(name); + qCDebug(probeLog) << indent << QString::fromLatin1("Skipping unknown platform %1").arg(name); continue; } From dc16ca8552b61800aa0fd0be43cc0de0c7745f5b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 18 Mar 2016 09:02:55 +0100 Subject: [PATCH 09/25] Remove tcpportsgatherer Has not been used since a while. Change-Id: I53cf42d723c2f4d822ad63923b857f119e5cfa58 Reviewed-by: Eike Ziller Reviewed-by: Tobias Hunger --- .gitignore | 1 - src/libs/utils/tcpportsgatherer.cpp | 298 ------------------ src/libs/utils/tcpportsgatherer.h | 53 ---- src/libs/utils/utils-lib.pri | 2 - src/libs/utils/utils.qbs | 2 - tests/manual/manual.pro | 1 - tests/manual/utils/tcpportsgatherer/main.cpp | 37 --- .../tcpportsgatherer/tcpportsgatherer.pro | 8 - .../tcpportsgatherer/tcpportsgatherer.qbs | 24 -- tests/manual/utils/utils.pro | 3 - 10 files changed, 429 deletions(-) delete mode 100644 src/libs/utils/tcpportsgatherer.cpp delete mode 100644 src/libs/utils/tcpportsgatherer.h delete mode 100644 tests/manual/utils/tcpportsgatherer/main.cpp delete mode 100644 tests/manual/utils/tcpportsgatherer/tcpportsgatherer.pro delete mode 100644 tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs delete mode 100644 tests/manual/utils/utils.pro diff --git a/.gitignore b/.gitignore index 067d81b8729..f100f3152c3 100644 --- a/.gitignore +++ b/.gitignore @@ -229,7 +229,6 @@ tmp/ /tests/manual/ssh/sftpfsmodel/sftpfsmodel /tests/manual/ssh/shell/shell /tests/manual/ssh/tunnel/tunnel -/tests/manual/utils/tcpportsgatherer/tst_tcpportsgatherer /tests/tools/qml-ast2dot/qml-ast2dot /tests/valgrind/memcheck/modeldemo /tests/valgrind/memcheck/parsertests diff --git a/src/libs/utils/tcpportsgatherer.cpp b/src/libs/utils/tcpportsgatherer.cpp deleted file mode 100644 index afb29c6ca5e..00000000000 --- a/src/libs/utils/tcpportsgatherer.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "tcpportsgatherer.h" -#include "qtcassert.h" - -#include - -#include -#include -#include - -#ifdef Q_OS_WIN -#include -#include -#include -#include -#endif - -#if defined(Q_OS_WIN) && defined(Q_CC_MINGW) - -// Missing declarations for MinGW 32. -#if __GNUC__ == 4 && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 2) -typedef enum { } MIB_TCP_STATE; -#endif - -typedef struct _MIB_TCP6ROW { - MIB_TCP_STATE State; - IN6_ADDR LocalAddr; - DWORD dwLocalScopeId; - DWORD dwLocalPort; - IN6_ADDR RemoteAddr; - DWORD dwRemoteScopeId; - DWORD dwRemotePort; -} MIB_TCP6ROW, *PMIB_TCP6ROW; - -typedef struct _MIB_TCP6TABLE { - DWORD dwNumEntries; - MIB_TCP6ROW table[ANY_SIZE]; -} MIB_TCP6TABLE, *PMIB_TCP6TABLE; - -#endif // defined(Q_OS_WIN) && defined(Q_CC_MINGW) - -namespace Utils { -namespace Internal { - -class TcpPortsGathererPrivate -{ -public: - TcpPortsGathererPrivate() - : protocol(QAbstractSocket::UnknownNetworkLayerProtocol) {} - - QAbstractSocket::NetworkLayerProtocol protocol; - QSet usedPorts; - - void updateWin(); - void updateLinux(); - void updateNetstat(); -}; - -#ifdef Q_OS_WIN -template -QSet usedTcpPorts(ULONG (__stdcall *Func)(Table*, PULONG, BOOL)) -{ - Table *table = static_cast(malloc(sizeof(Table))); - DWORD dwSize = sizeof(Table); - - // get the necessary size into the dwSize variable - DWORD dwRetVal = Func(table, &dwSize, false); - if (dwRetVal == ERROR_INSUFFICIENT_BUFFER) { - free(table); - table = static_cast(malloc(dwSize)); - } - - // get the actual data - QSet result; - dwRetVal = Func(table, &dwSize, false); - if (dwRetVal == NO_ERROR) { - for (quint32 i = 0; i < table->dwNumEntries; i++) { - quint16 port = ntohs(table->table[i].dwLocalPort); - if (!result.contains(port)) - result.insert(port); - } - } else { - qWarning() << "TcpPortsGatherer: GetTcpTable failed with" << dwRetVal; - } - - free(table); - return result; -} -#endif - -void TcpPortsGathererPrivate::updateWin() -{ -#ifdef Q_OS_WIN - QSet ports; - - if (protocol == QAbstractSocket::IPv4Protocol) { - ports.unite(usedTcpPorts(GetTcpTable)); - } else { - //Dynamically load symbol for GetTcp6Table for systems that dont have support for IPV6, - //eg Windows XP - typedef ULONG (__stdcall *GetTcp6TablePtr)(PMIB_TCP6TABLE, PULONG, BOOL); - static GetTcp6TablePtr getTcp6TablePtr = 0; - - if (!getTcp6TablePtr) - getTcp6TablePtr = (GetTcp6TablePtr)QLibrary::resolve(QLatin1String("Iphlpapi.dll"), - "GetTcp6Table"); - - if (getTcp6TablePtr && (protocol == QAbstractSocket::IPv6Protocol)) { - ports.unite(usedTcpPorts(getTcp6TablePtr)); - } else if (protocol == QAbstractSocket::UnknownNetworkLayerProtocol) { - ports.unite(usedTcpPorts(GetTcpTable)); - if (getTcp6TablePtr) - ports.unite(usedTcpPorts(getTcp6TablePtr)); - } - } - - foreach (int port, ports) - usedPorts.insert(port); -#endif - Q_UNUSED(protocol); -} - -void TcpPortsGathererPrivate::updateLinux() -{ - QStringList filePaths; - const QString tcpFile = QLatin1String("/proc/net/tcp"); - const QString tcp6File = QLatin1String("/proc/net/tcp6"); - if (protocol == QAbstractSocket::IPv4Protocol) - filePaths << tcpFile; - else if (protocol == QAbstractSocket::IPv6Protocol) - filePaths << tcp6File; - else - filePaths << tcpFile << tcp6File; - - foreach (const QString &filePath, filePaths) { - QFile file(filePath); - if (!file.open(QFile::ReadOnly | QFile::Text)) { - qWarning() << "TcpPortsGatherer: Cannot open file" - << filePath << ":" << file.errorString(); - continue; - } - - if (file.atEnd()) // read first line describing the output - file.readLine(); - - static QRegExp pattern(QLatin1String("^\\s*" // start of line, whitespace - "\\d+:\\s*" // integer, colon, space - "[0-9A-Fa-f]+:" // hexadecimal number (ip), colon - "([0-9A-Fa-f]+)" // hexadecimal number (port!) - )); - while (!file.atEnd()) { - QByteArray line = file.readLine(); - if (pattern.indexIn(QLatin1String(line)) != -1) { - bool isNumber; - quint16 port = pattern.cap(1).toUShort(&isNumber, 16); - QTC_ASSERT(isNumber, continue); - usedPorts.insert(port); - } else { - qWarning() << "TcpPortsGatherer: File" << filePath << "has unexpected format."; - continue; - } - } - } -} - -// Only works with FreeBSD version of netstat like we have on Mac OS X -void TcpPortsGathererPrivate::updateNetstat() -{ - QStringList netstatArgs; - - netstatArgs.append(QLatin1String("-a")); // show also sockets of server processes - netstatArgs.append(QLatin1String("-n")); // show network addresses as numbers - netstatArgs.append(QLatin1String("-p")); - netstatArgs.append(QLatin1String("tcp")); - if (protocol != QAbstractSocket::UnknownNetworkLayerProtocol) { - netstatArgs.append(QLatin1String("-f")); // limit to address family - if (protocol == QAbstractSocket::IPv4Protocol) - netstatArgs.append(QLatin1String("inet")); - else - netstatArgs.append(QLatin1String("inet6")); - } - - QProcess netstatProcess; - netstatProcess.start(QLatin1String("netstat"), netstatArgs); - if (!netstatProcess.waitForFinished(30000)) { - qWarning() << "TcpPortsGatherer: netstat did not return in time."; - return; - } - - QList output = netstatProcess.readAllStandardOutput().split('\n'); - foreach (const QByteArray &line, output) { - static QRegExp pattern(QLatin1String("^tcp[46]+" // "tcp", followed by "4", "6", "46" - "\\s+\\d+" // whitespace, number (Recv-Q) - "\\s+\\d+" // whitespace, number (Send-Q) - "\\s+(\\S+)")); // whitespace, Local Address - if (pattern.indexIn(QLatin1String(line)) != -1) { - QString localAddress = pattern.cap(1); - - // Examples of local addresses: - // '*.56501' , '*.*' 'fe80::1%lo0.123' - int portDelimiterPos = localAddress.lastIndexOf(QLatin1Char('.')); - if (portDelimiterPos == -1) - continue; - - localAddress = localAddress.mid(portDelimiterPos + 1); - bool isNumber; - quint16 port = localAddress.toUShort(&isNumber); - if (!isNumber) - continue; - - usedPorts.insert(port); - } - } -} - -} // namespace Internal - - -/*! - \class Utils::TcpPortsGatherer - - \brief The TcpPortsGatherer class gathers the list of local TCP ports - already in use. - - Queries the system for the list of local TCP ports already in use. This - information can be used - to select a port for use in a range. -*/ - -TcpPortsGatherer::TcpPortsGatherer() - : d(new Internal::TcpPortsGathererPrivate()) -{ -} - -TcpPortsGatherer::~TcpPortsGatherer() -{ - delete d; -} - -void TcpPortsGatherer::update(QAbstractSocket::NetworkLayerProtocol protocol) -{ - d->protocol = protocol; - d->usedPorts.clear(); - - if (HostOsInfo::isWindowsHost()) - d->updateWin(); - else if (HostOsInfo::isLinuxHost()) - d->updateLinux(); - else - d->updateNetstat(); -} - -QList TcpPortsGatherer::usedPorts() const -{ - return d->usedPorts.values(); -} - -/*! - Selects a port out of \a freePorts that is not yet used. - - Returns the port, or -1 if no free port is available. - */ -int TcpPortsGatherer::getNextFreePort(PortList *freePorts) const -{ - QTC_ASSERT(freePorts, return -1); - while (freePorts->hasMore()) { - const int port = freePorts->getNext(); - if (!d->usedPorts.contains(port)) - return port; - } - return -1; -} - -} // namespace Utils diff --git a/src/libs/utils/tcpportsgatherer.h b/src/libs/utils/tcpportsgatherer.h deleted file mode 100644 index 712cc5a8851..00000000000 --- a/src/libs/utils/tcpportsgatherer.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#ifndef TCPPORTSGATHERER_H -#define TCPPORTSGATHERER_H - -#include "portlist.h" - -#include - -namespace Utils { -namespace Internal { class TcpPortsGathererPrivate; } - -class QTCREATOR_UTILS_EXPORT TcpPortsGatherer -{ -public: - TcpPortsGatherer(); - ~TcpPortsGatherer(); - - void update(QAbstractSocket::NetworkLayerProtocol protocol); - - QList usedPorts() const; - int getNextFreePort(PortList *port) const; - -private: - Internal::TcpPortsGathererPrivate *d; -}; - -} // namespace Utils - -#endif // TCPPORTSGATHERER_H diff --git a/src/libs/utils/utils-lib.pri b/src/libs/utils/utils-lib.pri index 476714a8870..a8b79e5e262 100644 --- a/src/libs/utils/utils-lib.pri +++ b/src/libs/utils/utils-lib.pri @@ -70,7 +70,6 @@ SOURCES += $$PWD/environment.cpp \ $$PWD/completingtextedit.cpp \ $$PWD/json.cpp \ $$PWD/portlist.cpp \ - $$PWD/tcpportsgatherer.cpp \ $$PWD/appmainwindow.cpp \ $$PWD/sleep.cpp \ $$PWD/basetreeview.cpp \ @@ -170,7 +169,6 @@ HEADERS += \ $$PWD/json.h \ $$PWD/runextensions.h \ $$PWD/portlist.h \ - $$PWD/tcpportsgatherer.h \ $$PWD/appmainwindow.h \ $$PWD/sleep.h \ $$PWD/basetreeview.h \ diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index 85a84b566f2..53125f5fef6 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -200,8 +200,6 @@ QtcLibrary { "stylehelper.h", "synchronousprocess.cpp", "synchronousprocess.h", - "tcpportsgatherer.cpp", - "tcpportsgatherer.h", "templateengine.cpp", "templateengine.h", "textfieldcheckbox.cpp", diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index 96654718406..6d37fa8ab0a 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -4,7 +4,6 @@ SUBDIRS= \ fakevim \ debugger \ subdir_proparser \ -utils \ shootout unix { diff --git a/tests/manual/utils/tcpportsgatherer/main.cpp b/tests/manual/utils/tcpportsgatherer/main.cpp deleted file mode 100644 index 7b6c142db0e..00000000000 --- a/tests/manual/utils/tcpportsgatherer/main.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include -#include - -using namespace Utils; -int main() -{ - qDebug() << "Used TCP Ports (IP4):"; - - TcpPortsGatherer portsGatherer; - portsGatherer.update(QAbstractSocket::IPv4Protocol); - qDebug() << portsGatherer.usedPorts(); - - qDebug() << "Used TCP Ports (IP6):"; - portsGatherer.update(QAbstractSocket::IPv6Protocol); - qDebug() << portsGatherer.usedPorts(); - - qDebug() << "All Used TCP Ports:"; - portsGatherer.update(QAbstractSocket::UnknownNetworkLayerProtocol); - qDebug() << portsGatherer.usedPorts(); - - qDebug() << "Getting a few ports ..."; - PortList portList = PortList::fromString(QLatin1String("10000-10100")); - QStringList ports; - for (int i = 0; i < 10; ++i) { - quint16 port = portsGatherer.getNextFreePort(&portList); - Q_ASSERT(!portsGatherer.usedPorts().contains(port)); - Q_ASSERT(port >= 10000); - Q_ASSERT(port < 10100); - QString portStr = QString::number(port); - Q_ASSERT(!ports.contains(portStr)); - ports.append(QString::number(port)); - } - qDebug() << ports.join(QLatin1String(", ")); - return 0; -} diff --git a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.pro b/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.pro deleted file mode 100644 index 7531e0526b6..00000000000 --- a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.pro +++ /dev/null @@ -1,8 +0,0 @@ -QTC_LIB_DEPENDS += utils -include(../../../auto/qttest.pri) - -QT += network -CONFIG += console -CONFIG -= app_bundle - -SOURCES += main.cpp diff --git a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs b/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs deleted file mode 100644 index d5ac0356941..00000000000 --- a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs +++ /dev/null @@ -1,24 +0,0 @@ -import qbs 1.0 - -Application { - name: "tcpportsgatherer" - - files: [ - "main.cpp", - "../../../../src/libs/utils/portlist.cpp", - "../../../../src/libs/utils/portlist.h", - "../../../../src/libs/utils/tcpportsgatherer.cpp", - "../../../../src/libs/utils/tcpportsgatherer.h" - ] - - cpp.includePaths: [ "../../../../src/libs" ] - cpp.defines: [ "QTCREATOR_UTILS_STATIC_LIB" ] - - Properties { - condition: qbs.targetOS == "windows" - cpp.dynamicLibraries: [ "iphlpapi.lib", "ws2_32.lib" ] - } - - Depends { name: "cpp" } - Depends { name: "Qt"; submodules: ["widgets"] } -} diff --git a/tests/manual/utils/utils.pro b/tests/manual/utils/utils.pro deleted file mode 100644 index a4899f90bb6..00000000000 --- a/tests/manual/utils/utils.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS = tcpportsgatherer From dd9d69f09e8060fd4cf4600b7129296db0ea2bb3 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 4 Apr 2016 11:25:36 +0200 Subject: [PATCH 10/25] Qmake: Unify cleanup of readers in nodes Change-Id: I2387342667d143235e2b147ba1c0971954b0beb7 Reviewed-by: Orgad Shaneh --- src/plugins/qmakeprojectmanager/qmakenodes.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 65611128b0a..050fe56f992 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -2107,9 +2107,7 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult) // we are changing what is executed in that case if (result->state == EvalResult::EvalFail || m_project->wasEvaluateCanceled()) { m_validParse = false; - m_project->destroyProFileReader(m_readerExact); - m_project->destroyProFileReader(m_readerCumulative); - m_readerExact = m_readerCumulative = 0; + cleanupProFileReaders(); setValidParseRecursive(false); setParseInProgressRecursive(false); @@ -2305,8 +2303,8 @@ void QmakeProFileNode::cleanupProFileReaders() m_project->destroyProFileReader(m_readerExact); m_project->destroyProFileReader(m_readerCumulative); - m_readerExact = 0; - m_readerCumulative = 0; + m_readerExact = nullptr; + m_readerCumulative = nullptr; } QStringList QmakeProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, From a01a0a4fed3f39bc8327672eeb50535d9f3f0fa8 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 4 Apr 2016 11:26:30 +0200 Subject: [PATCH 11/25] QmakeProject: Modernize a bit Change-Id: I58ba382f5bccc1ce16f55cbd35eb84edf628d62d Reviewed-by: Orgad Shaneh --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 8ae36a74bd1..5080114428c 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -393,7 +393,7 @@ void QmakeProject::updateCppCodeModel() typedef CppTools::ProjectPart ProjectPart; typedef CppTools::ProjectFile ProjectFile; - Kit *k = 0; + Kit *k = nullptr; if (Target *target = activeTarget()) k = target->kit(); else @@ -730,7 +730,7 @@ void QmakeProject::decrementPendingEvaluateFutures() m_asyncUpdateFutureInterface->reportFinished(); delete m_asyncUpdateFutureInterface; - m_asyncUpdateFutureInterface = 0; + m_asyncUpdateFutureInterface = nullptr; m_cancelEvaluate = false; // TODO clear the profile cache ? @@ -941,7 +941,7 @@ QtSupport::ProFileReader *QmakeProject::createProFileReader(const QmakeProFileNo } ++m_qmakeGlobalsRefCnt; - QtSupport::ProFileReader *reader = new QtSupport::ProFileReader(m_qmakeGlobals, m_qmakeVfs); + auto reader = new QtSupport::ProFileReader(m_qmakeGlobals, m_qmakeVfs); reader->setOutputDir(qmakeProFileNode->buildDir()); @@ -969,7 +969,7 @@ void QmakeProject::destroyProFileReader(QtSupport::ProFileReader *reader) QtSupport::ProFileCacheManager::instance()->decRefCount(); delete m_qmakeGlobals; - m_qmakeGlobals = 0; + m_qmakeGlobals = nullptr; } } From 9944992345c4f9016a217fe4b30b2f8e30492c7e Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 4 Apr 2016 11:27:19 +0200 Subject: [PATCH 12/25] QmakeProject: Fix crash when deleting while pro-files are being read Change-Id: I94c069cb806285fa23fc1a702caf620be8413e0b Task-number: QTCREATORBUG-15954 Task-number: QTCREATORBUG-15993 Reviewed-by: Orgad Shaneh --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 5080114428c..bc07296e53b 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -300,6 +300,10 @@ QmakeProject::~QmakeProject() { m_codeModelFuture.cancel(); m_asyncUpdateState = ShuttingDown; + + // Make sure root node (and associated readers) are shut hown before proceeding + setRootProjectNode(nullptr); + projectManager()->unregisterProject(this); delete m_projectFiles; m_cancelEvaluate = true; From 4c5163f6750b91e1d945a02daec0e1bc25f12721 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 4 Apr 2016 07:46:31 +0200 Subject: [PATCH 13/25] Squish: Ensure clean state after test run... ...depending on the environment and the present terminal variations it might be possible that QC leaves terminals with still running qtcreator_process_stubs open. Ensure to kill these (and automatically close their terminals). Task-number: QTCREATORBUG-15749 Change-Id: I0cdbaf000c355443289bf827034ad9884efc2ce7 Reviewed-by: Robert Loehning --- tests/system/shared/qtcreator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 116826df391..c9d2ee27826 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -33,6 +33,7 @@ import subprocess; import sys import errno; from datetime import datetime,timedelta; +import __builtin__ srcPath = '' SettingsPath = '' @@ -116,6 +117,16 @@ def waitForCleanShutdown(timeOut=10): shutdownDone=True if not shutdownDone and datetime.utcnow() > endtime: break + if platform.system() == 'Linux' and JIRA.isBugStillOpen(15749): + pgrepOutput = getOutputFromCmdline('pgrep -f qtcreator_process_stub') + pids = pgrepOutput.splitlines() + if len(pids): + print("Killing %d qtcreator_process_stub instances" % len(pids)) + for pid in pids: + try: + os.kill(__builtin__.int(pid), 9) + except OSError: # we might kill the parent before the current pid + pass def checkForStillRunningQmlExecutable(possibleNames): for qmlHelper in possibleNames: From ffac73b952eccd32b4948320354cf08659c31b67 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 4 Apr 2016 13:10:57 +0200 Subject: [PATCH 14/25] More contrast between enabled/disabled state of stop icon Change-Id: I0096535c1cd7de6924046be62c04a4336a013b5a Reviewed-by: Alessandro Portale --- share/qtcreator/themes/default.creatortheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 5aa64a4bdc8..5a688c7d99d 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -52,7 +52,7 @@ IconsWarningToolBarColor=fff2d76e IconsErrorColor=ffdf4f4f IconsErrorToolBarColor=ffdb6f71 IconsRunColor=ffa4d576 -IconsStopColor=ffdb6f71 +IconsStopColor=ffff8c8c IconsDebugColor=ffdcdcdc IconsInterruptColor=ff8f9dda IconsNavigationArrowsColor=ffebc322 From 05c5ed285984e648774cfe544fec6ea833876ce5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 4 Apr 2016 09:16:44 +0200 Subject: [PATCH 15/25] Core: Reset current OutputPanePlaceHolder on deletion... ...to avoid nullptr access Task-number: QTCREATORBUG-15987 Change-Id: I98da9323d13027192b77d0ba7ac8b846849930f0 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/outputpane.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp index 99933d5a692..fe90a73abe3 100644 --- a/src/plugins/coreplugin/outputpane.cpp +++ b/src/plugins/coreplugin/outputpane.cpp @@ -78,6 +78,7 @@ OutputPanePlaceHolder::~OutputPanePlaceHolder() om->setParent(0); om->hide(); } + OutputPanePlaceHolderPrivate::m_current = nullptr; } delete d; } From 838216ab5b37388aa169e7e73878be3567628d90 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 5 Apr 2016 10:55:27 +0200 Subject: [PATCH 16/25] QML Profiler: Fix capitalization of UI text - Qml > QML - When an icon tooltip can be considered an action name, use book style capitalization and no punctuation. Change-Id: I7ea6f4976f988c462160a4cdbecf14a792f8ca3f Reviewed-by: Ulf Hermann --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 1d822a9cd9d..66dfa693768 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -295,10 +295,10 @@ void QmlProfilerTool::updateRunActions() { if (d->m_toolBusy) { d->m_startAction->setEnabled(false); - d->m_startAction->setToolTip(tr("A Qml Profiler analysis is still in progress.")); + d->m_startAction->setToolTip(tr("A QML Profiler analysis is still in progress.")); d->m_stopAction->setEnabled(true); } else { - QString whyNot = tr("Start Qml Profiler analysis."); + QString whyNot = tr("Start QML Profiler analysis."); bool canRun = ProjectExplorerPlugin::canRunStartupProject (ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, &whyNot); d->m_startAction->setToolTip(whyNot); @@ -429,7 +429,7 @@ void QmlProfilerTool::recordingButtonChanged(bool recording) void QmlProfilerTool::setRecording(bool recording) { // update display - d->m_recordButton->setToolTip( recording ? tr("Disable profiling") : tr("Enable profiling")); + d->m_recordButton->setToolTip( recording ? tr("Disable Profiling") : tr("Enable Profiling")); d->m_recordButton->setIcon(QIcon(recording ? QLatin1String(":/qmlprofiler/recordOn.png") : QLatin1String(":/qmlprofiler/recordOff.png"))); From 27063480407a263ba4438d22751b7c09356426d3 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 5 Apr 2016 11:22:49 +0200 Subject: [PATCH 17/25] QMake: Write "state charts" as two words Change-Id: I6b0473c6f1029a9a0b99ce5e1a97e84e102d7218 Reviewed-by: Ulf Hermann --- src/plugins/qmakeprojectmanager/qmakenodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 050fe56f992..63b4319de0f 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -99,7 +99,7 @@ static const FileTypeDataStorage fileTypeDataStorage[] = { ":/qmakeprojectmanager/images/sources.png", "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++;" }, { FormType, Theme::ProjectExplorerForm, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Forms"), ":/qtsupport/images/forms.png", "*.ui;" }, - { StateChartType, Theme::ProjectExplorerForm, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "StateCharts"), + { StateChartType, Theme::ProjectExplorerForm, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "State charts"), ":/qtsupport/images/statecharts.png", "*.scxml;" }, { ResourceType, Theme::ProjectExplorerResource, QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Resources"), ":/qtsupport/images/qt_qrc.png", "*.qrc;" }, From 40b6413201ac5b6f53fd4508085f760585b0d742 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 4 Apr 2016 09:15:28 +0200 Subject: [PATCH 18/25] Debugger: Fix crash on close while debugging Task-number: QTCREATORBUG-15987 Change-Id: I510add216ec16c0c6622870f26c68c16e99769ed Reviewed-by: hjk --- src/plugins/debugger/debuggerplugin.cpp | 6 ++++++ src/plugins/debugger/debuggerruncontrol.cpp | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 654f9e2b014..3ac268c8b66 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2502,6 +2502,8 @@ void DebuggerPluginPrivate::setInitialState() void DebuggerPluginPrivate::updateState(DebuggerEngine *engine) { + if (m_shuttingDown) + return; QTC_ASSERT(engine, return); QTC_ASSERT(m_watchersView->model(), return); QTC_ASSERT(m_returnView->model(), return); @@ -2647,6 +2649,8 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine) void DebuggerPluginPrivate::updateDebugActions() { + if (m_shuttingDown) + return; //if we're currently debugging the actions are controlled by engine if (m_currentEngine->state() != DebuggerNotReady) return; @@ -2775,6 +2779,8 @@ QTreeView *inspectorView() void DebuggerPluginPrivate::showMessage(const QString &msg, int channel, int timeout) { + if (m_shuttingDown) + return; //qDebug() << "PLUGIN OUTPUT: " << channel << msg; QTC_ASSERT(m_logWindow, return); switch (channel) { diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 954539cd195..fab12a1920a 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -232,8 +232,11 @@ bool DebuggerRunControl::promptToStop(bool *optionalPrompt) const "Terminating the session in the current" " state can leave the target in an inconsistent state." " Would you still like to terminate it?"); - return showPromptToStopDialog(tr("Close Debugging Session"), question, - QString(), QString(), optionalPrompt); + bool result = showPromptToStopDialog(tr("Close Debugging Session"), question, + QString(), QString(), optionalPrompt); + if (result) + disconnect(this); + return result; } RunControl::StopResult DebuggerRunControl::stop() From f7a1c1caa015ae0674791bcaba9ee2d03e7b5272 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 4 Apr 2016 11:05:47 +0200 Subject: [PATCH 19/25] Squish: Disable testing QmlJS console This has changed too much and must be rewritten. Due to other issues this is not easily doable, so disabling this test for now. Task-number: QTCREATORBUG-15831 Change-Id: If0c7866b1f68a32c0696636fc76aed9bbe2ea921 Reviewed-by: Robert Loehning --- tests/system/suite_debugger/tst_qml_js_console/test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py index a6adab106d2..28654109f53 100644 --- a/tests/system/suite_debugger/tst_qml_js_console/test.py +++ b/tests/system/suite_debugger/tst_qml_js_console/test.py @@ -110,6 +110,9 @@ def testLoggingFeatures(): clickButton(":*Qt Creator.Clear_QToolButton") def main(): + test.warning("This test must be rewritten (QTCREATORBUG-15831)") # QmlJS Console has changed + return + projName = "simpleQuickUI2.qmlproject" projFolder = os.path.dirname(findFile("testdata", "simpleQuickUI2/%s" % projName)) if not neededFilePresent(os.path.join(projFolder, projName)): From 3c2f408963c286cf21a7c43993c793e38e503370 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 5 Apr 2016 10:11:48 +0200 Subject: [PATCH 20/25] Runextensions/hasCallOperator: Fix build with MSVC2015 Update 2 Looks like MSVC has issues (internal compiler error) with the "templates in templates" when used from within a namespace, as well as a few other problems... Simplify the code paths for hasCallOperator. Change-Id: I934401a884398967ac95d7e218525cc316d9000a Reviewed-by: Maurice Kalinowski Reviewed-by: Eike Ziller --- src/libs/utils/runextensions.h | 33 +++++++++-------- .../texteditor/generichighlighter/manager.cpp | 35 ++++++------------- .../texteditor/generichighlighter/manager.h | 12 +++---- 3 files changed, 35 insertions(+), 45 deletions(-) diff --git a/src/libs/utils/runextensions.h b/src/libs/utils/runextensions.h index bd20b862c47..c40899eb907 100644 --- a/src/libs/utils/runextensions.h +++ b/src/libs/utils/runextensions.h @@ -38,6 +38,24 @@ #include +// hasCallOperator & Co must be outside of any namespace +// because of internal compiler error with MSVC2015 Update 2 + +using testCallOperatorYes = char; +using testCallOperatorNo = struct { char foo[2]; }; + +template +static testCallOperatorYes testCallOperator(decltype(&C::operator())); + +template +static testCallOperatorNo testCallOperator(...); + +template +struct hasCallOperator +{ + static const bool value = (sizeof(testCallOperator(0)) == sizeof(testCallOperatorYes)); +}; + namespace Utils { namespace Internal { @@ -54,21 +72,6 @@ namespace Internal { a QFutureInterface& as its first parameter and returns void. */ -template -struct hasCallOperator -{ - using yes = char; - using no = struct { char foo[2]; }; - - template - static yes test(decltype(&C::operator())); - - template - static no test(...); - - static const bool value = (sizeof(test(0)) == sizeof(yes)); -}; - template struct resultType; diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index 33cb5b88a36..6f32e833b9d 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -248,35 +248,16 @@ bool Manager::isBuildingDefinition(const QString &id) const return m_isBuildingDefinition.contains(id); } -class ManagerProcessor -{ -public: - ManagerProcessor(); - // TODO: make move-only when we can require MSVC2015 +static const int kMaxProgress = 200; - void operator()(QFutureInterface &future); - - QStringList m_definitionsPaths; - static const int kMaxProgress; -}; - -const int ManagerProcessor::kMaxProgress = 200; - -ManagerProcessor::ManagerProcessor() -{ - const HighlighterSettings &settings = TextEditorSettings::highlighterSettings(); - m_definitionsPaths.append(settings.definitionFilesPath()); - if (settings.useFallbackLocation()) - m_definitionsPaths.append(settings.fallbackDefinitionFilesPath()); -} - -void ManagerProcessor::operator()(QFutureInterface &future) +static void processHighlightingFiles(QFutureInterface &future, + QStringList definitionPaths) { future.setProgressRange(0, kMaxProgress); Manager::RegisterData data; // iterate through paths in order, high priority > low priority - foreach (const QString &path, m_definitionsPaths) { + foreach (const QString &path, definitionPaths) { if (path.isEmpty()) continue; @@ -322,7 +303,13 @@ void Manager::registerHighlightingFiles() if (!m_registeringWatcher.isRunning()) { clear(); - QFuture future = Utils::runAsync(ManagerProcessor()); + QStringList definitionsPaths; + const HighlighterSettings &settings = TextEditorSettings::highlighterSettings(); + definitionsPaths.append(settings.definitionFilesPath()); + if (settings.useFallbackLocation()) + definitionsPaths.append(settings.fallbackDefinitionFilesPath()); + + QFuture future = Utils::runAsync(processHighlightingFiles, definitionsPaths); m_registeringWatcher.setFuture(future); } else { m_hasQueuedRegistration = true; diff --git a/src/plugins/texteditor/generichighlighter/manager.h b/src/plugins/texteditor/generichighlighter/manager.h index 41fa1d79f54..0a6dfeb70a2 100644 --- a/src/plugins/texteditor/generichighlighter/manager.h +++ b/src/plugins/texteditor/generichighlighter/manager.h @@ -80,6 +80,12 @@ public: static DefinitionMetaDataPtr parseMetadata(const QFileInfo &fileInfo); + struct RegisterData + { + QHash m_idByName; + QHash m_idByMimeType; + QHash m_definitionsMetaData; + }; private: void registerHighlightingFilesFinished(); void downloadAvailableDefinitionsListFinished(); @@ -100,12 +106,6 @@ private: QHash > m_definitions; QHash m_availableDefinitions; - struct RegisterData - { - QHash m_idByName; - QHash m_idByMimeType; - QHash m_definitionsMetaData; - }; RegisterData m_register; bool m_hasQueuedRegistration; QFutureWatcher m_registeringWatcher; From b0af88c0dd1b7bbe66c1c9eccb55f4bf9fd7937b Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 4 Apr 2016 13:18:14 +0200 Subject: [PATCH 21/25] Fixing crasing Timer A "raw" QObject (created instead of the Timer) will crash the engine later. Instead we setup the QObject using createPrimitive(). Task-number: QTCREATORBUG-15916 Change-Id: I5f0dd9c887fd57d492222d221e54f267e12a5044 Reviewed-by: Tim Jenssen --- .../qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp index 155aeb4aade..898170ad93c 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp @@ -217,7 +217,7 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe if (object == 0) object = new QQuickItem; } else { - object = new QObject; + object = Internal::ObjectNodeInstance::createPrimitive("QtQml/QtObject", 2, 0, nodeInstanceServer->context()); } } From 2954b19c8ae0ddd389f59c8e3d87c1886222e845 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 5 Apr 2016 13:19:12 +0200 Subject: [PATCH 22/25] Clang Static Analyzer: Fix label capitalization Use sentence style capitalization for labels. Change-Id: Ic1e160c18fc429c29003d1f27aa5100fab0752b9 Reviewed-by: Ulf Hermann Reviewed-by: Nikolai Kosjar --- .../clangstaticanalyzerprojectsettingswidget.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerprojectsettingswidget.ui b/src/plugins/clangstaticanalyzer/clangstaticanalyzerprojectsettingswidget.ui index c131bbe0c22..17977514079 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerprojectsettingswidget.ui +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerprojectsettingswidget.ui @@ -19,7 +19,7 @@ - Suppressed Diagnostics: + Suppressed diagnostics: From 4144806f23e9a40712cf773927885b5c5c614928 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 5 Apr 2016 11:52:45 +0200 Subject: [PATCH 23/25] Clang Static Analyzer: Fix capitalization of product name Change-Id: Ia8ecf8042de2d36734cf05aa502c4d2c1b44c2b4 Reviewed-by: Nikolai Kosjar --- .../clangstaticanalyzer/clangstaticanalyzerrunner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp index 00e0672d3b4..07ac8b35f80 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp @@ -39,12 +39,12 @@ static Q_LOGGING_CATEGORY(LOG, "qtc.clangstaticanalyzer.runner") static QString generalProcessError() { - return QObject::tr("An error occurred with the clang static analyzer process."); + return QObject::tr("An error occurred with the Clang Static Analyzer process."); } static QString finishedDueToCrash() { - return QObject::tr("Clang static analyzer crashed."); + return QObject::tr("Clang Static Analyzer crashed."); } static QStringList constructCommandLineArguments(const QString &filePath, @@ -66,7 +66,7 @@ namespace Internal { QString finishedWithBadExitCode(int exitCode) { - return QObject::tr("Clang static analyzer finished with exit code: %1.").arg(exitCode); + return QObject::tr("Clang Static Analyzer finished with exit code: %1.").arg(exitCode); } ClangStaticAnalyzerRunner::ClangStaticAnalyzerRunner(const QString &clangExecutable, From 3c9a893adceb524e5d6d7862eae110813ea12bc3 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 5 Apr 2016 12:58:59 +0200 Subject: [PATCH 24/25] QmlJS: do file name checks with platform independent functions this fix the polluted output while QtQuickDesigner is opened Change-Id: Icba0d76ff25ae720b5e3b3ce8cc5cecc45181241 Reviewed-by: Ulf Hermann --- src/libs/qmljs/qmljsqrcparser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/qmljs/qmljsqrcparser.cpp b/src/libs/qmljs/qmljsqrcparser.cpp index 6b07fc1d135..d312bbe6b31 100644 --- a/src/libs/qmljs/qmljsqrcparser.cpp +++ b/src/libs/qmljs/qmljsqrcparser.cpp @@ -406,8 +406,10 @@ void QrcParserPrivate::collectResourceFilesForSourceFile(const QString &sourceFi QStringList *results, const QLocale *locale) const { - QTC_CHECK(sourceFile.startsWith(QLatin1Char('/'))); - QTC_CHECK(!sourceFile.endsWith(QLatin1Char('/'))); + // TODO: use FileName from fileutils for file pathes + QTC_CHECK(QFileInfo(sourceFile).isFile()); + QTC_CHECK(QFileInfo(sourceFile).isAbsolute()); + QStringList langs = allUiLanguages(locale); SMap::const_iterator file = m_files.find(sourceFile); if (file == m_files.end()) From 1ec4bbb0297b23331389eac7a229b4312867ca53 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 5 Apr 2016 13:42:19 +0200 Subject: [PATCH 25/25] Clang Static Analyzer: Fix UI text capitalization Change-Id: I6347b455be55d34f8cd038f618326cfc6d77c582 Reviewed-by: Nikolai Kosjar --- .../clangstaticanalyzerdiagnosticmodel.cpp | 2 +- .../clangstaticanalyzer/clangstaticanalyzerdiagnosticview.cpp | 2 +- src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp | 4 ++-- src/plugins/clangstaticanalyzer/clangstaticanalyzerutils.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticmodel.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticmodel.cpp index 49b904a812c..39d1d945bfa 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticmodel.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticmodel.cpp @@ -144,7 +144,7 @@ static QString createExplainingStepToolTipString(const ExplainingStep &step) } if (!step.extendedMessage.isEmpty()) { lines << qMakePair( - QCoreApplication::translate("ClangStaticAnalyzer::ExplainingStep", "Extended Message:"), + QCoreApplication::translate("ClangStaticAnalyzer::ExplainingStep", "Extended message:"), step.extendedMessage.toHtmlEscaped()); } diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.cpp index fdd3a7aef59..e0d1b32cff5 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.cpp @@ -44,7 +44,7 @@ namespace Internal { ClangStaticAnalyzerDiagnosticView::ClangStaticAnalyzerDiagnosticView(QWidget *parent) : Debugger::DetailedErrorView(parent) { - m_suppressAction = new QAction(tr("Suppress this diagnostic"), this); + m_suppressAction = new QAction(tr("Suppress This Diagnostic"), this); connect(m_suppressAction, &QAction::triggered, [this](bool) { suppressCurrentDiagnostic(); }); } diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp index 994b507f700..a56f9a0cb25 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp @@ -120,7 +120,7 @@ ClangStaticAnalyzerTool::ClangStaticAnalyzerTool(QObject *parent) connect(action, &QAction::triggered, m_diagnosticView, &DetailedErrorView::goNext); m_goNext = action; - const QString toolTip = tr("Clang Static Analyzer uses the analyzer from the clang project " + const QString toolTip = tr("Clang Static Analyzer uses the analyzer from the Clang project " "to find bugs."); Debugger::registerPerspective(ClangStaticAnalyzerPerspectiveId, { @@ -311,7 +311,7 @@ void ClangStaticAnalyzerTool::handleStateUpdate() m_goBack->setEnabled(issuesVisible > 1); m_goNext->setEnabled(issuesVisible > 1); - QString message = m_running ? tr("Clang Static Analyzer running.") + QString message = m_running ? tr("Clang Static Analyzer is running.") : tr("Clang Static Analyzer finished."); message += QLatin1Char(' '); if (issuesFound == 0) { diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerutils.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerutils.cpp index d800af2588d..18e8544b020 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerutils.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerutils.cpp @@ -91,7 +91,7 @@ bool isClangExecutableUsable(const QString &filePath, QString *errorMessage) if (errorMessage) { *errorMessage = QCoreApplication::translate("ClangStaticAnalyzer", "The chosen file \"%1\" seems to point to an icecc binary not suitable " - "for analyzing.\nPlease set a real clang executable.") + "for analyzing.\nPlease set a real Clang executable.") .arg(filePath); } return false;