forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.1'
Change-Id: I35ef0d667c759c959edce91569f05ebc7a8ff4d8
This commit is contained in:
@@ -8,7 +8,7 @@ The standalone binary packages support the following platforms:
|
||||
|
||||
Windows 7 or later
|
||||
(K)Ubuntu Linux 14.04 (64-bit) or later
|
||||
Mac OS X 10.7 or later
|
||||
macOS 10.8 or later
|
||||
|
||||
Building the sources requires Qt 5.5.0 or later.
|
||||
|
||||
|
||||
31
dist/changes-4.0.3.md
vendored
Normal file
31
dist/changes-4.0.3.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
Qt Creator version 4.0.3 contains bug fixes.
|
||||
|
||||
The most important changes are listed in this document. For a complete
|
||||
list of changes, see the Git log for the Qt Creator sources that
|
||||
you can check out from the public Git repository. For example:
|
||||
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline v4.0.2..v4.0.3
|
||||
|
||||
All Projects
|
||||
|
||||
* Fixed disabled run button on FreeBSD and macOS 10.8
|
||||
(QTCREATORBUG-16462, QTCREATORBUG-16421)
|
||||
|
||||
QMake Projects
|
||||
|
||||
* Fixed ABI detection on NetBSD and OpenBSD
|
||||
|
||||
CMake Projects
|
||||
|
||||
* Fixed issues with opening projects from symbolic links
|
||||
|
||||
C++ Support
|
||||
|
||||
* Clang code model
|
||||
* Fixed dot-to-arrow conversion being incorrectly done for
|
||||
floating point literals and file suffixes (QTCREATORBUG-16188)
|
||||
|
||||
Test Integration
|
||||
|
||||
* Fixed crash when editing code while parsing for tests
|
||||
@@ -27,7 +27,10 @@ Module {
|
||||
property stringList llvmLibs: clangProbe.llvmLibs
|
||||
|
||||
validate: {
|
||||
if (!clangProbe.found)
|
||||
if (!clangProbe.found) {
|
||||
console.warn("Set LLVM_INSTALL_DIR to build the Clang Code Model."
|
||||
+ " For details, see doc/src/editors/creator-clang-codemodel.qdoc.");
|
||||
throw "No usable libclang found";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ Rectangle {
|
||||
|
||||
Text {
|
||||
id: text
|
||||
font.pixelSize: 11
|
||||
font.pixelSize: 9
|
||||
elide: Text.ElideMiddle
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.top: itemIcon.bottom
|
||||
|
||||
@@ -67,12 +67,12 @@ ScrollView {
|
||||
property color backgroundColor: "#4f4f4f"
|
||||
property color lighterBackgroundColor: "#5f5f5f"
|
||||
|
||||
property int textWidth: 55
|
||||
property int textHeight: 26
|
||||
property int textWidth: 58
|
||||
property int textHeight: 22
|
||||
|
||||
property int cellHorizontalMargin: 5
|
||||
property int cellVerticalSpacing: 3
|
||||
property int cellVerticalMargin: 7
|
||||
property int cellHorizontalMargin: 1
|
||||
property int cellVerticalSpacing: 2
|
||||
property int cellVerticalMargin: 4
|
||||
|
||||
// the following depend on the actual shape of the item delegate
|
||||
property int cellWidth: textWidth + 2 * cellHorizontalMargin
|
||||
@@ -117,13 +117,6 @@ ScrollView {
|
||||
height: styleConstants.cellHeight
|
||||
}
|
||||
}
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
properties: "x, y";
|
||||
easing.type: Easing.OutQuart
|
||||
duration: 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ RowLayout {
|
||||
|
||||
signal targetChanged
|
||||
|
||||
property bool verticalAnchor: true
|
||||
property bool verticalAnchor
|
||||
|
||||
property bool invertRelativeTargets: false
|
||||
|
||||
@@ -56,6 +56,8 @@ RowLayout {
|
||||
signal centerButtonClicked
|
||||
signal oppositeEdgeButtonClicked
|
||||
|
||||
property alias buttonRow: buttonRow
|
||||
|
||||
|
||||
IconLabel {
|
||||
id: icon
|
||||
@@ -71,7 +73,7 @@ RowLayout {
|
||||
text: qsTr("Target")
|
||||
color: "#eee"
|
||||
elide: Text.ElideRight
|
||||
Layout.minimumWidth: Math.min(60, preferredWidth + 10)
|
||||
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
||||
}
|
||||
|
||||
TargetComboBox {
|
||||
@@ -85,7 +87,7 @@ RowLayout {
|
||||
text: "Margin"
|
||||
color: "#eee"
|
||||
elide: Text.ElideRight
|
||||
Layout.minimumWidth: Math.min(60, preferredWidth + 10)
|
||||
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
@@ -49,7 +49,7 @@ Section {
|
||||
}
|
||||
|
||||
AnchorRow {
|
||||
enabled: anchorBackend.topAnchored;
|
||||
visible: anchorBackend.topAnchored;
|
||||
iconSource: "../HelperWidgets/images/anchor-top.png"
|
||||
anchorMargin: backendValues.anchors_topMargin
|
||||
targetName: anchorBackend.topTarget
|
||||
@@ -72,7 +72,7 @@ Section {
|
||||
}
|
||||
|
||||
AnchorRow {
|
||||
enabled: anchorBackend.bottomAnchored;
|
||||
visible: anchorBackend.bottomAnchored;
|
||||
iconSource: "../HelperWidgets/images/anchor-bottom.png"
|
||||
anchorMargin: backendValues.anchors_bottomMargin
|
||||
targetName: anchorBackend.bottomTarget
|
||||
@@ -96,7 +96,7 @@ Section {
|
||||
}
|
||||
|
||||
AnchorRow {
|
||||
enabled: anchorBackend.leftAnchored;
|
||||
visible: anchorBackend.leftAnchored;
|
||||
iconSource: "../HelperWidgets/images/anchor-left.png"
|
||||
anchorMargin: backendValues.anchors_leftMargin
|
||||
targetName: anchorBackend.leftTarget
|
||||
@@ -119,7 +119,7 @@ Section {
|
||||
}
|
||||
|
||||
AnchorRow {
|
||||
enabled: anchorBackend.rightAnchored;
|
||||
visible: anchorBackend.rightAnchored;
|
||||
iconSource: "../HelperWidgets/images/anchor-right.png"
|
||||
anchorMargin: backendValues.anchors_rightMargin
|
||||
targetName: anchorBackend.rightTarget
|
||||
@@ -144,26 +144,28 @@ Section {
|
||||
|
||||
AnchorRow {
|
||||
showAlternativeTargets: false
|
||||
enabled: anchorBackend.horizontalCentered;
|
||||
visible: anchorBackend.horizontalCentered;
|
||||
iconSource: "../HelperWidgets/images/anchor-horizontal.png"
|
||||
anchorMargin: backendValues.anchors_horizontalCenterOffset
|
||||
targetName: anchorBackend.horizontalTarget
|
||||
onTargetChanged: {
|
||||
anchorBackend.horizontalTarget = currentText
|
||||
}
|
||||
verticalAnchor: true
|
||||
verticalAnchor: false
|
||||
buttonRow.visible: false
|
||||
}
|
||||
|
||||
AnchorRow {
|
||||
showAlternativeTargets: false
|
||||
enabled: anchorBackend.verticalCentered;
|
||||
visible: anchorBackend.verticalCentered;
|
||||
iconSource: "../HelperWidgets/images/anchor-vertical.png"
|
||||
anchorMargin: backendValues.anchors_verticalCenterOffset
|
||||
targetName: anchorBackend.verticalTarget
|
||||
onTargetChanged: {
|
||||
anchorBackend.verticalTarget = currentText
|
||||
}
|
||||
verticalAnchor: false
|
||||
verticalAnchor: true
|
||||
buttonRow.visible: false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -105,12 +105,14 @@ Rectangle {
|
||||
|
||||
Item {
|
||||
id: stateImageArea
|
||||
anchors.topMargin: 1
|
||||
anchors.topMargin: 4
|
||||
anchors.left: stateNameField.left
|
||||
anchors.top: stateNameField.bottom
|
||||
|
||||
height: delegateStateImageSize + 2
|
||||
width: delegateStateImageSize + 2
|
||||
|
||||
visible: expanded
|
||||
Rectangle {
|
||||
anchors.margins: -1
|
||||
anchors.fill: stateImage
|
||||
|
||||
@@ -31,7 +31,7 @@ import "../common"
|
||||
FocusScope {
|
||||
id: root
|
||||
|
||||
height: expanded ? 136 : 32
|
||||
height: expanded ? 136 : 30
|
||||
signal createNewState
|
||||
signal deleteState(int internalNodeId)
|
||||
signal duplicateCurrentState
|
||||
@@ -39,7 +39,7 @@ FocusScope {
|
||||
property int stateImageSize: 100
|
||||
property int delegateWidth: stateImageSize + 10
|
||||
property int padding: 2
|
||||
property int delegateHeight: root.height - padding * 2
|
||||
property int delegateHeight: root.height - padding * 2 + 1
|
||||
property int innerSpacing: -1
|
||||
property int currentStateInternalId : 0
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import QtQuick 1.1
|
||||
|
||||
Item {
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ ],
|
||||
"id": "Q.Qml.1",
|
||||
"category": "R.Qt",
|
||||
"trDescription": "Creates a QML file with boilerplate code, starting with \"import QtQuick 1.1\".",
|
||||
"trDisplayName": "QML File (Qt Quick 1)",
|
||||
"trDisplayCategory": "Qt",
|
||||
"icon": "../../global/genericfilewizard.png",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
|
||||
|
||||
"pages" :
|
||||
[
|
||||
{
|
||||
"trDisplayName": "Location",
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "File"
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Project Management",
|
||||
"trShortTitle": "Summary",
|
||||
"typeId": "Summary"
|
||||
}
|
||||
],
|
||||
"generators" :
|
||||
[
|
||||
{
|
||||
"typeId": "File",
|
||||
"data":
|
||||
{
|
||||
"source": "file.qml.tpl",
|
||||
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-qml')}')}",
|
||||
"openInEditor": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,8 +4,6 @@ QtcProduct {
|
||||
Depends { name: "bundle" }
|
||||
Depends { name: "ib"; condition: qbs.targetOS.contains("osx") }
|
||||
|
||||
bundle.infoPlistFile: "Info.plist" // TODO: Remove for qbs 1.6
|
||||
|
||||
Properties {
|
||||
condition: qbs.targetOS.contains("osx")
|
||||
ib.appIconName: "qtcreator"
|
||||
@@ -38,7 +36,7 @@ QtcProduct {
|
||||
Depends { name: "ExtensionSystem" }
|
||||
|
||||
files: [
|
||||
// TODO: Uncomment for qbs 1.6 "Info.plist",
|
||||
"Info.plist",
|
||||
"main.cpp",
|
||||
"qtcreator.xcassets",
|
||||
"qtcreator.rc",
|
||||
|
||||
@@ -4,12 +4,16 @@ import qbs.TextFile
|
||||
Product {
|
||||
name: "app_version_header"
|
||||
type: "hpp"
|
||||
files: "app_version.h.in"
|
||||
|
||||
Group {
|
||||
files: ["app_version.h.in"]
|
||||
fileTags: ["hpp.in"]
|
||||
}
|
||||
|
||||
Depends { name: "qtc" }
|
||||
|
||||
Transformer {
|
||||
inputs: ["app_version.h.in"]
|
||||
Rule {
|
||||
inputs: ["hpp.in"]
|
||||
Artifact {
|
||||
filePath: "app/app_version.h"
|
||||
fileTags: "hpp"
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "qmt/model/mdiagram.h"
|
||||
#include "qmt/model/mrelation.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace qmt {
|
||||
|
||||
class DiagramController::Clone
|
||||
@@ -166,6 +168,7 @@ private:
|
||||
emit diagramController->endUpdateElement(row, diagram);
|
||||
}
|
||||
diagramController->diagramModified(diagram);
|
||||
diagramController->verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
DiagramController::UpdateAction m_updateAction = DiagramController::UpdateMajor;
|
||||
@@ -208,6 +211,7 @@ protected:
|
||||
}
|
||||
if (removed)
|
||||
diagramController->diagramModified(diagram);
|
||||
diagramController->verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void insert()
|
||||
@@ -227,6 +231,7 @@ protected:
|
||||
}
|
||||
if (inserted)
|
||||
diagramController->diagramModified(diagram);
|
||||
diagramController->verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
QList<DiagramController::Clone> m_clonedElements;
|
||||
@@ -398,6 +403,7 @@ void DiagramController::addElement(DElement *element, MDiagram *diagram)
|
||||
diagram->addDiagramElement(element);
|
||||
emit endInsertElement(row, diagram);
|
||||
diagramModified(diagram);
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::removeElement(DElement *element, MDiagram *diagram)
|
||||
@@ -413,6 +419,7 @@ void DiagramController::removeElement(DElement *element, MDiagram *diagram)
|
||||
diagram->removeDiagramElement(element);
|
||||
emit endRemoveElement(row, diagram);
|
||||
diagramModified(diagram);
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
DElement *DiagramController::findElement(const Uid &key, const MDiagram *diagram) const
|
||||
@@ -452,6 +459,7 @@ void DiagramController::finishUpdateElement(DElement *element, MDiagram *diagram
|
||||
emit endUpdateElement(diagram->diagramElements().indexOf(element), diagram);
|
||||
if (!cancelled)
|
||||
diagramModified(diagram);
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::breakUndoChain()
|
||||
@@ -540,6 +548,7 @@ void DiagramController::pasteElements(const DContainer &diagramContainer, MDiagr
|
||||
diagramModified(diagram);
|
||||
if (m_undoController)
|
||||
m_undoController->endMergeSequence();
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::deleteElements(const DSelection &diagramSelection, MDiagram *diagram)
|
||||
@@ -570,6 +579,7 @@ void DiagramController::onEndResetModel()
|
||||
updateElementFromModel(element, diagram, false);
|
||||
}
|
||||
emit endResetAllDiagrams();
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::onBeginUpdateObject(int row, const MObject *parent)
|
||||
@@ -601,6 +611,7 @@ void DiagramController::onEndUpdateObject(int row, const MObject *parent)
|
||||
}
|
||||
}
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::onBeginInsertObject(int row, const MObject *owner)
|
||||
@@ -618,6 +629,7 @@ void DiagramController::onEndInsertObject(int row, const MObject *owner)
|
||||
QMT_CHECK(!m_allDiagrams.contains(modelDiagram));
|
||||
m_allDiagrams.append(modelDiagram);
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::onBeginRemoveObject(int row, const MObject *parent)
|
||||
@@ -654,6 +666,7 @@ void DiagramController::onEndMoveObject(int row, const MObject *owner)
|
||||
updateElementFromModel(diagramElement, modelDiagram, false);
|
||||
emit endResetDiagram(modelDiagram);
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::onBeginUpdateRelation(int row, const MObject *owner)
|
||||
@@ -673,6 +686,7 @@ void DiagramController::onEndUpdateRelation(int row, const MObject *owner)
|
||||
updateElementFromModel(relation, diagram, true);
|
||||
}
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::onBeginRemoveRelation(int row, const MObject *owner)
|
||||
@@ -733,6 +747,7 @@ void DiagramController::deleteElements(const DSelection &diagramSelection, MDiag
|
||||
diagramModified(diagram);
|
||||
if (m_undoController)
|
||||
m_undoController->endMergeSequence();
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
DElement *DiagramController::findElementOnAnyDiagram(const Uid &uid)
|
||||
@@ -772,6 +787,7 @@ void DiagramController::removeObjects(MObject *modelObject)
|
||||
removeElement(element, diagram);
|
||||
}
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::removeRelations(MRelation *modelRelation)
|
||||
@@ -781,6 +797,7 @@ void DiagramController::removeRelations(MRelation *modelRelation)
|
||||
if (diagramElement)
|
||||
removeElement(diagramElement, diagram);
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::removeRelations(DElement *element, MDiagram *diagram)
|
||||
@@ -795,6 +812,7 @@ void DiagramController::removeRelations(DElement *element, MDiagram *diagram)
|
||||
}
|
||||
}
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,6 +865,7 @@ void DiagramController::updateElementFromModel(DElement *element, const MDiagram
|
||||
} else {
|
||||
melement->accept(&visitor);
|
||||
}
|
||||
verifyDiagramsIntegrity();
|
||||
}
|
||||
|
||||
void DiagramController::diagramModified(MDiagram *diagram)
|
||||
@@ -897,4 +916,51 @@ void DiagramController::updateAllDiagramsList()
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramController::verifyDiagramsIntegrity()
|
||||
{
|
||||
static const bool debugDiagramsIntegrity = false;
|
||||
if (debugDiagramsIntegrity) {
|
||||
QList<MDiagram *> allDiagrams;
|
||||
if (m_modelController && m_modelController->rootPackage()) {
|
||||
FindDiagramsVisitor visitor(&allDiagrams);
|
||||
m_modelController->rootPackage()->accept(&visitor);
|
||||
}
|
||||
QMT_CHECK(allDiagrams == m_allDiagrams);
|
||||
foreach (const MDiagram *diagram, allDiagrams)
|
||||
verifyDiagramIntegrity(diagram);
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramController::verifyDiagramIntegrity(const MDiagram *diagram)
|
||||
{
|
||||
QHash<Uid, const DElement *> delementsMap;
|
||||
foreach (const DElement *delement, diagram->diagramElements()) {
|
||||
delementsMap.insert(delement->uid(), delement);
|
||||
if (dynamic_cast<const DObject *>(delement) != 0 || dynamic_cast<const DRelation *>(delement) != 0) {
|
||||
QMT_CHECK(delement->modelUid().isValid());
|
||||
QMT_CHECK(m_modelController->findElement(delement->modelUid()) != 0);
|
||||
if (!delement->modelUid().isValid() || m_modelController->findElement(delement->modelUid()) == 0) {
|
||||
if (const DObject *dobject = dynamic_cast<const DObject *>(delement))
|
||||
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": object" << dobject->name() << dobject->uid().toString() << "has invalid reference to model element.";
|
||||
else if (const DRelation *drelation = dynamic_cast<const DRelation *>(delement))
|
||||
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": relation" << drelation->uid().toString() << "has invalid refeference to model element.";
|
||||
}
|
||||
} else {
|
||||
QMT_CHECK(!delement->modelUid().isValid());
|
||||
}
|
||||
}
|
||||
foreach (const DElement *delement, diagram->diagramElements()) {
|
||||
if (const DRelation *drelation = dynamic_cast<const DRelation *>(delement)) {
|
||||
QMT_CHECK(drelation->endAUid().isValid());
|
||||
QMT_CHECK(delementsMap.contains(drelation->endAUid()));
|
||||
if (!drelation->endAUid().isValid() || !delementsMap.contains(drelation->endAUid()))
|
||||
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": relation" << drelation->uid().toString() << "has invalid end A.";
|
||||
QMT_CHECK(drelation->endBUid().isValid());
|
||||
QMT_CHECK(delementsMap.contains(drelation->endBUid()));
|
||||
if (!drelation->endBUid().isValid() || !delementsMap.contains(drelation->endBUid()))
|
||||
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": relation" << drelation->uid().toString() << "has invalid end B.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace qmt
|
||||
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
void setModelController(ModelController *modelController);
|
||||
UndoController *undoController() const { return m_undoController; }
|
||||
void setUndoController(UndoController *undoController);
|
||||
QList<MDiagram *> allDiagrams() const { return m_allDiagrams; }
|
||||
|
||||
private:
|
||||
MDiagram *findDiagram(const Uid &diagramKey) const;
|
||||
@@ -163,6 +164,9 @@ private:
|
||||
|
||||
void updateAllDiagramsList();
|
||||
|
||||
void verifyDiagramsIntegrity();
|
||||
void verifyDiagramIntegrity(const MDiagram *diagram);
|
||||
|
||||
ModelController *m_modelController;
|
||||
UndoController *m_undoController;
|
||||
QList<MDiagram *> m_allDiagrams;
|
||||
|
||||
@@ -814,7 +814,7 @@ void DiagramSceneModel::onSelectionChanged()
|
||||
QMT_CHECK(endBObject);
|
||||
QGraphicsItem *endBItem = m_elementToItemMap.value(endBObject);
|
||||
QMT_CHECK(endBItem);
|
||||
if (!relationItem->isSelected()
|
||||
if (relationItem && !relationItem->isSelected()
|
||||
&& (m_selectedItems.contains(endAItem) || newSecondarySelectedItems.contains(endAItem))
|
||||
&& (m_selectedItems.contains(endBItem) || newSecondarySelectedItems.contains(endBItem))) {
|
||||
QMT_CHECK(!m_selectedItems.contains(relationItem));
|
||||
|
||||
@@ -68,8 +68,10 @@ public:
|
||||
{
|
||||
DObject *baseObject = m_diagramSceneModel->diagramController()->findElement<DObject>(inheritance->base(), m_diagramSceneModel->diagram());
|
||||
QMT_CHECK(baseObject);
|
||||
bool baseIsInterface = baseObject->stereotypes().contains(QStringLiteral("interface"));
|
||||
bool baseIsInterface = false;
|
||||
bool lollipopDisplay = false;
|
||||
if (baseObject) {
|
||||
baseIsInterface = baseObject->stereotypes().contains(QStringLiteral("interface"));
|
||||
if (baseIsInterface) {
|
||||
StereotypeDisplayVisitor stereotypeDisplayVisitor;
|
||||
stereotypeDisplayVisitor.setModelController(m_diagramSceneModel->diagramSceneController()->modelController());
|
||||
@@ -77,6 +79,7 @@ public:
|
||||
baseObject->accept(&stereotypeDisplayVisitor);
|
||||
lollipopDisplay = stereotypeDisplayVisitor.stereotypeDisplay() == DObject::StereotypeIcon;
|
||||
}
|
||||
}
|
||||
if (lollipopDisplay) {
|
||||
m_arrow->setShaft(ArrowItem::ShaftSolid);
|
||||
m_arrow->setEndHead(ArrowItem::HeadNone);
|
||||
@@ -484,6 +487,7 @@ QPointF RelationItem::calcEndPoint(const Uid &end, const Uid &otherEnd, int near
|
||||
} else {
|
||||
DObject *endOtherObject = m_diagramSceneModel->diagramController()->findElement<DObject>(otherEnd, m_diagramSceneModel->diagram());
|
||||
QMT_CHECK(endOtherObject);
|
||||
if (endOtherObject)
|
||||
otherEndPos = endOtherObject->pos();
|
||||
}
|
||||
return calcEndPoint(end, otherEndPos, nearestIntermediatePointIndex);
|
||||
|
||||
@@ -724,8 +724,18 @@ bool DiagramSceneController::relocateRelationEnd(DRelation *relation, DObject *t
|
||||
MObject *currentTargetMObject = m_modelController->findObject((modelRelation->*endUid)());
|
||||
QMT_CHECK(currentTargetMObject);
|
||||
m_modelController->undoController()->beginMergeSequence(tr("Relocate Relation"));
|
||||
// move relation into new target if it was a child of the old target
|
||||
if (currentTargetMObject == modelRelation->owner())
|
||||
m_modelController->moveRelation(targetMObject, modelRelation);
|
||||
// remove relation on all diagrams where the new targe element does not exist
|
||||
foreach (MDiagram *diagram, m_diagramController->allDiagrams()) {
|
||||
if (DElement *diagramRelation = m_diagramController->findDelegate(modelRelation, diagram)) {
|
||||
if (!m_diagramController->findDelegate(targetMObject, diagram)) {
|
||||
m_diagramController->removeElement(diagramRelation, diagram);
|
||||
}
|
||||
}
|
||||
}
|
||||
// update end of relation
|
||||
m_modelController->startUpdateRelation(modelRelation);
|
||||
(modelRelation->*setEndUid)(targetMObject->uid());
|
||||
m_modelController->finishUpdateRelation(modelRelation, false);
|
||||
|
||||
@@ -821,7 +821,8 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
|
||||
const QString typeName = getRightMostIdentifier(typeId)->name.toString();
|
||||
|
||||
if (!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("State")
|
||||
&& typeId->name.toString() != "PropertyChanges")
|
||||
&& typeId->name.toString() != "PropertyChanges"
|
||||
&& typeId->name.toString() != "StateChangeScript")
|
||||
addMessage(StateCannotHaveChildItem, typeErrorLocation, typeName);
|
||||
|
||||
if (checkTypeForDesignerSupport(typeId))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "stringutils.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
@@ -149,7 +150,7 @@ std::string wStringToString(const std::wstring &w)
|
||||
}
|
||||
|
||||
// Convert an ASCII hex digit to its value 'A'->10
|
||||
inline unsigned hexDigit(char c)
|
||||
static inline unsigned hexDigit(char c)
|
||||
{
|
||||
if (c <= '9')
|
||||
return c - '0';
|
||||
@@ -223,15 +224,19 @@ std::string dumpMemory(const unsigned char *p, size_t size,
|
||||
switch (u) {
|
||||
case '\t':
|
||||
str << "\\t";
|
||||
break;
|
||||
case '\r':
|
||||
str << "\\r";
|
||||
break;
|
||||
case '\n':
|
||||
str << "\\n";
|
||||
break;
|
||||
default:
|
||||
if (u >= 32 && u < 128)
|
||||
str << (char(u));
|
||||
else
|
||||
str << '\\' << std::setw(3) << unsigned(u);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (wantQuotes)
|
||||
|
||||
@@ -47,11 +47,7 @@ public:
|
||||
|
||||
Q_INVOKABLE void selectNextFromSelectionId(int selectionId);
|
||||
Q_INVOKABLE void selectPrevFromSelectionId(int selectionId);
|
||||
|
||||
// TODO: We could add some Q_INVOKABLE functions to enable or disable render passes when the the
|
||||
// need arises.
|
||||
|
||||
void clearData();
|
||||
Q_INVOKABLE void clearData();
|
||||
|
||||
protected:
|
||||
virtual QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData);
|
||||
|
||||
@@ -79,13 +79,11 @@ public:
|
||||
void setBuildTargetSdk(const QString &sdk);
|
||||
|
||||
virtual Utils::FileName androidPackageSourceDir() const = 0;
|
||||
public slots:
|
||||
void setDeployAction(AndroidDeployAction deploy);
|
||||
|
||||
protected slots:
|
||||
void showInGraphicalShell();
|
||||
|
||||
protected:
|
||||
Q_INVOKABLE void showInGraphicalShell();
|
||||
|
||||
AndroidBuildApkStep(ProjectExplorer::BuildStepList *bc,
|
||||
AndroidBuildApkStep *other);
|
||||
bool keystorePassword();
|
||||
|
||||
@@ -96,37 +96,47 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
|
||||
m_ui->openPackageLocationCheckBox->setChecked(m_step->openPackageLocation());
|
||||
|
||||
// target sdk
|
||||
connect(m_ui->targetSDKComboBox, SIGNAL(activated(QString)), SLOT(setTargetSdk(QString)));
|
||||
connect(m_ui->targetSDKComboBox,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
|
||||
this, &AndroidBuildApkWidget::setTargetSdk);
|
||||
|
||||
// deployment options
|
||||
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
|
||||
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
|
||||
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
|
||||
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
|
||||
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
|
||||
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
|
||||
connect(m_ui->ministroOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::setMinistro);
|
||||
connect(m_ui->temporaryQtOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::setDeployLocalQtLibs);
|
||||
connect(m_ui->bundleQtOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::setBundleQtLibs);
|
||||
connect(m_ui->ministroOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
|
||||
connect(m_ui->temporaryQtOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
|
||||
connect(m_ui->bundleQtOption, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
|
||||
|
||||
connect(m_ui->useGradleCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(useGradleCheckBoxToggled(bool)));
|
||||
connect(m_ui->openPackageLocationCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(openPackageLocationCheckBoxToggled(bool)));
|
||||
connect(m_ui->verboseOutputCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(verboseOutputCheckBoxToggled(bool)));
|
||||
connect(m_ui->useGradleCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidBuildApkWidget::useGradleCheckBoxToggled);
|
||||
connect(m_ui->openPackageLocationCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidBuildApkWidget::openPackageLocationCheckBoxToggled);
|
||||
connect(m_ui->verboseOutputCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidBuildApkWidget::verboseOutputCheckBoxToggled);
|
||||
|
||||
//signing
|
||||
connect(m_ui->signPackageCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(signPackageCheckBoxToggled(bool)));
|
||||
connect(m_ui->KeystoreCreatePushButton, SIGNAL(clicked()),
|
||||
this, SLOT(createKeyStore()));
|
||||
connect(m_ui->KeystoreLocationPathChooser, SIGNAL(pathChanged(QString)),
|
||||
SLOT(updateKeyStorePath(QString)));
|
||||
connect(m_ui->certificatesAliasComboBox, SIGNAL(activated(QString)),
|
||||
this, SLOT(certificatesAliasComboBoxActivated(QString)));
|
||||
connect(m_ui->certificatesAliasComboBox, SIGNAL(currentIndexChanged(QString)),
|
||||
this, SLOT(certificatesAliasComboBoxCurrentIndexChanged(QString)));
|
||||
connect(m_ui->signPackageCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidBuildApkWidget::signPackageCheckBoxToggled);
|
||||
connect(m_ui->KeystoreCreatePushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidBuildApkWidget::createKeyStore);
|
||||
connect(m_ui->KeystoreLocationPathChooser, &Utils::PathChooser::pathChanged,
|
||||
this, &AndroidBuildApkWidget::updateKeyStorePath);
|
||||
connect(m_ui->certificatesAliasComboBox,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
|
||||
this, &AndroidBuildApkWidget::certificatesAliasComboBoxActivated);
|
||||
connect(m_ui->certificatesAliasComboBox,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
this, &AndroidBuildApkWidget::certificatesAliasComboBoxCurrentIndexChanged);
|
||||
|
||||
connect(m_step->buildConfiguration(), SIGNAL(buildTypeChanged()),
|
||||
this, SLOT(updateSigningWarning()));
|
||||
connect(m_step->buildConfiguration(), &ProjectExplorer::BuildConfiguration::buildTypeChanged,
|
||||
this, &AndroidBuildApkWidget::updateSigningWarning);
|
||||
|
||||
updateSigningWarning();
|
||||
updateDebugDeploySigningWarning();
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
AndroidBuildApkWidget(AndroidBuildApkStep *step);
|
||||
~AndroidBuildApkWidget();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void setTargetSdk(const QString &sdk);
|
||||
void setMinistro();
|
||||
void setDeployLocalQtLibs();
|
||||
@@ -65,7 +65,6 @@ private slots:
|
||||
void updateKeyStorePath(const QString &path);
|
||||
void signPackageCheckBoxToggled(bool checked);
|
||||
|
||||
private:
|
||||
virtual QString summaryText() const;
|
||||
virtual QString displayName() const;
|
||||
void setCertificates();
|
||||
|
||||
@@ -776,7 +776,8 @@ QString AndroidConfig::startAVD(const QString &name) const
|
||||
bool AndroidConfig::startAVDAsync(const QString &avdName) const
|
||||
{
|
||||
QProcess *avdProcess = new QProcess();
|
||||
avdProcess->connect(avdProcess, SIGNAL(finished(int)), avdProcess, SLOT(deleteLater()));
|
||||
QObject::connect(avdProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
|
||||
avdProcess, &QObject::deleteLater);
|
||||
|
||||
// start the emulator
|
||||
QStringList arguments;
|
||||
|
||||
@@ -224,7 +224,6 @@ public:
|
||||
static AndroidDeviceInfo showDeviceDialog(ProjectExplorer::Project *project, int apiLevel, const QString &abi, Options options);
|
||||
static void setDefaultDevice(ProjectExplorer::Project *project, const QString &abi, const QString &serialNumber); // serial number or avd name
|
||||
static QString defaultDevice(ProjectExplorer::Project *project, const QString &abi); // serial number or avd name
|
||||
public slots:
|
||||
static void clearDefaultDevices(ProjectExplorer::Project *project);
|
||||
static void registerNewToolChains();
|
||||
static void removeOldToolChains();
|
||||
|
||||
@@ -39,12 +39,18 @@ AndroidCreateKeystoreCertificate::AndroidCreateKeystoreCertificate(QWidget *pare
|
||||
ui(new Ui::AndroidCreateKeystoreCertificate)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->keystorePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkKeystorePassword()));
|
||||
connect(ui->keystoreRetypePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkKeystorePassword()));
|
||||
connect(ui->certificatePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificatePassword()));
|
||||
connect(ui->certificateRetypePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificatePassword()));
|
||||
connect(ui->certificateAliasLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificateAlias()));
|
||||
connect(ui->countryLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCountryCode()));
|
||||
connect(ui->keystorePassLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkKeystorePassword);
|
||||
connect(ui->keystoreRetypePassLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkKeystorePassword);
|
||||
connect(ui->certificatePassLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkCertificatePassword);
|
||||
connect(ui->certificateRetypePassLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkCertificatePassword);
|
||||
connect(ui->certificateAliasLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkCertificateAlias);
|
||||
connect(ui->countryLineEdit, &QLineEdit::textChanged,
|
||||
this, &AndroidCreateKeystoreCertificate::checkCountryCode);
|
||||
}
|
||||
|
||||
AndroidCreateKeystoreCertificate::~AndroidCreateKeystoreCertificate()
|
||||
|
||||
@@ -54,11 +54,13 @@ public:
|
||||
QString certificateAlias();
|
||||
QString certificatePassword();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
PasswordStatus checkKeystorePassword();
|
||||
PasswordStatus checkCertificatePassword();
|
||||
bool checkCertificateAlias();
|
||||
bool checkCountryCode();
|
||||
|
||||
private slots:
|
||||
void on_keystoreShowPassCheckBox_stateChanged(int state);
|
||||
void on_certificateShowPassCheckBox_stateChanged(int state);
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
@@ -77,7 +77,6 @@ public:
|
||||
|
||||
AndroidDeviceInfo deviceInfo() const;
|
||||
|
||||
public slots:
|
||||
void setUninstallPreviousPackage(bool uninstall);
|
||||
|
||||
signals:
|
||||
|
||||
@@ -44,11 +44,14 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step)
|
||||
|
||||
m_ui->uninstallPreviousPackage->setChecked(m_step->uninstallPreviousPackage() > AndroidDeployQtStep::Keep);
|
||||
m_ui->uninstallPreviousPackage->setEnabled(m_step->uninstallPreviousPackage() != AndroidDeployQtStep::ForceUnintall);
|
||||
connect(m_ui->installMinistroButton, SIGNAL(clicked()), SLOT(installMinistro()));
|
||||
connect(m_ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
|
||||
connect(m_ui->resetDefaultDevices, SIGNAL(clicked()), SLOT(resetDefaultDevices()));
|
||||
connect(m_ui->uninstallPreviousPackage, SIGNAL(toggled(bool)),
|
||||
m_step, SLOT(setUninstallPreviousPackage(bool)));
|
||||
connect(m_ui->installMinistroButton, &QAbstractButton::clicked,
|
||||
this, &AndroidDeployQtWidget::installMinistro);
|
||||
connect(m_ui->cleanLibsPushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidDeployQtWidget::cleanLibsOnDevice);
|
||||
connect(m_ui->resetDefaultDevices, &QAbstractButton::clicked,
|
||||
this, &AndroidDeployQtWidget::resetDefaultDevices);
|
||||
connect(m_ui->uninstallPreviousPackage, &QAbstractButton::toggled,
|
||||
m_step, &AndroidDeployQtStep::setUninstallPreviousPackage);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -46,12 +46,11 @@ public:
|
||||
AndroidDeployQtWidget(AndroidDeployQtStep *step);
|
||||
~AndroidDeployQtWidget();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void installMinistro();
|
||||
void cleanLibsOnDevice();
|
||||
void resetDefaultDevices();
|
||||
|
||||
private:
|
||||
virtual QString summaryText() const;
|
||||
virtual QString displayName() const;
|
||||
|
||||
|
||||
@@ -439,19 +439,19 @@ AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, Andro
|
||||
+ tr("No Device Found") + QLatin1String("</span></p><br/>")
|
||||
+ msgConnect() + QLatin1String("<br/>")
|
||||
+ msgAdbListDevices());
|
||||
connect(m_ui->missingLabel, SIGNAL(linkActivated(QString)),
|
||||
this, SLOT(showHelp()));
|
||||
connect(m_ui->missingLabel, &QLabel::linkActivated,
|
||||
this, &AndroidDeviceDialog::showHelp);
|
||||
|
||||
connect(m_ui->refreshDevicesButton, SIGNAL(clicked()),
|
||||
this, SLOT(refreshDeviceList()));
|
||||
connect(m_ui->refreshDevicesButton, &QAbstractButton::clicked,
|
||||
this, &AndroidDeviceDialog::refreshDeviceList);
|
||||
|
||||
connect(m_ui->createAVDButton, SIGNAL(clicked()),
|
||||
this, SLOT(createAvd()));
|
||||
connect(m_ui->deviceView, SIGNAL(doubleClicked(QModelIndex)),
|
||||
this, SLOT(accept()));
|
||||
connect(m_ui->createAVDButton, &QAbstractButton::clicked,
|
||||
this, &AndroidDeviceDialog::createAvd);
|
||||
connect(m_ui->deviceView, &QAbstractItemView::doubleClicked,
|
||||
this, &QDialog::accept);
|
||||
|
||||
connect(&m_futureWatcherAddDevice, SIGNAL(finished()),
|
||||
this, SLOT(avdAdded()));
|
||||
connect(&m_futureWatcherAddDevice, &QFutureWatcherBase::finished,
|
||||
this, &AndroidDeviceDialog::avdAdded);
|
||||
connect(&m_futureWatcherRefreshDevices, &QFutureWatcherBase::finished,
|
||||
this, &AndroidDeviceDialog::devicesRefreshed);
|
||||
|
||||
|
||||
@@ -57,13 +57,12 @@ public:
|
||||
|
||||
bool saveDeviceSelection() const;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void refreshDeviceList();
|
||||
void createAvd();
|
||||
void clickedOnView(const QModelIndex &idx);
|
||||
void showHelp();
|
||||
void avdAdded();
|
||||
private:
|
||||
void devicesRefreshed();
|
||||
void enableOkayButton();
|
||||
void defaultDeviceClear();
|
||||
|
||||
@@ -122,9 +122,11 @@ AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *
|
||||
// ToolButton with Menu, defaulting to 'Autodetect'.
|
||||
auto buttonMenu = new QMenu(m_button);
|
||||
QAction *autoDetectAction = buttonMenu->addAction(tr("Auto-detect"));
|
||||
connect(autoDetectAction, SIGNAL(triggered()), this, SLOT(autoDetectDebugger()));
|
||||
connect(autoDetectAction, &QAction::triggered,
|
||||
this, &AndroidGdbServerKitInformationWidget::autoDetectDebugger);
|
||||
QAction *changeAction = buttonMenu->addAction(tr("Edit..."));
|
||||
connect(changeAction, SIGNAL(triggered()), this, SLOT(showDialog()));
|
||||
connect(changeAction, &QAction::triggered,
|
||||
this, &AndroidGdbServerKitInformationWidget::showDialog);
|
||||
m_button->setMenu(buttonMenu);
|
||||
|
||||
refresh();
|
||||
@@ -192,8 +194,8 @@ void AndroidGdbServerKitInformationWidget::showDialog()
|
||||
layout->addLayout(formLayout);
|
||||
|
||||
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
|
||||
connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
|
||||
connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
layout->addWidget(buttonBox);
|
||||
|
||||
dialog.setWindowTitle(tr("GDB Server for \"%1\"").arg(m_kit->displayName()));
|
||||
|
||||
@@ -53,10 +53,10 @@ public:
|
||||
QWidget *mainWidget() const override;
|
||||
QWidget *buttonWidget() const override;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void autoDetectDebugger();
|
||||
void showDialog();
|
||||
private:
|
||||
|
||||
QLabel *m_label;
|
||||
QPushButton *m_button;
|
||||
};
|
||||
|
||||
@@ -316,7 +316,8 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
|
||||
QProcess *process = new QProcess();
|
||||
QStringList arguments = AndroidDeviceInfo::adbSelector(deviceSerialNumber);
|
||||
arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt");
|
||||
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
|
||||
QObject::connect(process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
|
||||
process, &QObject::deleteLater);
|
||||
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString();
|
||||
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1Char(' ')));
|
||||
process->start(adb, arguments);
|
||||
|
||||
@@ -43,8 +43,8 @@ AndroidManifestDocument::AndroidManifestDocument(AndroidManifestEditorWidget *ed
|
||||
setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
|
||||
setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
|
||||
setSuspendAllowed(false);
|
||||
connect(editorWidget, SIGNAL(guiChanged()),
|
||||
this, SIGNAL(changed()));
|
||||
connect(editorWidget, &AndroidManifestEditorWidget::guiChanged,
|
||||
this, &Core::IDocument::changed);
|
||||
}
|
||||
|
||||
bool AndroidManifestDocument::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
|
||||
@@ -42,7 +42,8 @@ AndroidManifestEditor::AndroidManifestEditor(AndroidManifestEditorWidget *editor
|
||||
{
|
||||
m_toolBar = new QToolBar(editorWidget);
|
||||
m_actionGroup = new QActionGroup(this);
|
||||
connect(m_actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(changeEditorPage(QAction*)));
|
||||
connect(m_actionGroup, &QActionGroup::triggered,
|
||||
this, &AndroidManifestEditor::changeEditorPage);
|
||||
|
||||
QAction *generalAction = m_toolBar->addAction(tr("General"));
|
||||
generalAction->setData(AndroidManifestEditorWidget::General);
|
||||
|
||||
@@ -57,10 +57,9 @@ public:
|
||||
int currentColumn() const override;
|
||||
void gotoLine(int line, int column = 0, bool centerLine = true) override;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void changeEditorPage(QAction *action);
|
||||
|
||||
private:
|
||||
QString m_displayName;
|
||||
QToolBar *m_toolBar;
|
||||
QActionGroup *m_actionGroup;
|
||||
|
||||
@@ -112,11 +112,11 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget()
|
||||
|
||||
m_editor = new AndroidManifestEditor(this);
|
||||
|
||||
connect(&m_timerParseCheck, SIGNAL(timeout()),
|
||||
this, SLOT(delayedParseCheck()));
|
||||
connect(&m_timerParseCheck, &QTimer::timeout,
|
||||
this, &AndroidManifestEditorWidget::delayedParseCheck);
|
||||
|
||||
connect(m_textEditorWidget->document(), SIGNAL(contentsChanged()),
|
||||
this, SLOT(startParseCheck()));
|
||||
connect(m_textEditorWidget->document(), &QTextDocument::contentsChanged,
|
||||
this, &AndroidManifestEditorWidget::startParseCheck);
|
||||
connect(m_textEditorWidget->textDocument(), &TextEditor::TextDocument::reloadFinished,
|
||||
this, [this](bool success) { if (success) updateAfterFileLoad(); });
|
||||
connect(m_textEditorWidget->textDocument(), &TextEditor::TextDocument::openFinishedSuccessfully,
|
||||
@@ -137,6 +137,7 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
QGroupBox *packageGroupBox = new QGroupBox(mainWidget);
|
||||
topLayout->addWidget(packageGroupBox);
|
||||
|
||||
auto setDirtyFunc = [this] { setDirty(); };
|
||||
packageGroupBox->setTitle(tr("Package"));
|
||||
{
|
||||
QFormLayout *formLayout = new QFormLayout();
|
||||
@@ -201,16 +202,18 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
|
||||
updateSdkVersions();
|
||||
|
||||
connect(m_packageNameLineEdit, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(setPackageName()));
|
||||
connect(m_versionCode, SIGNAL(valueChanged(int)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_versionNameLinedit, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_androidMinSdkVersion, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_androidTargetSdkVersion, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_packageNameLineEdit, &QLineEdit::textEdited,
|
||||
this, &AndroidManifestEditorWidget::setPackageName);
|
||||
connect(m_versionCode, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||
this, &AndroidManifestEditorWidget::setDirty);
|
||||
connect(m_versionNameLinedit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_androidMinSdkVersion,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, setDirtyFunc);
|
||||
connect(m_androidTargetSdkVersion,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, setDirtyFunc);
|
||||
|
||||
}
|
||||
|
||||
@@ -261,16 +264,19 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
|
||||
applicationGroupBox->setLayout(formLayout);
|
||||
|
||||
connect(m_appNameLineEdit, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_activityNameLineEdit, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_targetLineEdit, SIGNAL(currentTextChanged(QString)),
|
||||
this, SLOT(setDirty()));
|
||||
connect(m_appNameLineEdit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_activityNameLineEdit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_targetLineEdit, &QComboBox::currentTextChanged,
|
||||
this, setDirtyFunc);
|
||||
|
||||
connect(m_lIconButton, SIGNAL(clicked()), SLOT(setLDPIIcon()));
|
||||
connect(m_mIconButton, SIGNAL(clicked()), SLOT(setMDPIIcon()));
|
||||
connect(m_hIconButton, SIGNAL(clicked()), SLOT(setHDPIIcon()));
|
||||
connect(m_lIconButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::setLDPIIcon);
|
||||
connect(m_mIconButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::setMDPIIcon);
|
||||
connect(m_hIconButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::setHDPIIcon);
|
||||
}
|
||||
|
||||
|
||||
@@ -443,17 +449,17 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
|
||||
permissionsGroupBox->setLayout(layout);
|
||||
|
||||
connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
connect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
|
||||
connect(m_addPermissionButton, SIGNAL(clicked()),
|
||||
this, SLOT(addPermission()));
|
||||
connect(m_removePermissionButton, SIGNAL(clicked()),
|
||||
this, SLOT(removePermission()));
|
||||
connect(m_permissionsComboBox, SIGNAL(currentTextChanged(QString)),
|
||||
this, SLOT(updateAddRemovePermissionButtons()));
|
||||
connect(m_addPermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::addPermission);
|
||||
connect(m_removePermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::removePermission);
|
||||
connect(m_permissionsComboBox, &QComboBox::currentTextChanged,
|
||||
this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons);
|
||||
}
|
||||
|
||||
topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding));
|
||||
@@ -470,7 +476,7 @@ bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (obj == m_targetLineEdit) {
|
||||
if (event->type() == QEvent::FocusIn)
|
||||
QTimer::singleShot(0, this, SLOT(updateTargetComboBox()));
|
||||
QTimer::singleShot(0, this, &AndroidManifestEditorWidget::updateTargetComboBox);
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(obj, event);
|
||||
@@ -772,10 +778,10 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
|
||||
m_mIconPath.clear();
|
||||
m_hIconPath.clear();
|
||||
|
||||
disconnect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
disconnect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
disconnect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
disconnect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
|
||||
m_defaultPermissonsCheckBox->setChecked(false);
|
||||
m_defaultFeaturesCheckBox->setChecked(false);
|
||||
@@ -796,10 +802,10 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
|
||||
m_defaultPermissonsCheckBox->setChecked(foundPermissionComment);
|
||||
m_defaultFeaturesCheckBox->setChecked(foundFeatureComment);
|
||||
|
||||
connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
connect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
|
||||
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
|
||||
QStringList permissions;
|
||||
QDomElement permissionElem = manifest.firstChildElement(QLatin1String("uses-permission"));
|
||||
|
||||
@@ -101,7 +101,6 @@ public:
|
||||
Core::IEditor *editor() const;
|
||||
TextEditor::TextEditorWidget *textEditorWidget() const;
|
||||
|
||||
public slots:
|
||||
void setDirty(bool dirty = true);
|
||||
|
||||
signals:
|
||||
@@ -109,7 +108,8 @@ signals:
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
private slots:
|
||||
|
||||
private:
|
||||
void setLDPIIcon();
|
||||
void setMDPIIcon();
|
||||
void setHDPIIcon();
|
||||
@@ -122,7 +122,6 @@ private slots:
|
||||
void updateSdkVersions();
|
||||
void startParseCheck();
|
||||
void delayedParseCheck();
|
||||
private:
|
||||
void initializePage();
|
||||
bool syncToWidgets();
|
||||
void syncToWidgets(const QDomDocument &doc);
|
||||
@@ -138,7 +137,7 @@ private:
|
||||
|
||||
void updateInfoBar(const QString &errorMessage, int line, int column);
|
||||
void hideInfoBar();
|
||||
Q_SLOT void updateTargetComboBox();
|
||||
void updateTargetComboBox();
|
||||
|
||||
void parseManifest(QXmlStreamReader &reader, QXmlStreamWriter &writer);
|
||||
void parseApplication(QXmlStreamReader &reader, QXmlStreamWriter &writer);
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
||||
void extensionsInitialized() { }
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void updateDevice();
|
||||
void kitsRestored();
|
||||
};
|
||||
|
||||
@@ -105,11 +105,11 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
|
||||
openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
layout->addWidget(openOptions, 1, 1);
|
||||
|
||||
connect(openOptions, SIGNAL(clicked()),
|
||||
this, SLOT(openOptions()));
|
||||
connect(openOptions, &QAbstractButton::clicked,
|
||||
this, &AndroidPotentialKitWidget::openOptions);
|
||||
|
||||
connect(AndroidConfigurations::instance(), SIGNAL(updated()),
|
||||
this, SLOT(recheck()));
|
||||
connect(AndroidConfigurations::instance(), &AndroidConfigurations::updated,
|
||||
this, &AndroidPotentialKitWidget::recheck);
|
||||
}
|
||||
|
||||
void AndroidPotentialKitWidget::openOptions()
|
||||
|
||||
@@ -46,7 +46,7 @@ class AndroidPotentialKitWidget : public Utils::DetailsWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
AndroidPotentialKitWidget(QWidget *parent);
|
||||
private slots:
|
||||
private:
|
||||
void openOptions();
|
||||
void recheck();
|
||||
};
|
||||
|
||||
@@ -58,12 +58,12 @@ void AndroidRunControl::start()
|
||||
emit started();
|
||||
disconnect(m_runner, 0, this, 0);
|
||||
|
||||
connect(m_runner, SIGNAL(remoteErrorOutput(QString)),
|
||||
SLOT(handleRemoteErrorOutput(QString)));
|
||||
connect(m_runner, SIGNAL(remoteOutput(QString)),
|
||||
SLOT(handleRemoteOutput(QString)));
|
||||
connect(m_runner, SIGNAL(remoteProcessFinished(QString)),
|
||||
SLOT(handleRemoteProcessFinished(QString)));
|
||||
connect(m_runner, &AndroidRunner::remoteErrorOutput,
|
||||
this, &AndroidRunControl::handleRemoteErrorOutput);
|
||||
connect(m_runner, &AndroidRunner::remoteOutput,
|
||||
this, &AndroidRunControl::handleRemoteOutput);
|
||||
connect(m_runner, &AndroidRunner::remoteProcessFinished,
|
||||
this, &AndroidRunControl::handleRemoteProcessFinished);
|
||||
appendMessage(tr("Starting remote process."), Utils::NormalMessageFormat);
|
||||
m_runner->setRunnable(runnable().as<AndroidRunnable>());
|
||||
m_runner->start();
|
||||
|
||||
@@ -46,12 +46,11 @@ public:
|
||||
bool isRunning() const override;
|
||||
QString displayName() const override;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleRemoteProcessFinished(const QString &error);
|
||||
void handleRemoteOutput(const QString &output);
|
||||
void handleRemoteErrorOutput(const QString &output);
|
||||
|
||||
private:
|
||||
AndroidRunner *const m_runner;
|
||||
bool m_running;
|
||||
};
|
||||
|
||||
@@ -179,9 +179,11 @@ AndroidRunner::AndroidRunner(QObject *parent,
|
||||
|
||||
m_checkPIDTimer.setInterval(1000);
|
||||
|
||||
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardOutput()), SLOT(logcatReadStandardOutput()));
|
||||
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardError()), SLOT(logcatReadStandardError()));
|
||||
connect(&m_checkPIDTimer, SIGNAL(timeout()), SLOT(checkPID()));
|
||||
connect(&m_adbLogcatProcess, &QProcess::readyReadStandardOutput,
|
||||
this, &AndroidRunner::logcatReadStandardOutput);
|
||||
connect(&m_adbLogcatProcess, &QProcess::readyReadStandardError,
|
||||
this, &AndroidRunner::logcatReadStandardError);
|
||||
connect(&m_checkPIDTimer, &QTimer::timeout, this, &AndroidRunner::checkPID);
|
||||
|
||||
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0)) {
|
||||
if (qEnvironmentVariableIsSet("QTC_ANDROID_USE_FILE_HANDSHAKE"))
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
void setRunnable(const AndroidRunnable &runnable);
|
||||
const AndroidRunnable &runnable() const { return m_androidRunnable; }
|
||||
|
||||
public slots:
|
||||
public:
|
||||
void start();
|
||||
void stop();
|
||||
void handleRemoteDebuggerRunning();
|
||||
@@ -74,14 +74,13 @@ signals:
|
||||
void remoteOutput(const QString &output);
|
||||
void remoteErrorOutput(const QString &output);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void checkPID();
|
||||
void logcatReadStandardError();
|
||||
void logcatReadStandardOutput();
|
||||
void asyncStart();
|
||||
QByteArray runPs();
|
||||
Q_INVOKABLE QByteArray runPs();
|
||||
|
||||
private:
|
||||
void adbKill(qint64 pid);
|
||||
QStringList selector() const { return m_selector; }
|
||||
void forceStop();
|
||||
@@ -89,7 +88,6 @@ private:
|
||||
void logcatProcess(const QByteArray &text, QByteArray &buffer, bool onlyError);
|
||||
bool adbShellAmNeedsQuotes();
|
||||
|
||||
private:
|
||||
bool runAdb(const QStringList &args, QString *errorMessage = nullptr, int timeoutS = 10);
|
||||
QProcess m_adbLogcatProcess;
|
||||
QProcess m_psProc;
|
||||
|
||||
@@ -131,8 +131,8 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect(&m_checkGdbWatcher, SIGNAL(finished()),
|
||||
this, SLOT(checkGdbFinished()));
|
||||
connect(&m_checkGdbWatcher, &QFutureWatcherBase::finished,
|
||||
this, &AndroidSettingsWidget::checkGdbFinished);
|
||||
|
||||
m_ui->SDKLocationPathChooser->setFileName(m_androidConfig.sdkLocation());
|
||||
m_ui->SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK folder"));
|
||||
@@ -179,22 +179,52 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent)
|
||||
m_ui->gdbWarningIconLabel->setPixmap(errorPixmap);
|
||||
m_ui->ndkWarningIconLabel->setPixmap(errorPixmap);
|
||||
|
||||
connect(m_ui->gdbWarningLabel, SIGNAL(linkActivated(QString)),
|
||||
this, SLOT(showGdbWarningDialog()));
|
||||
connect(m_ui->gdbWarningLabel, &QLabel::linkActivated,
|
||||
this, &AndroidSettingsWidget::showGdbWarningDialog);
|
||||
|
||||
connect(&m_virtualDevicesWatcher, SIGNAL(finished()),
|
||||
this, SLOT(updateAvds()));
|
||||
connect(&m_virtualDevicesWatcher, &QFutureWatcherBase::finished,
|
||||
this, &AndroidSettingsWidget::updateAvds);
|
||||
|
||||
check(All);
|
||||
applyToUi(All);
|
||||
|
||||
connect(&m_futureWatcher, SIGNAL(finished()),
|
||||
this, SLOT(avdAdded()));
|
||||
connect(&m_futureWatcher, &QFutureWatcherBase::finished,
|
||||
this, &AndroidSettingsWidget::avdAdded);
|
||||
|
||||
connect(m_ui->NDKLocationPathChooser, SIGNAL(rawPathChanged(QString)), this, SLOT(ndkLocationEditingFinished()));
|
||||
connect(m_ui->SDKLocationPathChooser, SIGNAL(rawPathChanged(QString)), this, SLOT(sdkLocationEditingFinished()));
|
||||
connect(m_ui->AntLocationPathChooser, SIGNAL(rawPathChanged(QString)), this, SLOT(antLocationEditingFinished()));
|
||||
connect(m_ui->OpenJDKLocationPathChooser, SIGNAL(rawPathChanged(QString)), this, SLOT(openJDKLocationEditingFinished()));
|
||||
connect(m_ui->NDKLocationPathChooser, &Utils::PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::ndkLocationEditingFinished);
|
||||
connect(m_ui->SDKLocationPathChooser, &Utils::PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::sdkLocationEditingFinished);
|
||||
connect(m_ui->AntLocationPathChooser, &Utils::PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::antLocationEditingFinished);
|
||||
connect(m_ui->OpenJDKLocationPathChooser, &Utils::PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::openJDKLocationEditingFinished);
|
||||
connect(m_ui->AVDAddPushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::addAVD);
|
||||
connect(m_ui->AVDRemovePushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::removeAVD);
|
||||
connect(m_ui->AVDStartPushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::startAVD);
|
||||
connect(m_ui->AVDTableView, &QAbstractItemView::activated,
|
||||
this, &AndroidSettingsWidget::avdActivated);
|
||||
connect(m_ui->AVDTableView, &QAbstractItemView::clicked,
|
||||
this, &AndroidSettingsWidget::avdActivated);
|
||||
connect(m_ui->DataPartitionSizeSpinBox, &QAbstractSpinBox::editingFinished,
|
||||
this, &AndroidSettingsWidget::dataPartitionSizeEditingFinished);
|
||||
connect(m_ui->manageAVDPushButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::manageAVD);
|
||||
connect(m_ui->CreateKitCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidSettingsWidget::createKitToggled);
|
||||
connect(m_ui->downloadSDKToolButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::openSDKDownloadUrl);
|
||||
connect(m_ui->downloadNDKToolButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::openNDKDownloadUrl);
|
||||
connect(m_ui->downloadAntToolButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::openAntDownloadUrl);
|
||||
connect(m_ui->downloadOpenJDKToolButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::openOpenJDKDownloadUrl);
|
||||
connect(m_ui->UseGradleCheckBox, &QAbstractButton::toggled,
|
||||
this, &AndroidSettingsWidget::useGradleToggled);
|
||||
|
||||
}
|
||||
|
||||
@@ -646,8 +676,9 @@ void AndroidSettingsWidget::showGdbWarningDialog()
|
||||
void AndroidSettingsWidget::manageAVD()
|
||||
{
|
||||
QProcess *avdProcess = new QProcess();
|
||||
connect(this, SIGNAL(destroyed()), avdProcess, SLOT(deleteLater()));
|
||||
connect(avdProcess, SIGNAL(finished(int)), avdProcess, SLOT(deleteLater()));
|
||||
connect(this, &QObject::destroyed, avdProcess, &QObject::deleteLater);
|
||||
connect(avdProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
|
||||
avdProcess, &QObject::deleteLater);
|
||||
|
||||
avdProcess->setProcessEnvironment(m_androidConfig.androidToolEnvironment().toProcessEnvironment());
|
||||
QString executable = m_androidConfig.androidToolPath().toString();
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
void saveSettings();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void sdkLocationEditingFinished();
|
||||
void ndkLocationEditingFinished();
|
||||
void searchForAnt(const Utils::FileName &location);
|
||||
|
||||
@@ -463,231 +463,5 @@
|
||||
<resources>
|
||||
<include location="android.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>AVDAddPushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>addAVD()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>793</x>
|
||||
<y>394</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>AVDRemovePushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>removeAVD()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>793</x>
|
||||
<y>427</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>AVDStartPushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>startAVD()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>793</x>
|
||||
<y>460</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>AVDTableView</sender>
|
||||
<signal>activated(QModelIndex)</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>avdActivated(QModelIndex)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>328</x>
|
||||
<y>605</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>AVDTableView</sender>
|
||||
<signal>clicked(QModelIndex)</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>avdActivated(QModelIndex)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>328</x>
|
||||
<y>605</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>DataPartitionSizeSpinBox</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>dataPartitionSizeEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>614</x>
|
||||
<y>360</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>352</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>manageAVDPushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>manageAVD()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>792</x>
|
||||
<y>359</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>339</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>CreateKitCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>createKitToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>543</x>
|
||||
<y>228</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>339</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>downloadSDKToolButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>openSDKDownloadUrl()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>830</x>
|
||||
<y>85</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>downloadNDKToolButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>openNDKDownloadUrl()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>830</x>
|
||||
<y>141</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>downloadAntToolButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>openAntDownloadUrl()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>830</x>
|
||||
<y>313</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>downloadOpenJDKToolButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>openOpenJDKDownloadUrl()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>830</x>
|
||||
<y>29</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>UseGradleCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>AndroidSettingsWidget</receiver>
|
||||
<slot>useGradleToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>395</x>
|
||||
<y>238</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>324</x>
|
||||
<y>223</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>sdkLocationEditingFinished()</slot>
|
||||
<slot>ndkLocationEditingFinished()</slot>
|
||||
<slot>antLocationEditingFinished()</slot>
|
||||
<slot>addAVD()</slot>
|
||||
<slot>removeAVD()</slot>
|
||||
<slot>startAVD()</slot>
|
||||
<slot>avdActivated(QModelIndex)</slot>
|
||||
<slot>dataPartitionSizeEditingFinished()</slot>
|
||||
<slot>openJDKLocationEditingFinished()</slot>
|
||||
<slot>manageAVD()</slot>
|
||||
<slot>createKitToggled()</slot>
|
||||
<slot>openSDKDownloadUrl()</slot>
|
||||
<slot>openNDKDownloadUrl()</slot>
|
||||
<slot>openAntDownloadUrl()</slot>
|
||||
<slot>openOpenJDKDownloadUrl()</slot>
|
||||
</slots>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -39,7 +39,7 @@ Android::Internal::AndroidSignalOperation::AndroidSignalOperation()
|
||||
, m_signal(0)
|
||||
{
|
||||
m_timeout->setInterval(5000);
|
||||
connect(m_timeout, SIGNAL(timeout()), this, SLOT(handleTimeout()));
|
||||
connect(m_timeout, &QTimer::timeout, this, &AndroidSignalOperation::handleTimeout);
|
||||
}
|
||||
|
||||
void Android::Internal::AndroidSignalOperation::adbFindRunAsFinished(int exitCode,
|
||||
@@ -63,8 +63,9 @@ void Android::Internal::AndroidSignalOperation::adbFindRunAsFinished(int exitCod
|
||||
m_state = Idle;
|
||||
emit finished(m_errorMessage);
|
||||
} else {
|
||||
connect(m_adbProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
SLOT(adbKillFinished(int,QProcess::ExitStatus)));
|
||||
connect(m_adbProcess,
|
||||
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||
this, &AndroidSignalOperation::adbKillFinished);
|
||||
m_state = Kill;
|
||||
m_timeout->start();
|
||||
m_adbProcess->start(m_adbPath, QStringList()
|
||||
@@ -116,8 +117,9 @@ void Android::Internal::AndroidSignalOperation::signalOperationViaADB(qint64 pid
|
||||
m_adbProcess->disconnect(this);
|
||||
m_pid = pid;
|
||||
m_signal = signal;
|
||||
connect(m_adbProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
SLOT(adbFindRunAsFinished(int,QProcess::ExitStatus)));
|
||||
connect(m_adbProcess,
|
||||
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||
this, &AndroidSignalOperation::adbFindRunAsFinished);
|
||||
m_state = RunAs;
|
||||
m_timeout->start();
|
||||
m_adbProcess->start(m_adbPath, QStringList()
|
||||
|
||||
@@ -47,12 +47,11 @@ public:
|
||||
protected:
|
||||
explicit AndroidSignalOperation();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void adbFindRunAsFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void adbKillFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void handleTimeout();
|
||||
|
||||
private:
|
||||
void signalOperationViaADB(qint64 pid, int signal);
|
||||
|
||||
QString m_adbPath;
|
||||
|
||||
@@ -61,8 +61,9 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
|
||||
|
||||
updateApiLevelComboBox();
|
||||
|
||||
connect(m_avdDialog.abiComboBox, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(updateApiLevelComboBox()));
|
||||
connect(m_avdDialog.abiComboBox,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &AvdDialog::updateApiLevelComboBox);
|
||||
|
||||
connect(&m_hideTipTimer, &QTimer::timeout,
|
||||
this, [](){Utils::ToolTip::hide();});
|
||||
|
||||
@@ -48,9 +48,8 @@ public:
|
||||
int sdcardSize() const;
|
||||
bool isValid() const;
|
||||
|
||||
private slots:
|
||||
void updateApiLevelComboBox();
|
||||
private:
|
||||
void updateApiLevelComboBox();
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
Ui::AddNewAVDDialog m_avdDialog;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
QWidget *createConfigurationWidget() { return 0; }
|
||||
QWidget *createConfigurationWidget() override { return 0; }
|
||||
TestConfiguration *m_testConfig = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
optionsBuilder.addPredefinedMacrosAndHeaderPathsOptions();
|
||||
optionsBuilder.addWrappedQtHeadersIncludePath();
|
||||
optionsBuilder.addHeaderPathOptions();
|
||||
optionsBuilder.addHeaderPathOptions(/*addAsNativePath*/ true);
|
||||
optionsBuilder.addProjectConfigFileInclude();
|
||||
|
||||
optionsBuilder.addMsvcCompatibilityVersion();
|
||||
@@ -149,19 +149,20 @@ private:
|
||||
static const QString resourceDir = getResourceDir();
|
||||
if (!resourceDir.isEmpty()) {
|
||||
add(QLatin1String("-nostdlibinc"));
|
||||
add(QLatin1String("-I") + resourceDir);
|
||||
add(QLatin1String("-I") + QDir::toNativeSeparators(resourceDir));
|
||||
add(QLatin1String("-undef"));
|
||||
}
|
||||
}
|
||||
|
||||
void addWrappedQtHeadersIncludePath()
|
||||
{
|
||||
static const QString wrappedQtHeaders = ICore::instance()->resourcePath()
|
||||
static const QString wrappedQtHeadersPath = ICore::instance()->resourcePath()
|
||||
+ QLatin1String("/cplusplus/wrappedQtHeaders");
|
||||
|
||||
if (m_projectPart.qtVersion != ProjectPart::NoQt) {
|
||||
add(QLatin1String("-I") + wrappedQtHeaders);
|
||||
add(QLatin1String("-I") + wrappedQtHeaders + QLatin1String("/QtCore"));
|
||||
const QString wrappedQtCoreHeaderPath = wrappedQtHeadersPath + QLatin1String("/QtCore");
|
||||
add(QLatin1String("-I") + QDir::toNativeSeparators(wrappedQtHeadersPath));
|
||||
add(QLatin1String("-I") + QDir::toNativeSeparators(wrappedQtCoreHeaderPath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ private:
|
||||
{
|
||||
if (!m_projectPart.projectConfigFile.isEmpty()) {
|
||||
add(QLatin1String("-include"));
|
||||
add(m_projectPart.projectConfigFile);
|
||||
add(QDir::toNativeSeparators(m_projectPart.projectConfigFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ ClangStaticAnalyzerDiagnosticView::ClangStaticAnalyzerDiagnosticView(QWidget *pa
|
||||
: Debugger::DetailedErrorView(parent)
|
||||
{
|
||||
m_suppressAction = new QAction(tr("Suppress This Diagnostic"), this);
|
||||
connect(m_suppressAction, &QAction::triggered, [this](bool) { suppressCurrentDiagnostic(); });
|
||||
connect(m_suppressAction, &QAction::triggered,
|
||||
this, &ClangStaticAnalyzerDiagnosticView::suppressCurrentDiagnostic);
|
||||
}
|
||||
|
||||
void ClangStaticAnalyzerDiagnosticView::suppressCurrentDiagnostic()
|
||||
|
||||
@@ -110,6 +110,11 @@ void ClangStaticAnalyzerUnitTests::testProject_data()
|
||||
QTest::newRow("simple qmake library project")
|
||||
<< QString(m_tmpDir->absolutePath("simple-library/simple-library.pro")) << 0;
|
||||
|
||||
QTest::newRow("stdc++11-includes qbs project")
|
||||
<< QString(m_tmpDir->absolutePath("stdc++11-includes/stdc++11-includes.qbs")) << 0;
|
||||
QTest::newRow("stdc++11-includes qmake project")
|
||||
<< QString(m_tmpDir->absolutePath("stdc++11-includes/stdc++11-includes.pro")) << 0;
|
||||
|
||||
QTest::newRow("qt-widgets-app qbs project")
|
||||
<< QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0;
|
||||
QTest::newRow("qt-widgets-app qmake project")
|
||||
|
||||
@@ -16,5 +16,8 @@
|
||||
<file>unit-tests/simple-library/simple-library.h</file>
|
||||
<file>unit-tests/simple-library/simple-library.pro</file>
|
||||
<file>unit-tests/simple-library/simple-library.qbs</file>
|
||||
<file>unit-tests/stdc++11-includes/main.cpp</file>
|
||||
<file>unit-tests/stdc++11-includes/stdc++11-includes.pro</file>
|
||||
<file>unit-tests/stdc++11-includes/stdc++11-includes.qbs</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// Based on http://en.cppreference.com/w/cpp/header
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <bitset>
|
||||
#include <cassert>
|
||||
#include <ccomplex>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cfenv>
|
||||
#include <cfloat>
|
||||
#include <chrono>
|
||||
#include <cinttypes>
|
||||
#include <ciso646>
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cmath>
|
||||
#include <codecvt>
|
||||
#include <complex>
|
||||
#include <condition_variable>
|
||||
#include <csetjmp>
|
||||
#include <csignal>
|
||||
#ifndef _MSC_VER
|
||||
# include <cstdalign>
|
||||
#endif
|
||||
#include <cstdarg>
|
||||
#include <cstdbool>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctgmath>
|
||||
#include <ctime>
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1800
|
||||
# include <cuchar>
|
||||
#endif
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <forward_list>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <future>
|
||||
#include <initializer_list>
|
||||
#include <iomanip>
|
||||
#include <ios>
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <locale>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <new>
|
||||
#include <numeric>
|
||||
#include <ostream>
|
||||
#include <queue>
|
||||
#include <random>
|
||||
#include <ratio>
|
||||
#include <regex>
|
||||
#include <scoped_allocator>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <stdexcept>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
#include <thread>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <typeindex>
|
||||
#include <typeinfo>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <valarray>
|
||||
#include <vector>
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += console c++11
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
TARGET = stdc++11-includes
|
||||
SOURCES += main.cpp
|
||||
@@ -0,0 +1,14 @@
|
||||
import qbs
|
||||
|
||||
CppApplication {
|
||||
name : "Standard C++ Includes"
|
||||
consoleApplication: true
|
||||
cpp.cxxLanguageVersion: "c++11"
|
||||
|
||||
files: "main.cpp"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
@@ -442,6 +442,8 @@ void EditorManagerPrivate::init()
|
||||
|
||||
// other setup
|
||||
auto mainEditorArea = new EditorArea();
|
||||
// assign parent to avoid failing updates (e.g. windowTitle) before it is displayed first time
|
||||
mainEditorArea->setParent(ICore::mainWindow());
|
||||
mainEditorArea->hide();
|
||||
connect(mainEditorArea, &EditorArea::windowTitleNeedsUpdate,
|
||||
this, &EditorManagerPrivate::updateWindowTitle);
|
||||
|
||||
@@ -206,23 +206,14 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
|
||||
QPoint textOffset = centerRect.center() - QPoint(iconRect.width()/2, iconRect.height()/2);
|
||||
textOffset = textOffset - QPoint(0, lineHeight + 4);
|
||||
QRectF r(0, textOffset.y(), rect().width(), lineHeight);
|
||||
QColor penColor;
|
||||
if (isEnabled())
|
||||
penColor = Qt::white;
|
||||
else
|
||||
penColor = Qt::gray;
|
||||
painter.setPen(penColor);
|
||||
painter.setPen(creatorTheme()->color(isEnabled()
|
||||
? Theme::PanelTextColorLight
|
||||
: Theme::IconsDisabledColor));
|
||||
|
||||
// draw project name
|
||||
const int margin = 6;
|
||||
const qreal availableWidth = r.width() - margin;
|
||||
QString ellidedProjectName = fm.elidedText(projectName, Qt::ElideMiddle, availableWidth);
|
||||
if (isEnabled()) {
|
||||
const QRectF shadowR = r.translated(0, 1);
|
||||
painter.setPen(QColor(30, 30, 30, 80));
|
||||
painter.drawText(shadowR, textFlags, ellidedProjectName);
|
||||
painter.setPen(penColor);
|
||||
}
|
||||
painter.drawText(r, textFlags, ellidedProjectName);
|
||||
|
||||
// draw build configuration name
|
||||
@@ -240,15 +231,12 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
|
||||
splitBuildConfiguration = splitInTwoLines(buildConfiguration, boldFm, availableWidth);
|
||||
}
|
||||
// draw the two lines for the build configuration
|
||||
painter.setPen(creatorTheme()->color(isEnabled()
|
||||
? Theme::FancyTabWidgetEnabledSelectedTextColor
|
||||
: Theme::FancyTabWidgetDisabledSelectedTextColor));
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (splitBuildConfiguration[i].isEmpty())
|
||||
continue;
|
||||
if (isEnabled()) {
|
||||
const QRectF shadowR = buildConfigRect[i].translated(0, 1);
|
||||
painter.setPen(QColor(30, 30, 30, 80));
|
||||
painter.drawText(shadowR, textFlags, splitBuildConfiguration[i]);
|
||||
painter.setPen(penColor);
|
||||
}
|
||||
painter.drawText(buildConfigRect[i], textFlags, splitBuildConfiguration[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -790,16 +790,16 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
break;
|
||||
|
||||
case CE_MenuBarEmptyArea: {
|
||||
if (!creatorTheme()->flag(Theme::FlatMenuBar)) {
|
||||
if (creatorTheme()->flag(Theme::FlatMenuBar))
|
||||
painter->fillRect(option->rect, StyleHelper::baseColor());
|
||||
else
|
||||
StyleHelper::menuGradient(painter, option->rect, option->rect);
|
||||
|
||||
painter->save();
|
||||
painter->setPen(StyleHelper::borderColor());
|
||||
painter->drawLine(option->rect.bottomLeft() + QPointF(0.5, 0.5),
|
||||
option->rect.bottomRight() + QPointF(0.5, 0.5));
|
||||
painter->restore();
|
||||
} else {
|
||||
painter->fillRect(option->rect, StyleHelper::baseColor());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <QDir>
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
CompilerOptionsBuilder::CompilerOptionsBuilder(const ProjectPart &projectPart)
|
||||
@@ -98,7 +100,7 @@ void CompilerOptionsBuilder::enableExceptions()
|
||||
add(QLatin1String("-fexceptions"));
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addHeaderPathOptions()
|
||||
void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath)
|
||||
{
|
||||
typedef ProjectPartHeaderPath HeaderPath;
|
||||
const QString defaultPrefix = includeOption();
|
||||
@@ -124,7 +126,10 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
|
||||
break;
|
||||
}
|
||||
|
||||
result.append(prefix + headerPath.path);
|
||||
QString path = prefix + headerPath.path;
|
||||
path = addAsNativePath ? QDir::toNativeSeparators(path) : path;
|
||||
|
||||
result.append(path);
|
||||
}
|
||||
|
||||
m_options.append(result);
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
// Add options based on project part
|
||||
virtual void addTargetTriple();
|
||||
virtual void enableExceptions();
|
||||
void addHeaderPathOptions();
|
||||
void addHeaderPathOptions(bool addAsNativePath = false);
|
||||
void addToolchainAndProjectDefines();
|
||||
virtual void addLanguageOption(ProjectFile::Kind fileKind);
|
||||
virtual void addOptionsForLanguage(bool checkForBorlandExtensions = true);
|
||||
|
||||
@@ -995,7 +995,7 @@ QStringList GitClient::setupCheckoutArguments(const QString &workingDirectory,
|
||||
ICore::settings(), "Git.CreateLocalBranchOnCheckout" /*setting*/,
|
||||
QDialogButtonBox::Yes | QDialogButtonBox::No /*buttons*/,
|
||||
QDialogButtonBox::No /*default button*/,
|
||||
QDialogButtonBox::No /*button to save*/) == QMessageBox::No) {
|
||||
QDialogButtonBox::No /*button to save*/) == QDialogButtonBox::No) {
|
||||
return arguments;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,14 +50,12 @@ public:
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void addDocumentation();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
void removeDocumentation(const QList<QModelIndex> &items);
|
||||
|
||||
private:
|
||||
QList<QModelIndex> currentSelection() const;
|
||||
|
||||
Ui::DocSettingsPage m_ui;
|
||||
|
||||
@@ -63,8 +63,8 @@ QWidget *FilterSettingsPage::widget()
|
||||
this, &FilterSettingsPage::addFilter);
|
||||
connect(m_ui.filterRemoveButton, &QPushButton::clicked,
|
||||
this, &FilterSettingsPage::removeFilter);
|
||||
connect(HelpManager::instance(), SIGNAL(documentationChanged()),
|
||||
this, SLOT(updateFilterPage()));
|
||||
connect(HelpManager::instance(), &HelpManager::documentationChanged,
|
||||
this, &FilterSettingsPage::updateFilterPage);
|
||||
}
|
||||
return m_widget;
|
||||
}
|
||||
@@ -221,8 +221,8 @@ void FilterSettingsPage::apply()
|
||||
|
||||
void FilterSettingsPage::finish()
|
||||
{
|
||||
disconnect(HelpManager::instance(), SIGNAL(documentationChanged()),
|
||||
this, SLOT(updateFilterPage()));
|
||||
disconnect(HelpManager::instance(), &HelpManager::documentationChanged,
|
||||
this, &FilterSettingsPage::updateFilterPage);
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,18 +47,15 @@ public:
|
||||
signals:
|
||||
void filtersChanged();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void updateAttributes(QListWidgetItem *item);
|
||||
void updateFilterMap();
|
||||
void updateFilterPage();
|
||||
void addFilter();
|
||||
void removeFilter();
|
||||
|
||||
private:
|
||||
void updateFilterDescription(const QString &filter);
|
||||
|
||||
private:
|
||||
QString msgFilterLabel(const QString &filter) const;
|
||||
|
||||
Ui::FilterSettingsPage m_ui;
|
||||
QPointer<QWidget> m_widget;
|
||||
|
||||
|
||||
@@ -49,20 +49,18 @@ public:
|
||||
signals:
|
||||
void fontChanged();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void setCurrentPage();
|
||||
void setBlankPage();
|
||||
void setDefaultPage();
|
||||
void importBookmarks();
|
||||
void exportBookmarks();
|
||||
|
||||
private:
|
||||
void updateFontSize();
|
||||
void updateFontStyle();
|
||||
void updateFontFamily();
|
||||
int closestPointSizeIndex(int desiredPointSize) const;
|
||||
|
||||
private:
|
||||
QFont m_font;
|
||||
QFontDatabase m_fontDatabase;
|
||||
|
||||
|
||||
@@ -151,24 +151,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
addAutoReleasedObject(m_searchTaskHandler = new SearchTaskHandler);
|
||||
|
||||
m_centralWidget = new CentralWidget(Context("Help.CentralHelpWidget"));
|
||||
connect(m_centralWidget, SIGNAL(sourceChanged(QUrl)), this,
|
||||
SLOT(updateSideBarSource(QUrl)));
|
||||
connect(m_centralWidget, &HelpWidget::sourceChanged, this,
|
||||
&HelpPlugin::updateSideBarSource);
|
||||
connect(m_centralWidget, &CentralWidget::closeButtonClicked,
|
||||
&OpenPagesManager::instance(), &OpenPagesManager::closeCurrentPage);
|
||||
|
||||
connect(LocalHelpManager::instance(), &LocalHelpManager::returnOnCloseChanged,
|
||||
m_centralWidget, &CentralWidget::updateCloseButton);
|
||||
connect(HelpManager::instance(), SIGNAL(helpRequested(QUrl,Core::HelpManager::HelpViewerLocation)),
|
||||
this, SLOT(handleHelpRequest(QUrl,Core::HelpManager::HelpViewerLocation)));
|
||||
connect(m_searchTaskHandler, SIGNAL(search(QUrl)), this,
|
||||
SLOT(showLinkInHelpMode(QUrl)));
|
||||
connect(HelpManager::instance(), &HelpManager::helpRequested,
|
||||
this, &HelpPlugin::handleHelpRequest);
|
||||
connect(m_searchTaskHandler, &SearchTaskHandler::search, this,
|
||||
&HelpPlugin::showLinkInHelpMode);
|
||||
|
||||
connect(m_filterSettingsPage, SIGNAL(filtersChanged()), this,
|
||||
SLOT(setupHelpEngineIfNeeded()));
|
||||
connect(HelpManager::instance(), SIGNAL(documentationChanged()), this,
|
||||
SLOT(setupHelpEngineIfNeeded()));
|
||||
connect(HelpManager::instance(), SIGNAL(collectionFileChanged()), this,
|
||||
SLOT(setupHelpEngineIfNeeded()));
|
||||
connect(m_filterSettingsPage, &FilterSettingsPage::filtersChanged, this,
|
||||
&HelpPlugin::setupHelpEngineIfNeeded);
|
||||
connect(HelpManager::instance(), &HelpManager::documentationChanged, this,
|
||||
&HelpPlugin::setupHelpEngineIfNeeded);
|
||||
connect(HelpManager::instance(), &HelpManager::collectionFileChanged, this,
|
||||
&HelpPlugin::setupHelpEngineIfNeeded);
|
||||
|
||||
connect(ToolTip::instance(), &ToolTip::shown, ICore::instance(), []() {
|
||||
ICore::addAdditionalContext(Context(kToolTipHelpContext), ICore::ContextPriority::High);
|
||||
@@ -185,29 +185,29 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
tr(Constants::SB_CONTENTS), this);
|
||||
cmd = ActionManager::registerAction(action, "Help.ContentsMenu");
|
||||
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(activateContents()));
|
||||
connect(action, &QAction::triggered, this, &HelpPlugin::activateContents);
|
||||
|
||||
action = new QAction(tr(Constants::SB_INDEX), this);
|
||||
cmd = ActionManager::registerAction(action, "Help.IndexMenu");
|
||||
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(activateIndex()));
|
||||
connect(action, &QAction::triggered, this, &HelpPlugin::activateIndex);
|
||||
|
||||
action = new QAction(tr("Context Help"), this);
|
||||
cmd = ActionManager::registerAction(action, Help::Constants::CONTEXT_HELP,
|
||||
Context(kToolTipHelpContext, Core::Constants::C_GLOBAL));
|
||||
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1));
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(showContextHelp()));
|
||||
connect(action, &QAction::triggered, this, &HelpPlugin::showContextHelp);
|
||||
|
||||
action = new QAction(tr("Technical Support"), this);
|
||||
cmd = ActionManager::registerAction(action, "Help.TechSupport");
|
||||
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage()));
|
||||
connect(action, &QAction::triggered, this, &HelpPlugin::slotOpenSupportPage);
|
||||
|
||||
action = new QAction(tr("Report Bug..."), this);
|
||||
cmd = ActionManager::registerAction(action, "Help.ReportBug");
|
||||
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug()));
|
||||
connect(action, &QAction::triggered, this, &HelpPlugin::slotReportBug);
|
||||
|
||||
if (ActionContainer *windowMenu = ActionManager::actionContainer(Core::Constants::M_WINDOW)) {
|
||||
// reuse EditorManager constants to avoid a second pair of menu actions
|
||||
@@ -216,16 +216,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
Command *ctrlTab = ActionManager::registerAction(action, Core::Constants::GOTOPREVINHISTORY,
|
||||
modecontext);
|
||||
windowMenu->addAction(ctrlTab, Core::Constants::G_WINDOW_NAVIGATE);
|
||||
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
|
||||
SLOT(gotoPreviousPage()));
|
||||
connect(action, &QAction::triggered, &OpenPagesManager::instance(),
|
||||
&OpenPagesManager::gotoPreviousPage);
|
||||
|
||||
// Goto Next In History Action
|
||||
action = new QAction(this);
|
||||
Command *ctrlShiftTab = ActionManager::registerAction(action, Core::Constants::GOTONEXTINHISTORY,
|
||||
modecontext);
|
||||
windowMenu->addAction(ctrlShiftTab, Core::Constants::G_WINDOW_NAVIGATE);
|
||||
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
|
||||
SLOT(gotoNextPage()));
|
||||
connect(action, &QAction::triggered, &OpenPagesManager::instance(),
|
||||
&OpenPagesManager::gotoNextPage);
|
||||
}
|
||||
|
||||
auto helpIndexFilter = new HelpIndexFilter();
|
||||
@@ -237,8 +237,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
RemoteHelpFilter *remoteHelpFilter = new RemoteHelpFilter();
|
||||
addAutoReleasedObject(remoteHelpFilter);
|
||||
connect(remoteHelpFilter, SIGNAL(linkActivated(QUrl)), this,
|
||||
SLOT(showLinkInHelpMode(QUrl)));
|
||||
connect(remoteHelpFilter, &RemoteHelpFilter::linkActivated, this,
|
||||
&HelpPlugin::showLinkInHelpMode);
|
||||
|
||||
QDesktopServices::setUrlHandler(QLatin1String("qthelp"), HelpManager::instance(), "handleHelpRequest");
|
||||
connect(ModeManager::instance(), &ModeManager::currentModeChanged,
|
||||
@@ -318,14 +318,14 @@ HelpWidget *HelpPlugin::createHelpWidget(const Context &context, HelpWidget::Wid
|
||||
{
|
||||
HelpWidget *widget = new HelpWidget(context, style);
|
||||
|
||||
connect(widget->currentViewer(), SIGNAL(loadFinished()),
|
||||
this, SLOT(highlightSearchTermsInContextHelp()));
|
||||
connect(widget, SIGNAL(openHelpMode(QUrl)),
|
||||
this, SLOT(showLinkInHelpMode(QUrl)));
|
||||
connect(widget, SIGNAL(closeButtonClicked()),
|
||||
this, SLOT(slotHideRightPane()));
|
||||
connect(widget, SIGNAL(aboutToClose()),
|
||||
this, SLOT(saveExternalWindowSettings()));
|
||||
connect(widget->currentViewer(), &HelpViewer::loadFinished,
|
||||
this, &HelpPlugin::highlightSearchTermsInContextHelp);
|
||||
connect(widget, &HelpWidget::openHelpMode,
|
||||
this, &HelpPlugin::showLinkInHelpMode);
|
||||
connect(widget, &HelpWidget::closeButtonClicked,
|
||||
this, &HelpPlugin::slotHideRightPane);
|
||||
connect(widget, &HelpWidget::aboutToClose,
|
||||
this, &HelpPlugin::saveExternalWindowSettings);
|
||||
|
||||
// force setup, as we might have never switched to full help mode
|
||||
// thus the help engine might still run without collection file setup
|
||||
@@ -455,15 +455,6 @@ void HelpPlugin::modeChanged(Core::Id mode, Core::Id old)
|
||||
}
|
||||
}
|
||||
|
||||
void HelpPlugin::updateSideBarSource()
|
||||
{
|
||||
if (HelpViewer *viewer = m_centralWidget->currentViewer()) {
|
||||
const QUrl &url = viewer->source();
|
||||
if (url.isValid())
|
||||
updateSideBarSource(url);
|
||||
}
|
||||
}
|
||||
|
||||
void HelpPlugin::updateSideBarSource(const QUrl &newUrl)
|
||||
{
|
||||
if (m_rightPaneSideBarWidget) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
static HelpViewer *createHelpViewer(qreal zoom);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void modeChanged(Core::Id mode, Core::Id old);
|
||||
|
||||
void showContextHelp();
|
||||
@@ -89,7 +89,6 @@ private slots:
|
||||
void showLinksInHelpMode(const QMap<QString, QUrl> &links, const QString &key);
|
||||
void slotHideRightPane();
|
||||
|
||||
void updateSideBarSource();
|
||||
void updateSideBarSource(const QUrl &newUrl);
|
||||
|
||||
void setupHelpEngineIfNeeded();
|
||||
@@ -100,7 +99,6 @@ private slots:
|
||||
void slotOpenSupportPage();
|
||||
void slotReportBug();
|
||||
|
||||
private:
|
||||
void resetFilter();
|
||||
void activateHelpMode();
|
||||
bool canShowHelpSideBySide() const;
|
||||
@@ -112,7 +110,6 @@ private:
|
||||
|
||||
void doSetupIfNeeded();
|
||||
|
||||
private:
|
||||
HelpMode *m_mode;
|
||||
CentralWidget *m_centralWidget;
|
||||
HelpWidget *m_rightPaneSideBarWidget;
|
||||
|
||||
@@ -77,7 +77,6 @@ public:
|
||||
static QString mimeFromUrl(const QUrl &url);
|
||||
static bool launchWithExternalApp(const QUrl &url);
|
||||
|
||||
public slots:
|
||||
void home();
|
||||
|
||||
virtual void scaleUp() = 0;
|
||||
@@ -97,7 +96,7 @@ signals:
|
||||
void backwardAvailable(bool);
|
||||
void loadFinished();
|
||||
|
||||
protected slots:
|
||||
protected:
|
||||
void slotLoadStarted();
|
||||
void slotLoadFinished();
|
||||
};
|
||||
|
||||
@@ -246,7 +246,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
|
||||
|
||||
if (style != ExternalWindow) {
|
||||
m_closeAction = new QAction(Core::Icons::CLOSE_TOOLBAR.icon(), QString(), toolBar);
|
||||
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeButtonClicked()));
|
||||
connect(m_closeAction, &QAction::triggered, this, &HelpWidget::closeButtonClicked);
|
||||
button = new QToolButton;
|
||||
button->setDefaultAction(m_closeAction);
|
||||
layout->addWidget(button);
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
bool newPage = false);
|
||||
void activateSideBarItem(const QString &id);
|
||||
|
||||
public slots:
|
||||
public:
|
||||
void setSource(const QUrl &url);
|
||||
void updateCloseButton();
|
||||
|
||||
@@ -92,13 +92,12 @@ signals:
|
||||
void sourceChanged(const QUrl &url);
|
||||
void filterActivated(const QString &name);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void updateBackMenu();
|
||||
void updateForwardMenu();
|
||||
void updateWindowTitle();
|
||||
void helpModeButtonClicked();
|
||||
|
||||
private:
|
||||
void goHome();
|
||||
void addBookmark();
|
||||
void copy();
|
||||
|
||||
@@ -47,7 +47,7 @@ class MacResponderHack : public QObject
|
||||
public:
|
||||
MacResponderHack(QObject *parent);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void responderHack(QWidget *old, QWidget *now);
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
|
||||
MacWebKitHelpWidget *widget() const { return m_widget; }
|
||||
|
||||
public slots:
|
||||
public:
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
void resetScale();
|
||||
@@ -119,14 +119,12 @@ public slots:
|
||||
void backward();
|
||||
void print(QPrinter *printer);
|
||||
|
||||
public slots:
|
||||
void slotLoadStarted();
|
||||
void slotLoadFinished();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void goToHistoryItem();
|
||||
|
||||
private:
|
||||
DOMRange *findText(NSString *text, bool forward, bool caseSensitive, DOMNode *startNode,
|
||||
int startOffset);
|
||||
MacWebKitHelpWidget *m_widget;
|
||||
|
||||
@@ -657,7 +657,7 @@ void MacWebKitHelpViewer::addBackHistoryItems(QMenu *backMenu)
|
||||
QAction *action = new QAction(backMenu);
|
||||
action->setText(QString::fromNSString([list itemAtIndex:historyIndex].title));
|
||||
action->setData(historyIndex);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(goToHistoryItem()));
|
||||
connect(action, &QAction::triggered, this, &MacWebKitHelpViewer::goToHistoryItem);
|
||||
backMenu->addAction(action);
|
||||
}
|
||||
}
|
||||
@@ -673,7 +673,7 @@ void MacWebKitHelpViewer::addForwardHistoryItems(QMenu *forwardMenu)
|
||||
QAction *action = new QAction(forwardMenu);
|
||||
action->setText(QString::fromNSString([list itemAtIndex:historyIndex].title));
|
||||
action->setData(historyIndex);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(goToHistoryItem()));
|
||||
connect(action, &QAction::triggered, this, &MacWebKitHelpViewer::goToHistoryItem);
|
||||
forwardMenu->addAction(action);
|
||||
}
|
||||
}
|
||||
@@ -878,8 +878,8 @@ void MacWebKitHelpViewer::goToHistoryItem()
|
||||
MacResponderHack::MacResponderHack(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)),
|
||||
this, SLOT(responderHack(QWidget*,QWidget*)));
|
||||
connect(qApp, &QApplication::focusChanged,
|
||||
this, &MacResponderHack::responderHack);
|
||||
}
|
||||
|
||||
void MacResponderHack::responderHack(QWidget *old, QWidget *now)
|
||||
|
||||
@@ -65,15 +65,16 @@ OpenPagesManager::OpenPagesManager(QObject *parent)
|
||||
m_comboBox = new QComboBox;
|
||||
m_comboBox->setModel(m_model);
|
||||
m_comboBox->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_comboBox, SIGNAL(activated(int)), this, SLOT(setCurrentPage(int)));
|
||||
connect(m_comboBox, SIGNAL(customContextMenuRequested(QPoint)), this,
|
||||
SLOT(openPagesContextMenu(QPoint)));
|
||||
connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
|
||||
this, &OpenPagesManager::setCurrentPageByRow);
|
||||
connect(m_comboBox, &QWidget::customContextMenuRequested, this,
|
||||
&OpenPagesManager::openPagesContextMenu);
|
||||
|
||||
m_openPagesSwitcher = new OpenPagesSwitcher(m_model);
|
||||
connect(m_openPagesSwitcher, SIGNAL(closePage(QModelIndex)), this,
|
||||
SLOT(closePage(QModelIndex)));
|
||||
connect(m_openPagesSwitcher, SIGNAL(setCurrentPage(QModelIndex)), this,
|
||||
SLOT(setCurrentPage(QModelIndex)));
|
||||
connect(m_openPagesSwitcher, &OpenPagesSwitcher::closePage, this,
|
||||
&OpenPagesManager::closePage);
|
||||
connect(m_openPagesSwitcher, &OpenPagesSwitcher::setCurrentPage,
|
||||
this, &OpenPagesManager::setCurrentPage);
|
||||
}
|
||||
|
||||
OpenPagesManager ::~OpenPagesManager()
|
||||
@@ -92,12 +93,12 @@ QWidget *OpenPagesManager::openPagesWidget() const
|
||||
{
|
||||
if (!m_openPagesWidget) {
|
||||
m_openPagesWidget = new OpenPagesWidget(m_model);
|
||||
connect(m_openPagesWidget, SIGNAL(setCurrentPage(QModelIndex)), this,
|
||||
SLOT(setCurrentPage(QModelIndex)));
|
||||
connect(m_openPagesWidget, SIGNAL(closePage(QModelIndex)), this,
|
||||
SLOT(closePage(QModelIndex)));
|
||||
connect(m_openPagesWidget, SIGNAL(closePagesExcept(QModelIndex)), this,
|
||||
SLOT(closePagesExcept(QModelIndex)));
|
||||
connect(m_openPagesWidget, &OpenPagesWidget::setCurrentPage,
|
||||
this, &OpenPagesManager::setCurrentPage);
|
||||
connect(m_openPagesWidget, &OpenPagesWidget::closePage,
|
||||
this, &OpenPagesManager::closePage);
|
||||
connect(m_openPagesWidget, &OpenPagesWidget::closePagesExcept,
|
||||
this, &OpenPagesManager::closePagesExcept);
|
||||
}
|
||||
return m_openPagesWidget;
|
||||
}
|
||||
@@ -166,13 +167,11 @@ void OpenPagesManager::setupInitialPages()
|
||||
CentralWidget::instance()->addViewer(m_model->pageAt(i));
|
||||
|
||||
emit pagesChanged();
|
||||
setCurrentPage((initialPage >= m_model->rowCount())
|
||||
setCurrentPageByRow((initialPage >= m_model->rowCount())
|
||||
? m_model->rowCount() - 1 : initialPage);
|
||||
m_openPagesSwitcher->selectCurrentPage();
|
||||
}
|
||||
|
||||
// -- public slots
|
||||
|
||||
HelpViewer *OpenPagesManager::createPage()
|
||||
{
|
||||
return createPage(QUrl(Help::Constants::AboutBlank));
|
||||
@@ -190,12 +189,12 @@ HelpViewer *OpenPagesManager::createPage(const QUrl &url)
|
||||
CentralWidget::instance()->addViewer(page);
|
||||
|
||||
emit pagesChanged();
|
||||
setCurrentPage(index);
|
||||
setCurrentPageByRow(index);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
void OpenPagesManager::setCurrentPage(int index)
|
||||
void OpenPagesManager::setCurrentPageByRow(int index)
|
||||
{
|
||||
CentralWidget::instance()->setCurrentViewer(m_model->pageAt(index));
|
||||
|
||||
@@ -207,7 +206,7 @@ void OpenPagesManager::setCurrentPage(int index)
|
||||
void OpenPagesManager::setCurrentPage(const QModelIndex &index)
|
||||
{
|
||||
if (index.isValid())
|
||||
setCurrentPage(index.row());
|
||||
setCurrentPageByRow(index.row());
|
||||
}
|
||||
|
||||
void OpenPagesManager::closeCurrentPage()
|
||||
@@ -299,8 +298,6 @@ void OpenPagesManager::showTwicherOrSelectPage() const
|
||||
}
|
||||
}
|
||||
|
||||
// -- private slots
|
||||
|
||||
void OpenPagesManager::openPagesContextMenu(const QPoint &point)
|
||||
{
|
||||
const QModelIndex &index = m_model->index(m_comboBox->currentIndex(), 0);
|
||||
|
||||
@@ -58,11 +58,10 @@ public:
|
||||
int pageCount() const;
|
||||
void setupInitialPages();
|
||||
|
||||
public slots:
|
||||
HelpViewer *createPage();
|
||||
HelpViewer *createPage(const QUrl &url);
|
||||
|
||||
void setCurrentPage(int index);
|
||||
void setCurrentPageByRow(int index);
|
||||
void setCurrentPage(const QModelIndex &index);
|
||||
|
||||
void closeCurrentPage();
|
||||
@@ -78,11 +77,8 @@ signals:
|
||||
private:
|
||||
void removePage(int index);
|
||||
void showTwicherOrSelectPage() const;
|
||||
|
||||
private slots:
|
||||
void openPagesContextMenu(const QPoint &point);
|
||||
|
||||
private:
|
||||
QComboBox *m_comboBox;
|
||||
OpenPagesModel *m_model;
|
||||
mutable OpenPagesWidget *m_openPagesWidget;
|
||||
|
||||
@@ -50,10 +50,9 @@ public:
|
||||
void removePage(int index);
|
||||
HelpViewer *pageAt(int index) const;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleTitleChanged();
|
||||
|
||||
private:
|
||||
QList<HelpViewer *> m_pages;
|
||||
};
|
||||
|
||||
|
||||
@@ -53,10 +53,10 @@ OpenPagesWidget::OpenPagesWidget(OpenPagesModel *sourceModel, QWidget *parent)
|
||||
this, &OpenPagesWidget::handleCloseActivated);
|
||||
connect(this, &OpenDocumentsTreeView::customContextMenuRequested,
|
||||
this, &OpenPagesWidget::contextMenuRequested);
|
||||
connect(model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(updateCloseButtonVisibility()));
|
||||
connect(model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(updateCloseButtonVisibility()));
|
||||
connect(model(), &QAbstractItemModel::rowsInserted,
|
||||
this, &OpenPagesWidget::updateCloseButtonVisibility);
|
||||
connect(model(), &QAbstractItemModel::rowsRemoved,
|
||||
this, &OpenPagesWidget::updateCloseButtonVisibility);
|
||||
}
|
||||
|
||||
OpenPagesWidget::~OpenPagesWidget()
|
||||
@@ -77,7 +77,7 @@ void OpenPagesWidget::allowContextMenu(bool ok)
|
||||
m_allowContextMenu = ok;
|
||||
}
|
||||
|
||||
// -- private slots
|
||||
// -- private
|
||||
|
||||
void OpenPagesWidget::contextMenuRequested(QPoint pos)
|
||||
{
|
||||
|
||||
@@ -49,13 +49,12 @@ signals:
|
||||
void closePage(const QModelIndex &index);
|
||||
void closePagesExcept(const QModelIndex &index);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void contextMenuRequested(QPoint pos);
|
||||
void handleActivated(const QModelIndex &index);
|
||||
void handleCloseActivated(const QModelIndex &index);
|
||||
void updateCloseButtonVisibility();
|
||||
|
||||
private:
|
||||
bool m_allowContextMenu;
|
||||
};
|
||||
|
||||
|
||||
@@ -94,9 +94,9 @@ HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
|
||||
|
||||
setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
|
||||
setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(dataLength));
|
||||
QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
|
||||
QTimer::singleShot(0, this, SIGNAL(readyRead()));
|
||||
QTimer::singleShot(0, this, SIGNAL(finished()));
|
||||
QTimer::singleShot(0, this, &QNetworkReply::metaDataChanged);
|
||||
QTimer::singleShot(0, this, &QIODevice::readyRead);
|
||||
QTimer::singleShot(0, this, &QNetworkReply::finished);
|
||||
}
|
||||
|
||||
qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
|
||||
@@ -145,8 +145,8 @@ QtWebKitHelpPage::QtWebKitHelpPage(QObject *parent)
|
||||
, m_keyboardModifiers(Qt::NoModifier)
|
||||
{
|
||||
setForwardUnsupportedContent(true);
|
||||
connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this,
|
||||
SLOT(onHandleUnsupportedContent(QNetworkReply*)));
|
||||
connect(this, &QWebPage::unsupportedContent, this,
|
||||
&QtWebKitHelpPage::onHandleUnsupportedContent);
|
||||
}
|
||||
|
||||
QWebPage *QtWebKitHelpPage::createWindow(QWebPage::WebWindowType)
|
||||
@@ -257,8 +257,8 @@ QtWebKitHelpWidget::QtWebKitHelpWidget(QtWebKitHelpViewer *parent)
|
||||
setPage(new QtWebKitHelpPage(this));
|
||||
HelpNetworkAccessManager *manager = new HelpNetworkAccessManager(this);
|
||||
page()->setNetworkAccessManager(manager);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply*)), this,
|
||||
SLOT(slotNetworkReplyFinished(QNetworkReply*)));
|
||||
connect(manager, &QNetworkAccessManager::finished, this,
|
||||
&QtWebKitHelpWidget::slotNetworkReplyFinished);
|
||||
|
||||
QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
|
||||
action->setText(tr("Open Link as New Page"));
|
||||
@@ -267,12 +267,12 @@ QtWebKitHelpWidget::QtWebKitHelpWidget(QtWebKitHelpViewer *parent)
|
||||
pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
|
||||
pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
|
||||
|
||||
connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
|
||||
SLOT(actionChanged()));
|
||||
connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
|
||||
SLOT(actionChanged()));
|
||||
connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
|
||||
SLOT(actionChanged()));
|
||||
connect(pageAction(QWebPage::Copy), &QAction::changed, this,
|
||||
&QtWebKitHelpWidget::actionChanged);
|
||||
connect(pageAction(QWebPage::Back), &QAction::changed, this,
|
||||
&QtWebKitHelpWidget::actionChanged);
|
||||
connect(pageAction(QWebPage::Forward), &QAction::changed, this,
|
||||
&QtWebKitHelpWidget::actionChanged);
|
||||
}
|
||||
|
||||
QtWebKitHelpWidget::~QtWebKitHelpWidget()
|
||||
@@ -289,8 +289,6 @@ void QtWebKitHelpWidget::scaleDown()
|
||||
setZoomFactor(qMax(qreal(0.0), zoomFactor() - qreal(0.1)));
|
||||
}
|
||||
|
||||
// -- public slots
|
||||
|
||||
void QtWebKitHelpWidget::copy()
|
||||
{
|
||||
triggerPageAction(QWebPage::Copy);
|
||||
@@ -348,7 +346,7 @@ void QtWebKitHelpWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
delete menu;
|
||||
}
|
||||
|
||||
// -- private slots
|
||||
// -- private
|
||||
|
||||
void QtWebKitHelpWidget::actionChanged()
|
||||
{
|
||||
@@ -395,13 +393,13 @@ QtWebKitHelpViewer::QtWebKitHelpViewer(QWidget *parent)
|
||||
p.setColor(QPalette::Text, Qt::black);
|
||||
setPalette(p);
|
||||
|
||||
connect(m_webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
|
||||
connect(m_webView, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
|
||||
connect(m_webView, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished()));
|
||||
connect(m_webView, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged()));
|
||||
connect(m_webView->page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested()));
|
||||
connect(m_webView, SIGNAL(backwardAvailable(bool)), this, SIGNAL(backwardAvailable(bool)));
|
||||
connect(m_webView, SIGNAL(forwardAvailable(bool)), this, SIGNAL(forwardAvailable(bool)));
|
||||
connect(m_webView, &QWebView::urlChanged, this, &HelpViewer::sourceChanged);
|
||||
connect(m_webView, &QWebView::loadStarted, this, &QtWebKitHelpViewer::slotLoadStarted);
|
||||
connect(m_webView, &QWebView::loadFinished, this, &QtWebKitHelpViewer::slotLoadFinished);
|
||||
connect(m_webView, &QWebView::titleChanged, this, &HelpViewer::titleChanged);
|
||||
connect(m_webView->page(), &QWebPage::printRequested, this, &HelpViewer::printRequested);
|
||||
connect(m_webView, &QtWebKitHelpWidget::backwardAvailable, this, &HelpViewer::backwardAvailable);
|
||||
connect(m_webView, &QtWebKitHelpWidget::forwardAvailable, this, &HelpViewer::forwardAvailable);
|
||||
connect(page(), &QtWebKitHelpPage::linkHovered, this, &QtWebKitHelpViewer::setToolTip);
|
||||
}
|
||||
|
||||
@@ -531,7 +529,7 @@ void QtWebKitHelpViewer::addBackHistoryItems(QMenu *backMenu)
|
||||
QAction *action = new QAction(backMenu);
|
||||
action->setText(items.at(i).title());
|
||||
action->setData(i);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(goToBackHistoryItem()));
|
||||
connect(action, &QAction::triggered, this, &QtWebKitHelpViewer::goToBackHistoryItem);
|
||||
backMenu->addAction(action);
|
||||
}
|
||||
}
|
||||
@@ -545,7 +543,7 @@ void QtWebKitHelpViewer::addForwardHistoryItems(QMenu *forwardMenu)
|
||||
QAction *action = new QAction(forwardMenu);
|
||||
action->setText(items.at(i).title());
|
||||
action->setData(i);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(goToForwardHistoryItem()));
|
||||
connect(action, &QAction::triggered, this, &QtWebKitHelpViewer::goToForwardHistoryItem);
|
||||
forwardMenu->addAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,6 @@ public:
|
||||
|
||||
QtWebKitHelpPage *page() const;
|
||||
|
||||
public slots:
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
void resetScale();
|
||||
@@ -81,12 +80,11 @@ public slots:
|
||||
void backward();
|
||||
void print(QPrinter *printer);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void goToBackHistoryItem();
|
||||
void goToForwardHistoryItem();
|
||||
void goToHistoryItem(bool forward);
|
||||
|
||||
private:
|
||||
QString m_oldHighlightId;
|
||||
QString m_oldHighlightStyle;
|
||||
QtWebKitHelpWidget *m_webView;
|
||||
@@ -102,8 +100,6 @@ public:
|
||||
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
|
||||
public slots:
|
||||
void copy();
|
||||
|
||||
signals:
|
||||
@@ -117,11 +113,9 @@ protected:
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void actionChanged();
|
||||
void slotNetworkReplyFinished(QNetworkReply *reply);
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
QtWebKitHelpViewer *m_parent;
|
||||
@@ -140,10 +134,9 @@ protected:
|
||||
virtual bool acceptNavigationRequest(QWebFrame *frame,
|
||||
const QNetworkRequest &request, NavigationType type);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void onHandleUnsupportedContent(QNetworkReply *reply);
|
||||
|
||||
private:
|
||||
QUrl m_loadingUrl;
|
||||
bool closeNewTabIfNeeded;
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ RemoteFilterOptions::RemoteFilterOptions(RemoteHelpFilter *filter, QWidget *pare
|
||||
this, &RemoteFilterOptions::addNewItem);
|
||||
connect(m_ui.remove, &QPushButton::clicked,
|
||||
this, &RemoteFilterOptions::removeItem);
|
||||
connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRemoveButton()));
|
||||
connect(m_ui.listWidget, &QListWidget::currentItemChanged,
|
||||
this, &RemoteFilterOptions::updateRemoveButton);
|
||||
updateRemoveButton();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,12 +69,11 @@ class RemoteFilterOptions : public QDialog
|
||||
public:
|
||||
explicit RemoteFilterOptions(RemoteHelpFilter *filter, QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void addNewItem();
|
||||
void removeItem();
|
||||
void updateRemoveButton();
|
||||
|
||||
private:
|
||||
RemoteHelpFilter *m_filter;
|
||||
Ui::RemoteFilterOptions m_ui;
|
||||
};
|
||||
|
||||
@@ -131,24 +131,24 @@ void SearchWidget::showEvent(QShowEvent *event)
|
||||
|
||||
setFocusProxy(queryWidget);
|
||||
|
||||
connect(queryWidget, SIGNAL(search()), this, SLOT(search()));
|
||||
connect(queryWidget, &QHelpSearchQueryWidget::search, this, &SearchWidget::search);
|
||||
connect(resultWidget, &QHelpSearchResultWidget::requestShowLink, this,
|
||||
[this](const QUrl &url) {
|
||||
emit linkActivated(url, currentSearchTerms(), false/*newPage*/);
|
||||
});
|
||||
|
||||
connect(searchEngine, SIGNAL(searchingStarted()), this,
|
||||
SLOT(searchingStarted()));
|
||||
connect(searchEngine, SIGNAL(searchingFinished(int)), this,
|
||||
SLOT(searchingFinished(int)));
|
||||
connect(searchEngine, &QHelpSearchEngine::searchingStarted, this,
|
||||
&SearchWidget::searchingStarted);
|
||||
connect(searchEngine, &QHelpSearchEngine::searchingFinished, this,
|
||||
&SearchWidget::searchingFinished);
|
||||
|
||||
QTextBrowser* browser = resultWidget->findChild<QTextBrowser*>();
|
||||
browser->viewport()->installEventFilter(this);
|
||||
|
||||
connect(searchEngine, SIGNAL(indexingStarted()), this,
|
||||
SLOT(indexingStarted()));
|
||||
connect(searchEngine, SIGNAL(indexingFinished()), this,
|
||||
SLOT(indexingFinished()));
|
||||
connect(searchEngine, &QHelpSearchEngine::indexingStarted, this,
|
||||
&SearchWidget::indexingStarted);
|
||||
connect(searchEngine, &QHelpSearchEngine::indexingFinished, this,
|
||||
&SearchWidget::indexingFinished);
|
||||
|
||||
QMetaObject::invokeMethod(&LocalHelpManager::helpEngine(), "setupFinished",
|
||||
Qt::QueuedConnection);
|
||||
@@ -207,7 +207,8 @@ void SearchWidget::indexingStarted()
|
||||
m_progress->reportStarted();
|
||||
|
||||
m_watcher.setFuture(m_progress->future());
|
||||
connect(&m_watcher, SIGNAL(canceled()), searchEngine, SLOT(cancelIndexing()));
|
||||
connect(&m_watcher, &QFutureWatcherBase::canceled,
|
||||
searchEngine, &QHelpSearchEngine::cancelIndexing);
|
||||
}
|
||||
|
||||
void SearchWidget::indexingFinished()
|
||||
@@ -259,9 +260,9 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
|
||||
openLinkInNewTab = menu.addAction(tr("Open Link as New Page"));
|
||||
copyAnchorAction = menu.addAction(tr("Copy Link"));
|
||||
} else if (browser->textCursor().hasSelection()) {
|
||||
menu.addAction(tr("Copy"), browser, SLOT(copy()));
|
||||
connect(menu.addAction(tr("Copy")), &QAction::triggered, browser, &QTextEdit::copy);
|
||||
} else {
|
||||
menu.addAction(tr("Reload"), browser, SLOT(reload()));
|
||||
connect(menu.addAction(tr("Reload")), &QAction::triggered, browser, &QTextBrowser::reload);
|
||||
}
|
||||
|
||||
QAction *usedAction = menu.exec(mapToGlobal(contextMenuEvent->pos()));
|
||||
@@ -301,8 +302,8 @@ SearchSideBarItem::SearchSideBarItem()
|
||||
: SideBarItem(new SearchWidget, QLatin1String(Constants::HELP_SEARCH))
|
||||
{
|
||||
widget()->setWindowTitle(HelpPlugin::tr(Constants::SB_SEARCH));
|
||||
connect(widget(), SIGNAL(linkActivated(QUrl,QStringList,bool)),
|
||||
this, SIGNAL(linkActivated(QUrl,QStringList,bool)));
|
||||
connect(static_cast<SearchWidget *>(widget()), &SearchWidget::linkActivated,
|
||||
this, &SearchSideBarItem::linkActivated);
|
||||
}
|
||||
|
||||
QList<QToolButton *> SearchSideBarItem::createToolBarWidgets()
|
||||
@@ -310,7 +311,7 @@ QList<QToolButton *> SearchSideBarItem::createToolBarWidgets()
|
||||
QToolButton *reindexButton = new QToolButton;
|
||||
reindexButton->setIcon(Core::Icons::RELOAD.icon());
|
||||
reindexButton->setToolTip(tr("Regenerate Index"));
|
||||
connect(reindexButton, SIGNAL(clicked()),
|
||||
widget(), SLOT(reindexDocumentation()));
|
||||
connect(reindexButton, &QAbstractButton::clicked,
|
||||
static_cast<SearchWidget *>(widget()), &SearchWidget::reindexDocumentation);
|
||||
return QList<QToolButton *>() << reindexButton;
|
||||
}
|
||||
|
||||
@@ -66,8 +66,6 @@ public:
|
||||
void zoomOut();
|
||||
void resetZoom();
|
||||
|
||||
|
||||
public slots:
|
||||
void reindexDocumentation();
|
||||
|
||||
signals:
|
||||
@@ -76,7 +74,7 @@ signals:
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void search() const;
|
||||
|
||||
void searchingStarted();
|
||||
@@ -85,12 +83,10 @@ private slots:
|
||||
void indexingStarted();
|
||||
void indexingFinished();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject* o, QEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
|
||||
QStringList currentSearchTerms() const;
|
||||
|
||||
private:
|
||||
int zoomCount;
|
||||
|
||||
QFutureWatcher<void> m_watcher;
|
||||
|
||||
@@ -68,9 +68,9 @@ TextBrowserHelpViewer::TextBrowserHelpViewer(QWidget *parent)
|
||||
|
||||
connect(m_textBrowser, &TextBrowserHelpWidget::anchorClicked,
|
||||
this, &TextBrowserHelpViewer::setSource);
|
||||
connect(m_textBrowser, SIGNAL(sourceChanged(QUrl)), this, SIGNAL(titleChanged()));
|
||||
connect(m_textBrowser, SIGNAL(forwardAvailable(bool)), this, SIGNAL(forwardAvailable(bool)));
|
||||
connect(m_textBrowser, SIGNAL(backwardAvailable(bool)), this, SIGNAL(backwardAvailable(bool)));
|
||||
connect(m_textBrowser, &QTextBrowser::sourceChanged, this, &HelpViewer::titleChanged);
|
||||
connect(m_textBrowser, &QTextBrowser::forwardAvailable, this, &HelpViewer::forwardAvailable);
|
||||
connect(m_textBrowser, &QTextBrowser::backwardAvailable, this, &HelpViewer::backwardAvailable);
|
||||
}
|
||||
|
||||
TextBrowserHelpViewer::~TextBrowserHelpViewer()
|
||||
@@ -256,8 +256,6 @@ bool TextBrowserHelpViewer::findText(const QString &text, Core::FindFlags flags,
|
||||
return !cursorIsNull;
|
||||
}
|
||||
|
||||
// -- public slots
|
||||
|
||||
void TextBrowserHelpViewer::copy()
|
||||
{
|
||||
m_textBrowser->copy();
|
||||
@@ -386,9 +384,9 @@ void TextBrowserHelpWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
}
|
||||
copyAnchorAction = menu.addAction(tr("Copy Link"));
|
||||
} else if (!textCursor().selectedText().isEmpty()) {
|
||||
menu.addAction(tr("Copy"), this, SLOT(copy()));
|
||||
connect(menu.addAction(tr("Copy")), &QAction::triggered, this, &QTextEdit::copy);
|
||||
} else {
|
||||
menu.addAction(tr("Reload"), this, SLOT(reload()));
|
||||
connect(menu.addAction(tr("Reload")), &QAction::triggered, this, &QTextBrowser::reload);
|
||||
}
|
||||
|
||||
if (copyAnchorAction == menu.exec(event->globalPos()))
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
bool findText(const QString &text, Core::FindFlags flags,
|
||||
bool incremental, bool fromSearch, bool *wrapped = 0);
|
||||
|
||||
public slots:
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
void resetScale();
|
||||
@@ -77,10 +76,9 @@ public slots:
|
||||
void backward();
|
||||
void print(QPrinter *printer);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void goToHistoryItem();
|
||||
|
||||
private:
|
||||
TextBrowserHelpWidget *m_textBrowser;
|
||||
};
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ public:
|
||||
|
||||
WebEngineHelpPage *page() const;
|
||||
|
||||
public slots:
|
||||
void scaleUp() override;
|
||||
void scaleDown() override;
|
||||
void resetScale() override;
|
||||
|
||||
@@ -89,13 +89,12 @@ public:
|
||||
QString displayName() const override;
|
||||
QString summaryText() const override;
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void buildArgumentsChanged();
|
||||
void resetDefaultArguments();
|
||||
void extraArgumentsChanged();
|
||||
void updateDetails();
|
||||
|
||||
private:
|
||||
Ui::IosBuildStep *m_ui;
|
||||
IosBuildStep *m_buildStep;
|
||||
QString m_summaryText;
|
||||
|
||||
@@ -344,7 +344,8 @@ void IosConfigurations::setDeveloperPath(const FileName &devPath)
|
||||
m_instance->save();
|
||||
if (!hasDevPath && !devPath.isEmpty()) {
|
||||
hasDevPath = true;
|
||||
QTimer::singleShot(1000, IosDeviceManager::instance(), SLOT(monitorAvailableDevices()));
|
||||
QTimer::singleShot(1000, IosDeviceManager::instance(),
|
||||
&IosDeviceManager::monitorAvailableDevices);
|
||||
m_instance->updateSimulators();
|
||||
}
|
||||
emit m_instance->updated();
|
||||
|
||||
@@ -60,13 +60,11 @@ public:
|
||||
static void setIgnoreAllDevices(bool ignoreDevices);
|
||||
static Utils::FileName developerPath();
|
||||
static Utils::FileName lldbPath();
|
||||
static void updateAutomaticKitList();
|
||||
|
||||
signals:
|
||||
void updated();
|
||||
|
||||
public slots:
|
||||
static void updateAutomaticKitList();
|
||||
|
||||
private:
|
||||
IosConfigurations(QObject *parent);
|
||||
void load();
|
||||
|
||||
@@ -77,10 +77,10 @@ void IosDeployStep::ctor()
|
||||
m_transferStatus = NoTransfer;
|
||||
cleanup();
|
||||
updateDisplayNames();
|
||||
connect(DeviceManager::instance(), SIGNAL(updated()),
|
||||
SLOT(updateDisplayNames()));
|
||||
connect(target(), SIGNAL(kitChanged()),
|
||||
SLOT(updateDisplayNames()));
|
||||
connect(DeviceManager::instance(), &DeviceManager::updated,
|
||||
this, &IosDeployStep::updateDisplayNames);
|
||||
connect(target(), &Target::kitChanged,
|
||||
this, &IosDeployStep::updateDisplayNames);
|
||||
}
|
||||
|
||||
void IosDeployStep::updateDisplayNames()
|
||||
@@ -127,14 +127,14 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
|
||||
m_futureInterface.setProgressRange(0, 200);
|
||||
m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
|
||||
m_futureInterface.reportStarted();
|
||||
connect(m_toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
|
||||
SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
|
||||
connect(m_toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
|
||||
SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
|
||||
connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
|
||||
SLOT(handleFinished(Ios::IosToolHandler*)));
|
||||
connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
|
||||
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
|
||||
connect(m_toolHandler, &IosToolHandler::isTransferringApp,
|
||||
this, &IosDeployStep::handleIsTransferringApp);
|
||||
connect(m_toolHandler, &IosToolHandler::didTransferApp,
|
||||
this, &IosDeployStep::handleDidTransferApp);
|
||||
connect(m_toolHandler, &IosToolHandler::finished,
|
||||
this, &IosDeployStep::handleFinished);
|
||||
connect(m_toolHandler, &IosToolHandler::errorMsg,
|
||||
this, &IosDeployStep::handleErrorMsg);
|
||||
checkProvisioningProfile();
|
||||
m_toolHandler->requestTransferApp(appBundle(), deviceId());
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ signals:
|
||||
//void done();
|
||||
//void error();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleIsTransferringApp(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, int progress, int maxProgress,
|
||||
const QString &info);
|
||||
@@ -80,9 +80,7 @@ private slots:
|
||||
void handleFinished(Ios::IosToolHandler *handler);
|
||||
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
||||
void updateDisplayNames();
|
||||
private:
|
||||
IosDeployStep(ProjectExplorer::BuildStepList *bc,
|
||||
IosDeployStep *other);
|
||||
IosDeployStep(ProjectExplorer::BuildStepList *bc, IosDeployStep *other);
|
||||
bool init(QList<const BuildStep *> &earlierSteps) override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
bool immutable() const override { return true; }
|
||||
@@ -97,7 +95,7 @@ private:
|
||||
void raiseError(const QString &error);
|
||||
void writeOutput(const QString &text, OutputFormat = MessageOutput);
|
||||
void checkProvisioningProfile();
|
||||
private:
|
||||
|
||||
TransferStatus m_transferStatus;
|
||||
IosToolHandler *m_toolHandler;
|
||||
QFutureInterface<bool> m_futureInterface;
|
||||
|
||||
@@ -42,7 +42,8 @@ IosDeployStepWidget::IosDeployStepWidget(IosDeployStep *step) :
|
||||
m_step(step)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(m_step, SIGNAL(displayNameChanged()), SIGNAL(updateSummary()));
|
||||
connect(m_step, &ProjectExplorer::ProjectConfiguration::displayNameChanged,
|
||||
this, &ProjectExplorer::BuildStepConfigWidget::updateSummary);
|
||||
}
|
||||
|
||||
IosDeployStepWidget::~IosDeployStepWidget()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user