Commit 5b268822 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.8'

parents d08ad003 cbfcf88f
......@@ -150,6 +150,7 @@ class SymbolResolver:
self._resolve(i)
def _resolve(self, plugin):
print 'Resolving symbols for {}...'.format(plugin.name)
for symbol in plugin.importedSymbols:
lib = self._resolveSymbol(symbol)
if lib:
......@@ -174,9 +175,12 @@ class Reporter:
spec = plugin.specDependencies
symb = {}
lib = {}
for p in plugin.symbolDependencies:
if p.isPlugin():
symb[p.name] = plugin.symbolDependencies[p]
else:
lib[p.name] = plugin.symbolDependencies[p]
for i in spec:
if i in symb:
......@@ -194,6 +198,9 @@ class Reporter:
total = symb[i]['total']
print ' {}: ERROR: undeclared ({} usages)'.format(i, total)
self._printSome(symb[i])
for i in lib:
total = lib[i]['total']
print ' LIBRARY {} used ({} usages)'.format(i, total)
def _printSome(self, data):
keys = data.keys()
......
......@@ -63,31 +63,4 @@ QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command)
return in;
}
QDebug operator<<(QDebug debug, const InformationChangedCommand &command)
{
debug << QLatin1String("InformationChangedCommand:\n");
foreach (const InformationContainer &information, command.informations()) {
if (information.nameAsString() == "Transform" ||
information.nameAsString() == "IsMovable" ||
information.nameAsString() == "BoundingRect") {
debug << QLatin1String("instanceId: ");
debug << information.instanceId();
debug << QLatin1String("\n");
debug << QLatin1String("name: ");
debug << information.nameAsString();
debug << QLatin1String("\n");
debug << information.information();
debug << QLatin1String("\n");
debug << information.secondInformation();
debug << QLatin1String("\n");
debug << information.thirdInformation();
debug << QLatin1String("\n");
debug << QLatin1String("\n");
}
}
return debug;
}
} // namespace QmlDesigner
......@@ -54,7 +54,6 @@ private:
QDataStream &operator<<(QDataStream &out, const InformationChangedCommand &command);
QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command);
QDebug operator<<(QDebug debug, const InformationChangedCommand &command);
} // namespace QmlDesigner
......
......@@ -60,47 +60,6 @@ InformationName InformationContainer::name() const
return InformationName(m_name);
}
QString InformationContainer::nameAsString() const
{
switch (name()) {
case NoName:
return QLatin1String("NoName");
case Size:
return QLatin1String("Size");
case BoundingRect:
return QLatin1String("BoundingRect");
case Transform:
return QLatin1String("Transform");
case HasAnchor:
return QLatin1String("HasAnchor");
case Anchor:
return QLatin1String("Anchor");
case InstanceTypeForProperty:
return QLatin1String("InstanceTypeForProperty");
case PenWidth:
return QLatin1String("PenWidth");
case Position:
return QLatin1String("Position");
case IsInLayoutable:
return QLatin1String("IsInLayoutable");
case SceneTransform:
return QLatin1String("SceneTransform");
case IsResizable:
return QLatin1String("IsResizable");
case IsMovable:
return QLatin1String("IsMovable");
case IsAnchoredByChildren:
return QLatin1String("IsAnchoredByChildren");
case IsAnchoredBySibling:
return QLatin1String("IsAnchoredBySibling");
case HasContent:
return QLatin1String("HasContent");
case HasBindingForProperty:
return QLatin1String("HasBindingForProperty");
}
return QLatin1String("Unknown");
}
QVariant InformationContainer::information() const
{
return m_information;
......
......@@ -54,7 +54,6 @@ public:
qint32 instanceId() const;
InformationName name() const;
QString nameAsString() const;
QVariant information() const;
QVariant secondInformation() const;
QVariant thirdInformation() const;
......
......@@ -4,7 +4,6 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "Aggregation"
Depends { name: "cpp" }
Depends { name: "Qt.core" }
cpp.defines: base.concat("AGGREGATION_LIBRARY")
......
......@@ -11,7 +11,6 @@ QtcLibrary {
])
cpp.optimization: "fast"
Depends { name: "cpp" }
Depends { name: "Qt.widgets" }
Group {
......@@ -169,7 +168,6 @@ QtcLibrary {
]
Export {
Depends { name: "cpp" }
cpp.includePaths: [
"../3rdparty"
]
......
......@@ -9,7 +9,6 @@ QtcLibrary {
"IDE_TEST_DIR=\".\""
])
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["core", "widgets"] }
Depends { name: "Aggregation" }
......
......@@ -8,7 +8,6 @@ QtcLibrary {
"GLSL_BUILD_LIB"
])
Depends { name: "cpp" }
Depends { name: "Qt.gui" }
files: [
......
......@@ -10,7 +10,6 @@ QtcLibrary {
])
cpp.optimization: "fast"
Depends { name: "cpp" }
Depends { name: "Qt.core" }
files: [
......
......@@ -6,7 +6,6 @@ QtcLibrary {
cpp.defines: base.concat("QMLDEBUG_LIB")
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["gui", "network"] }
files: [
......
......@@ -11,7 +11,6 @@ QtcLibrary {
])
cpp.optimization: "fast"
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "declarative", "script"] }
Depends { name: "QmlJS" }
Depends { name: "Utils" }
......
......@@ -12,7 +12,6 @@ QtcLibrary {
Depends { name: "Utils" }
Depends { name: "LanguageUtils" }
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "script"] }
files: [
......@@ -107,7 +106,6 @@ QtcLibrary {
]
Export {
Depends { name: "cpp" }
Depends { name: "LanguageUtils" }
}
}
......
......@@ -8,7 +8,6 @@ QtcLibrary {
cpp.includePaths: botanIncludes
cpp.dynamicLibraries: botanLibs
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "network" ] }
files: [
......
......@@ -6,7 +6,6 @@ QtcTool {
consoleApplication: true
condition: qbs.targetOS == "windows"
Depends { name: "cpp" }
files: [ "process_ctrlc_stub.cpp" ]
......
......@@ -5,7 +5,6 @@ QtcTool {
name: "qtcreator_process_stub"
consoleApplication: true
Depends { name: "cpp" }
files: {
if (qbs.targetOS == "windows") {
......
......@@ -19,7 +19,6 @@ QtcLibrary {
cpp.dynamicLibraries: ["X11"]
}
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "network", "script", "concurrent"] }
Depends { name: "app_version_header" }
......@@ -212,10 +211,7 @@ QtcLibrary {
}
Export {
// ### [ remove, once qbs supports merging of Export items in derived products
Depends { name: "cpp" }
cpp.includePaths: [ ".." ]
// ### ]
Depends { name: "Qt"; submodules: ["concurrent", "widgets" ] }
}
}
......
......@@ -4,7 +4,6 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "zeroconf"
Depends { name: "cpp" }
Depends { name: "Qt.network" }
cpp.includePaths: base.concat(".")
......
......@@ -263,12 +263,16 @@ void AndroidManifestEditorWidget::initializePage()
<< QLatin1String("android.permission.ACCESS_SURFACE_FLINGER")
<< QLatin1String("android.permission.ACCESS_WIFI_STATE")
<< QLatin1String("android.permission.ACCOUNT_MANAGER")
<< QLatin1String("com.android.voicemail.permission.ADD_VOICEMAIL")
<< QLatin1String("android.permission.AUTHENTICATE_ACCOUNTS")
<< QLatin1String("android.permission.BATTERY_STATS")
<< QLatin1String("android.permission.BIND_ACCESSIBILITY_SERVICE")
<< QLatin1String("android.permission.BIND_APPWIDGET")
<< QLatin1String("android.permission.BIND_DEVICE_ADMIN")
<< QLatin1String("android.permission.BIND_INPUT_METHOD")
<< QLatin1String("android.permission.BIND_REMOTEVIEWS")
<< QLatin1String("android.permission.BIND_TEXT_SERVICE")
<< QLatin1String("android.permission.BIND_VPN_SERVICE")
<< QLatin1String("android.permission.BIND_WALLPAPER")
<< QLatin1String("android.permission.BLUETOOTH")
<< QLatin1String("android.permission.BLUETOOTH_ADMIN")
......@@ -320,16 +324,20 @@ void AndroidManifestEditorWidget::initializePage()
<< QLatin1String("android.permission.PERSISTENT_ACTIVITY")
<< QLatin1String("android.permission.PROCESS_OUTGOING_CALLS")
<< QLatin1String("android.permission.READ_CALENDAR")
<< QLatin1String("android.permission.READ_CALL_LOG")
<< QLatin1String("android.permission.READ_CONTACTS")
<< QLatin1String("android.permission.READ_EXTERNAL_STORAGE")
<< QLatin1String("android.permission.READ_FRAME_BUFFER")
<< QLatin1String("com.android.browser.permission.READ_HISTORY_BOOKMARKS")
<< QLatin1String("android.permission.READ_INPUT_STATE")
<< QLatin1String("android.permission.READ_LOGS")
<< QLatin1String("android.permission.READ_OWNER_DATA")
<< QLatin1String("android.permission.READ_PHONE_STATE")
<< QLatin1String("android.permission.READ_PROFILE")
<< QLatin1String("android.permission.READ_SMS")
<< QLatin1String("android.permission.READ_SOCIAL_STREAM")
<< QLatin1String("android.permission.READ_SYNC_SETTINGS")
<< QLatin1String("android.permission.READ_SYNC_STATS")
<< QLatin1String("android.permission.READ_USER_DICTIONARY")
<< QLatin1String("android.permission.REBOOT")
<< QLatin1String("android.permission.RECEIVE_BOOT_COMPLETED")
<< QLatin1String("android.permission.RECEIVE_MMS")
......@@ -345,6 +353,7 @@ void AndroidManifestEditorWidget::initializePage()
<< QLatin1String("android.permission.SET_ANIMATION_SCALE")
<< QLatin1String("android.permission.SET_DEBUG_APP")
<< QLatin1String("android.permission.SET_ORIENTATION")
<< QLatin1String("android.permission.SET_POINTER_SPEED")
<< QLatin1String("android.permission.SET_PREFERRED_APPLICATIONS")
<< QLatin1String("android.permission.SET_PROCESS_LIMIT")
<< QLatin1String("android.permission.SET_TIME")
......@@ -363,15 +372,18 @@ void AndroidManifestEditorWidget::initializePage()
<< QLatin1String("android.permission.WAKE_LOCK")
<< QLatin1String("android.permission.WRITE_APN_SETTINGS")
<< QLatin1String("android.permission.WRITE_CALENDAR")
<< QLatin1String("android.permission.WRITE_CALL_LOG")
<< QLatin1String("android.permission.WRITE_CONTACTS")
<< QLatin1String("android.permission.WRITE_EXTERNAL_STORAGE")
<< QLatin1String("android.permission.WRITE_GSERVICES")
<< QLatin1String("com.android.browser.permission.WRITE_HISTORY_BOOKMARKS")
<< QLatin1String("android.permission.WRITE_OWNER_DATA")
<< QLatin1String("android.permission.WRITE_PROFILE")
<< QLatin1String("android.permission.WRITE_SECURE_SETTINGS")
<< QLatin1String("android.permission.WRITE_SETTINGS")
<< QLatin1String("android.permission.WRITE_SMS")
<< QLatin1String("android.permission.WRITE_SOCIAL_STREAM")
<< QLatin1String("android.permission.WRITE_SYNC_SETTINGS")
<< QLatin1String("android.permission.WRITE_USER_DICTIONARY")
);
m_permissionsComboBox->setEditable(true);
layout->addWidget(m_permissionsComboBox, 4, 0);
......
......@@ -79,9 +79,7 @@ AutotoolsProject::AutotoolsProject(AutotoolsManager *manager, const QString &fil
m_makefileParserThread(0)
{
setProjectContext(Core::Context(Constants::PROJECT_CONTEXT));
Core::Context pl(ProjectExplorer::Constants::LANG_CXX);
pl.add(ProjectExplorer::Constants::LANG_QMLJS);
setProjectLanguages(pl);
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
const QFileInfo fileInfo(m_fileName);
m_projectName = fileInfo.absoluteDir().dirName();
......
......@@ -32,3 +32,5 @@ SOURCES = autotoolsprojectplugin.cpp\
makefileparserthread.cpp\
makefileparser.cpp
RESOURCES += autotoolsproject.qrc
OTHER_FILES += AutotoolsProject.mimetypes.xml
......@@ -12,6 +12,7 @@ QtcPlugin {
Depends { name: "CppTools" }
files: [
"AutotoolsProject.mimetypes.xml",
"autogenstep.cpp",
"autogenstep.h",
"autoreconfstep.cpp",
......
......@@ -12,7 +12,6 @@ QtcPlugin {
Depends { name: "VcsBase" }
Depends { name: "Locator" }
Depends { name: "cpp" }
files: [
"annotationhighlighter.cpp",
......
......@@ -606,7 +606,7 @@ void BazaarPlugin::testDiffFileResolving_data()
void BazaarPlugin::testDiffFileResolving()
{
BazaarEditor editor(editorParameters + 3, 0);
BazaarEditor editor(editorParameters + 2, 0);
editor.testDiffFileResolving();
}
......@@ -630,7 +630,7 @@ void BazaarPlugin::testLogResolving()
" (gz) Set approved revision and vote \"Approve\" when using lp-propose\n"
" --approve (Jonathan Lange)\n"
);
BazaarEditor editor(editorParameters + 1, 0);
BazaarEditor editor(editorParameters, 0);
editor.testLogResolving(data, "6572", "6571");
}
#endif
......
......@@ -12,7 +12,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
Depends { name: "cpp" }
files: [
"classview.qrc",
......
......@@ -35,3 +35,5 @@ FORMS += checkoutdialog.ui \
versionselector.ui
RESOURCES += clearcase.qrc
OTHER_FILES += ClearCase.mimetypes.xml
......@@ -17,6 +17,7 @@ QtcPlugin {
Depends { name: "Locator" }
files: [
"ClearCase.mimetypes.xml",
"activityselector.cpp",
"activityselector.h",
"annotationhighlighter.cpp",
......
......@@ -2094,7 +2094,7 @@ void ClearCasePlugin::testDiffFileResolving_data()
void ClearCasePlugin::testDiffFileResolving()
{
ClearCaseEditor editor(editorParameters + 3, 0);
ClearCaseEditor editor(editorParameters + 2, 0);
editor.testDiffFileResolving();
}
......@@ -2104,7 +2104,7 @@ void ClearCasePlugin::testLogResolving()
"13-Sep.17:41 user1 create version \"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/9\" (baseline1, baseline2, ...)\n"
"22-Aug.14:13 user2 create version \"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/8\" (baseline3, baseline4, ...)\n"
);
ClearCaseEditor editor(editorParameters + 1, 0);
ClearCaseEditor editor(editorParameters, 0);
editor.testLogResolving(data,
"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/9",
"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/8");
......
......@@ -109,10 +109,7 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
m_lastEditor(0)
{
setProjectContext(Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT));
Core::Context pl(ProjectExplorer::Constants::LANG_CXX);
pl.add(ProjectExplorer::Constants::LANG_QMLJS);
setProjectLanguages(pl);
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
m_file = new CMakeFile(this, fileName);
......
......@@ -255,7 +255,6 @@ QtcPlugin {
}
Export {
Depends { name: "cpp" }
Depends { name: "Aggregation" }
Depends { name: "Utils" }
}
......
......@@ -1028,6 +1028,11 @@ bool EditorManager::closeEditors(const QList<IEditor*> &editorsToClose, bool ask
if (EditorView *view = viewForEditor(editor)) {
if (editor == view->currentEditor())
closedViews += view;
if (d->m_currentEditor == editor) {
// avoid having a current editor without view
setCurrentView(view);
setCurrentEditor(0);
}
view->removeEditor(editor);
}
}
......@@ -1494,9 +1499,7 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
// back to the default editor:
if (!editor)
editor = createEditor(Id(), fn);
if (!editor) // Internal error
return 0;
QTC_ASSERT(editor, return 0);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
QString errorString;
if (!editor->open(&errorString, fn, realFn)) {
......
......@@ -29,8 +29,11 @@
#include "icore.h"
#include <app/app_version.h>
#include <extensionsystem/pluginmanager.h>
#include <QSysInfo>
/*!
\namespace Core
\brief The Core namespace contains all classes that make up the Core plugin
......@@ -501,6 +504,41 @@ QString ICore::userResourcePath()
return urp;
}
static QString compilerString()
{
#if defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too
QString isAppleString;
#if defined(__apple_build_version__) // Apple clang has other version numbers
isAppleString = QLatin1String(" (Apple)");
#endif
return QLatin1String("Clang " ) + QString::number(__clang_major__) + QLatin1Char('.')
+ QString::number(__clang_minor__) + isAppleString;
#elif defined(Q_CC_GNU)
return QLatin1String("GCC " ) + QLatin1String(__VERSION__);
#elif defined(Q_CC_MSVC)
if (_MSC_VER >= 1500) // 1500: MSVC 2008, 1600: MSVC 2010, ...
return QLatin1String("MSVC ") + QString::number(2008 + 2 * ((_MSC_VER / 100) - 15));
#endif
return QLatin1String("<unknown compiler>");
}
QString ICore::versionString()
{
QString ideVersionDescription;
#ifdef IDE_VERSION_DESCRIPTION
ideVersionDescription = tr(" (%1)").arg(QLatin1String(Constants::IDE_VERSION_DESCRIPTION_STR));
#endif
return tr("Qt Creator %1%2").arg(QLatin1String(Constants::IDE_VERSION_LONG),
ideVersionDescription);
}
QString ICore::buildCompatibilityString()
{
return tr("Based on Qt %1 (%2, %3 bit)").arg(QLatin1String(qVersion()),
compilerString(),
QString::number(QSysInfo::WordSize));
}
IContext *ICore::currentContextObject()
{
return m_mainwindow->currentContextObject();
......
......@@ -113,6 +113,9 @@ public:
static QString resourcePath();
static QString userResourcePath();
static QString versionString();
static QString buildCompatibilityString();
static QWidget *mainWindow();
static Utils::AppMainWindow *appMainWindow();
static QStatusBar *statusBar();
......
......@@ -494,16 +494,17 @@ void ProgressManagerPrivate::updateSummaryProgressBar()
m_summaryProgressBar->setFinished(false);
QMapIterator<QFutureWatcher<void> *, QString> it(m_runningTasks);
int range = 0;
static const int TASK_RANGE = 100;
int value = 0;
while (it.hasNext()) {
it.next();
QFutureWatcher<void> *watcher = it.key();
int min = watcher->progressMinimum();
range += watcher->progressMaximum() - min;
value += watcher->progressValue() - min;
int range = watcher->progressMaximum() - min;
if (range > 0)
value += TASK_RANGE * (watcher->progressValue() - min) / range;
}
m_summaryProgressBar->setRange(0, range);
m_summaryProgressBar->setRange(0, TASK_RANGE * m_runningTasks.size());
m_summaryProgressBar->setValue(value);
}
......
......@@ -31,10 +31,9 @@
#include <app/app_version.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
#include <QSysInfo>
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QLabel>
......@@ -55,13 +54,6 @@ VersionDialog::VersionDialog(QWidget *parent)
QGridLayout *layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize);
QString version = QLatin1String(Constants::IDE_VERSION_LONG);
QString ideVersionDescription;
#ifdef IDE_VERSION_DESCRIPTION
ideVersionDescription = tr("(%1)").arg(QLatin1String(Constants::IDE_VERSION_DESCRIPTION_STR));
#endif
QString ideRev;
#ifdef IDE_REVISION
//: This gets conditionally inserted as argument %8 into the description string.
......@@ -69,23 +61,24 @@ VersionDialog::VersionDialog(QWidget *parent)
#endif
const QString description = tr(