forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.8'
Conflicts: src/plugins/fakevim/fakevimhandler.cpp Change-Id: I8101f18b87859924644471817d4f1408790d5628
This commit is contained in:
@@ -55,7 +55,7 @@ using namespace Core::Internal;
|
||||
\class Core::ActionManager
|
||||
\mainclass
|
||||
|
||||
\brief The action manager is responsible for registration of menus and
|
||||
\brief The ActionManager class is responsible for registration of menus and
|
||||
menu items and keyboard shortcuts.
|
||||
|
||||
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
|
||||
|
||||
@@ -37,7 +37,8 @@ using namespace Core;
|
||||
/*!
|
||||
\class Core::CommandButton
|
||||
|
||||
\brief A tool button associated with one of registered Command objects.
|
||||
\brief The CommandButton class is a tool button associated with one of
|
||||
the registered Command objects.
|
||||
|
||||
Tooltip of this button consists of toolTipBase property value and Command's
|
||||
key sequence which is automatically updated when user changes it.
|
||||
|
||||
@@ -100,8 +100,9 @@ void BaseFileWizardParameterData::clear()
|
||||
|
||||
/*!
|
||||
\class Core::BaseFileWizardParameters
|
||||
\brief Parameter class for passing parameters to instances of class Wizard
|
||||
containing name, icon and such.
|
||||
\brief The BaseFileWizardParameters class is a parameter class for
|
||||
passing parameters to instances of the class Wizard containing name, icon,
|
||||
and so on.
|
||||
|
||||
\sa Core::GeneratedFile, Core::BaseFileWizard, Core::StandardFileWizard
|
||||
\sa Core::Internal::WizardEventLoop
|
||||
@@ -341,7 +342,8 @@ void WizardEventLoop::rejected()
|
||||
|
||||
/*!
|
||||
\class Core::BaseFileWizard
|
||||
\brief A generic wizard for creating files.
|
||||
\brief The BaseFileWizard class implements a generic wizard for
|
||||
creating files.
|
||||
|
||||
The abstract methods:
|
||||
\list
|
||||
@@ -780,7 +782,8 @@ QString BaseFileWizard::preferredSuffix(const QString &mimeType)
|
||||
|
||||
/*!
|
||||
\class Core::StandardFileWizard
|
||||
\brief Convenience class for creating one file.
|
||||
\brief The StandardFileWizard class is a convenience class for
|
||||
creating one file.
|
||||
|
||||
It uses Utils::FileWizardDialog and introduces a new virtual to generate the
|
||||
files from path and name.
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<file>images/replace.png</file>
|
||||
<file>images/reset.png</file>
|
||||
<file>images/sidebaricon.png</file>
|
||||
<file>images/topbaricon.png</file>
|
||||
<file>images/splitbutton_horizontal.png</file>
|
||||
<file>images/statusbar.png</file>
|
||||
<file>images/undo.png</file>
|
||||
|
||||
@@ -194,6 +194,7 @@ const char ICON_CLEAR[] = ":/core/images/clear.png";
|
||||
const char ICON_RESET[] = ":/core/images/reset.png";
|
||||
const char ICON_MAGNIFIER[] = ":/core/images/magnifier.png";
|
||||
const char ICON_TOGGLE_SIDEBAR[] = ":/core/images/sidebaricon.png";
|
||||
const char ICON_TOGGLE_TOPBAR[] = ":/core/images/topbaricon.png";
|
||||
const char ICON_CLOSE_DOCUMENT[] = ":/core/images/button_close.png";
|
||||
const char ICON_CLOSE[] = ":/core/images/closebutton.png";
|
||||
const char ICON_CLOSE_DARK[] = ":/core/images/darkclosebutton.png";
|
||||
|
||||
@@ -25,13 +25,13 @@ QtcPlugin {
|
||||
])
|
||||
|
||||
cpp.dynamicLibraries: {
|
||||
if (qbs.targetOS == "windows") return [
|
||||
if (qbs.targetOS.contains("windows")) return [
|
||||
"ole32",
|
||||
"user32"
|
||||
]
|
||||
}
|
||||
|
||||
cpp.frameworks: qbs.targetOS === "mac" ? ["AppKit"] : undefined
|
||||
cpp.frameworks: qbs.targetOS.contains("mac") ? ["AppKit"] : undefined
|
||||
|
||||
files: [
|
||||
"basefilewizard.cpp",
|
||||
@@ -233,7 +233,7 @@ QtcPlugin {
|
||||
|
||||
Group {
|
||||
name: "ProgressManager_win"
|
||||
condition: qbs.targetOS == "windows"
|
||||
condition: qbs.targetOS.contains("windows")
|
||||
files: [
|
||||
"progressmanager/progressmanager_win.cpp",
|
||||
]
|
||||
@@ -241,7 +241,7 @@ QtcPlugin {
|
||||
|
||||
Group {
|
||||
name: "ProgressManager_mac"
|
||||
condition: qbs.targetOS == "mac"
|
||||
condition: qbs.targetOS.contains("mac")
|
||||
files: [
|
||||
"macfullscreen.h",
|
||||
"macfullscreen.mm",
|
||||
@@ -251,7 +251,7 @@ QtcPlugin {
|
||||
|
||||
Group {
|
||||
name: "ProgressManager_x11"
|
||||
condition: qbs.targetPlatform.indexOf("unix") != -1 && qbs.targetOS != "mac"
|
||||
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("mac")
|
||||
files: [
|
||||
"progressmanager/progressmanager_x11.cpp",
|
||||
]
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
/*!
|
||||
\class Core::IOptionsPage
|
||||
\mainclass
|
||||
\brief The IOptionsPage is an interface for providing options pages.
|
||||
\brief The IOptionsPage class is an interface for providing pages for the
|
||||
\gui Options dialog (called \gui Preferences on Mac OS).
|
||||
|
||||
You need to subclass this interface and put an instance of your subclass
|
||||
into the plugin manager object pool (e.g. ExtensionSystem::PluginManager::addObject).
|
||||
|
||||
@@ -44,9 +44,11 @@ enum { FileNameRole = Qt::UserRole + 1 };
|
||||
|
||||
/*!
|
||||
\class Core::Internal::PromptOverwriteDialog
|
||||
\brief Prompts the user to overwrite a list of files, which he can check.
|
||||
\brief The PromptOverwriteDialog class implements a dialog that asks
|
||||
users whether they want to overwrite files.
|
||||
|
||||
Displays the common folder and the files in a checkable list.
|
||||
The dialog displays the common folder and the files in a list where users
|
||||
can select the files to overwrite.
|
||||
*/
|
||||
|
||||
static inline QString fileNameOfItem(const QStandardItem *item)
|
||||
|
||||
@@ -106,7 +106,8 @@ ReadOnlyFilesDialogPrivate::~ReadOnlyFilesDialogPrivate()
|
||||
|
||||
/*!
|
||||
* \class ReadOnlyFilesDialog
|
||||
* \brief Dialog to show a set of files which are classified as not writable.
|
||||
* \brief The ReadOnlyFilesDialog class implements a dialog to show a set of
|
||||
* files that are classified as not writable.
|
||||
*
|
||||
* Automatically checks which operations are allowed to make the file writable. These operations
|
||||
* are Make Writable which tries to set the file permissions in the file system,
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QSet>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
#include <QAction>
|
||||
@@ -65,7 +64,7 @@
|
||||
\class Core::DocumentManager
|
||||
\mainclass
|
||||
\inheaderfile documentmanager.h
|
||||
\brief Manages a set of IDocument objects.
|
||||
\brief The DocumentManager class manages a set of IDocument objects.
|
||||
|
||||
The DocumentManager service monitors a set of IDocument's. Plugins should register
|
||||
files they work with at the service. The files the IDocument's point to will be
|
||||
@@ -157,7 +156,6 @@ struct DocumentManagerPrivate
|
||||
QString m_projectsDirectory;
|
||||
bool m_useProjectsDirectory;
|
||||
QString m_buildDirectory;
|
||||
QSet<QString> m_expectedDirectories;
|
||||
// When we are callling into a IDocument
|
||||
// we don't want to receive a changed()
|
||||
// signal
|
||||
@@ -218,10 +216,9 @@ DocumentManager::DocumentManager(QMainWindow *mw)
|
||||
{
|
||||
d = new DocumentManagerPrivate(mw);
|
||||
m_instance = this;
|
||||
connect(d->m_mainWindow, SIGNAL(windowActivated()),
|
||||
this, SLOT(mainWindowActivated()));
|
||||
connect(ICore::instance(), SIGNAL(contextChanged(QList<Core::IContext*>,Core::Context)),
|
||||
this, SLOT(syncWithEditor(QList<Core::IContext*>)));
|
||||
qApp->installEventFilter(this);
|
||||
|
||||
readSettings();
|
||||
}
|
||||
@@ -549,46 +546,6 @@ void DocumentManager::unexpectFileChange(const QString &fileName)
|
||||
updateExpectedState(fixedResolvedName);
|
||||
}
|
||||
|
||||
static QString dirWithTrailingSlash(const QString &directory)
|
||||
{
|
||||
static const QChar slash(QLatin1Char('/'));
|
||||
return directory.endsWith(slash) ? directory : directory + slash;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Any subsequent change to any file inside \a directory is treated as
|
||||
* an expected file change.
|
||||
*
|
||||
* \see DocumentManager::unexpectDirectoryChange(const QString &directory)
|
||||
*/
|
||||
void DocumentManager::expectDirectoryChange(const QString &directory)
|
||||
{
|
||||
QTC_ASSERT(!directory.isEmpty(), return);
|
||||
d->m_expectedDirectories.insert(dirWithTrailingSlash(directory));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Any subsequent change to any file inside \a directory is unexpected again.
|
||||
*
|
||||
* \see DocumentManager::expectDirectoryChange(const QString &directory)
|
||||
*/
|
||||
void DocumentManager::unexpectDirectoryChange(const QString &directory)
|
||||
{
|
||||
QTimer *timer = new QTimer;
|
||||
timer->setProperty("directory", QString(dirWithTrailingSlash(directory)));
|
||||
connect(timer, SIGNAL(timeout()), instance(), SLOT(clearExpectedDirectory()));
|
||||
timer->setSingleShot(true);
|
||||
timer->start(300);
|
||||
}
|
||||
|
||||
|
||||
void DocumentManager::clearExpectedDirectory()
|
||||
{
|
||||
if (QTimer *timer = qobject_cast<QTimer *>(sender())) {
|
||||
d->m_expectedDirectories.remove(timer->property("directory").toString());
|
||||
timer->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Tries to save the files listed in \a documents. The \a cancelled argument is set to true
|
||||
@@ -854,19 +811,11 @@ void DocumentManager::changedFile(const QString &fileName)
|
||||
QTimer::singleShot(200, this, SLOT(checkForReload()));
|
||||
}
|
||||
|
||||
void DocumentManager::mainWindowActivated()
|
||||
{
|
||||
//we need to do this asynchronously because
|
||||
//opening a dialog ("Reload?") in a windowactivated event
|
||||
//freezes on Mac
|
||||
QTimer::singleShot(0, this, SLOT(checkForReload()));
|
||||
}
|
||||
|
||||
void DocumentManager::checkForReload()
|
||||
{
|
||||
if (d->m_changedFiles.isEmpty())
|
||||
return;
|
||||
if (QApplication::activeWindow() != d->m_mainWindow)
|
||||
if (!QApplication::activeWindow() || QApplication::activeModalWidget())
|
||||
return;
|
||||
|
||||
if (d->m_blockActivated)
|
||||
@@ -945,18 +894,9 @@ void DocumentManager::checkForReload()
|
||||
continue;
|
||||
|
||||
// was the change unexpected?
|
||||
if ((currentState.modified != expectedState.modified
|
||||
|| currentState.permissions != expectedState.permissions)
|
||||
if ((currentState.modified != expectedState.modified || currentState.permissions != expectedState.permissions)
|
||||
&& !expectedFileNames.contains(fileName)) {
|
||||
bool expectedDir = false;
|
||||
foreach (const QString &expectedDirectory, d->m_expectedDirectories) {
|
||||
if (fileName.startsWith(expectedDirectory)) {
|
||||
expectedDir = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!expectedDir)
|
||||
trigger = IDocument::TriggerExternal;
|
||||
trigger = IDocument::TriggerExternal;
|
||||
}
|
||||
|
||||
// find out the type
|
||||
@@ -1416,6 +1356,15 @@ void DocumentManager::slotExecuteOpenWithMenuAction(QAction *action)
|
||||
executeOpenWithMenuAction(action);
|
||||
}
|
||||
|
||||
bool DocumentManager::eventFilter(QObject *obj, QEvent *e)
|
||||
{
|
||||
if (obj == qApp && e->type() == QEvent::ApplicationActivate) {
|
||||
// activeWindow is not necessarily set yet, do checkForReload asynchronously
|
||||
QTimer::singleShot(0, this, SLOT(checkForReload()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// -------------- FileChangeBlocker
|
||||
|
||||
FileChangeBlocker::FileChangeBlocker(const QString &fileName)
|
||||
|
||||
@@ -74,9 +74,6 @@ public:
|
||||
static void expectFileChange(const QString &fileName);
|
||||
static void unexpectFileChange(const QString &fileName);
|
||||
|
||||
static void expectDirectoryChange(const QString &directory);
|
||||
static void unexpectDirectoryChange(const QString &directory);
|
||||
|
||||
// recent files
|
||||
static void addToRecentFiles(const QString &fileName, const Id &editorId = Id());
|
||||
Q_SLOT void clearRecentFiles();
|
||||
@@ -145,15 +142,16 @@ signals:
|
||||
/// emitted if one document changed its name e.g. due to save as
|
||||
void documentRenamed(Core::IDocument *document, const QString &from, const QString &to);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *e);
|
||||
|
||||
private slots:
|
||||
void documentDestroyed(QObject *obj);
|
||||
void fileNameChanged(const QString &oldName, const QString &newName);
|
||||
void checkForNewFileName();
|
||||
void checkForReload();
|
||||
void changedFile(const QString &file);
|
||||
void mainWindowActivated();
|
||||
void syncWithEditor(const QList<Core::IContext *> &context);
|
||||
void clearExpectedDirectory();
|
||||
};
|
||||
|
||||
/*! The FileChangeBlocker blocks all change notifications to all IDocument * that
|
||||
|
||||
@@ -1249,8 +1249,7 @@ Core::IEditor *EditorManager::activateEditorForDocument(Core::Internal::EditorVi
|
||||
if (editors.isEmpty())
|
||||
return 0;
|
||||
|
||||
activateEditor(view, editors.first(), flags);
|
||||
return editors.first();
|
||||
return activateEditor(view, editors.first(), flags);
|
||||
}
|
||||
|
||||
/* For something that has a 'QStringList mimeTypes' (IEditorFactory
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
/*!
|
||||
\class Core::IEditor
|
||||
\brief The IEditor is an interface for providing different editors for different file types.
|
||||
\brief The IEditor class is an interface for providing different editors for
|
||||
different file types.
|
||||
|
||||
Classes that implement this interface are for example the editors for
|
||||
C++ files, ui-files and resource files.
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
\class Core::IExternalEditor
|
||||
\mainclass
|
||||
|
||||
\brief Core::IExternalEditor allows for registering an external
|
||||
Editor in the \gui{Open With...} dialogs .
|
||||
\brief The IExternalEditor class enables registering an external
|
||||
editor in the \gui{Open with} dialog.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
\class Core::IFeatureProvider
|
||||
\mainclass
|
||||
|
||||
\brief The class IFeatureProvider defines an interface to manage features for wizards
|
||||
\brief The IFeatureProvider class defines an interface to manage features
|
||||
for wizards.
|
||||
|
||||
The features provided by an object in the object pool implementing IFeatureProvider
|
||||
will be respected by wizards implementing IWizard.
|
||||
@@ -68,10 +69,8 @@
|
||||
/*!
|
||||
\class Core::Feature
|
||||
|
||||
\brief This class describes a single Feature
|
||||
|
||||
This class describes a single Feature to be used
|
||||
in Core::FeatureProvider::Features.
|
||||
\brief The Feature class describes a single feature to be used in
|
||||
Core::FeatureProvider::Features.
|
||||
|
||||
\sa Core::FeaturesSet
|
||||
\sa Core::IWizard
|
||||
@@ -81,12 +80,10 @@
|
||||
/*!
|
||||
\class Core::FeatureSet
|
||||
|
||||
\brief This class is a set of features
|
||||
\brief The FeatureSet class is a set of available or required feature sets.
|
||||
|
||||
Features is used to describe available or
|
||||
required feature sets and behaves similar to QFlags.
|
||||
|
||||
But instead of enums Features relies on string ids
|
||||
This class behaves similarly to QFlags. However, instead of enums, Features
|
||||
relies on string ids
|
||||
and is therefore extendable.
|
||||
|
||||
\sa Core::Feature
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Core {
|
||||
|
||||
/*!
|
||||
\class Core::GeneratedFile
|
||||
\brief Represents a file generated by a wizard.
|
||||
\brief The GeneratedFile class represents a file generated by a wizard.
|
||||
|
||||
The Wizard class will check for each file whether it already exists and will
|
||||
report any errors that may occur during creation of the files.
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
/*!
|
||||
\class Core::ICore
|
||||
\brief The ICore class allows access to the different part that make up
|
||||
the basic functionality of Qt Creator.
|
||||
\brief The ICore class allows access to the different parts that make up
|
||||
the basic functionality of \QC.
|
||||
|
||||
You should never create a subclass of this interface. The one and only
|
||||
instance is created by the Core plugin. You can access this instance
|
||||
|
||||
@@ -38,8 +38,8 @@ class IEditor;
|
||||
/*!
|
||||
\class Core::ICoreListener
|
||||
|
||||
\brief Provides a hook for plugins to veto on certain events emitted from
|
||||
the core plugin.
|
||||
\brief The ICoreListener class provides a hook for plugins to veto on certain
|
||||
events emitted from the core plugin.
|
||||
|
||||
You implement this interface if you want to prevent certain events from
|
||||
occurring, e.g. if you want to prevent the closing of the whole application
|
||||
|
||||
@@ -43,8 +43,8 @@ namespace Core {
|
||||
/*!
|
||||
\class Core::Id
|
||||
|
||||
\brief The class Id encapsulates an identifier that is unique
|
||||
within a specific running Qt Creator process.
|
||||
\brief The Id class encapsulates an identifier that is unique
|
||||
within a specific running \QC process.
|
||||
|
||||
\c{Core::Id} is used as facility to identify objects of interest
|
||||
in a more typesafe and faster manner than a plain \c QString or
|
||||
|
||||
@@ -112,7 +112,8 @@ signals:
|
||||
void changed();
|
||||
|
||||
void aboutToReload();
|
||||
void reloaded();
|
||||
void reloadFinished(bool success);
|
||||
|
||||
void fileNameChanged(const QString &oldName, const QString &newName);
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import qbs.base 1.0
|
||||
|
||||
Product {
|
||||
condition: qbs.targetOS == "linux"
|
||||
condition: qbs.targetOS.contains("linux")
|
||||
name: "LogoImages"
|
||||
|
||||
Group {
|
||||
|
||||
BIN
src/plugins/coreplugin/images/topbaricon.png
Normal file
BIN
src/plugins/coreplugin/images/topbaricon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 379 B |
@@ -93,7 +93,8 @@ enum {
|
||||
/*!
|
||||
\class Core::IMagicMatcher
|
||||
|
||||
\brief Interface for a Mime type magic matcher (examinig file contents).
|
||||
\brief The IMagicMatcher class is an interface for a MIME type magic
|
||||
matcher that examines file contents to determine the MIME type of a file.
|
||||
|
||||
\sa Core::MimeType, Core::MimeDatabase, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule, Core::GlobPattern
|
||||
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
|
||||
@@ -109,7 +110,8 @@ namespace Internal {
|
||||
/*!
|
||||
\class Core::Internal::FileMatchContext
|
||||
|
||||
\brief Context passed on to the mime types when looking for a file match.
|
||||
\brief The FileMatchContext class is the context passed on to the MIME
|
||||
types when looking for a file match.
|
||||
|
||||
It exists to enable reading the file contents "on demand"
|
||||
(as opposed to each mime type trying to open and read while checking).
|
||||
@@ -173,7 +175,8 @@ QByteArray FileMatchContext::data()
|
||||
|
||||
/*!
|
||||
\class Core::Internal::BinaryMatcher
|
||||
\brief The binary fallback matcher for mime type "application/octet-stream".
|
||||
\brief The BinaryMatcher class is the binary fallback matcher for the MIME
|
||||
type \c{application/octet-stream}.
|
||||
|
||||
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule, Core::GlobPattern
|
||||
\sa Core::Internal::FileMatchContext, Core::Internal::HeuristicTextMagicMatcher
|
||||
@@ -190,7 +193,8 @@ public:
|
||||
|
||||
/*!
|
||||
\class Core::Internal::HeuristicTextMagicMatcher
|
||||
\brief Heuristic text file matcher for mime types.
|
||||
\brief The HeuristicTextMagicMatcher class implements a heuristic text file
|
||||
matcher for MIME types.
|
||||
|
||||
If the data do not contain any character below tab (9), detect as text.
|
||||
Additionally, check on UTF16 byte order markers.
|
||||
@@ -235,7 +239,8 @@ bool HeuristicTextMagicMatcher::matches(const QByteArray &data) const
|
||||
|
||||
/*!
|
||||
\class Core::MagicRule
|
||||
\brief Base class for standard Magic match rules based on contents
|
||||
\brief The MagicRule class is a base class for standard Magic matching rules
|
||||
based on contents
|
||||
and offset specification.
|
||||
|
||||
Stores the offset and provides conversion helpers.
|
||||
@@ -281,7 +286,7 @@ QPair<int, int> MagicRule::fromOffset(const QString &offset)
|
||||
|
||||
/*!
|
||||
\class Core::MagicStringRule
|
||||
\brief Match on a string.
|
||||
\brief The MagicStringRule class provides rules for matching strings.
|
||||
|
||||
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicByteRule, Core::GlobPattern
|
||||
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
|
||||
@@ -327,7 +332,8 @@ bool MagicStringRule::matches(const QByteArray &data) const
|
||||
|
||||
/*!
|
||||
\class Core::MagicByteRule
|
||||
\brief Match on a sequence of binary data.
|
||||
\brief The MagicByteRule class provides rules for matching a sequence of
|
||||
binary data.
|
||||
|
||||
Format:
|
||||
\code
|
||||
@@ -410,7 +416,8 @@ bool MagicByteRule::matches(const QByteArray &data) const
|
||||
/*!
|
||||
\class Core::MagicRuleMatcher
|
||||
|
||||
\brief A Magic matcher that checks a number of rules based on operator "or".
|
||||
\brief The MagicRuleMatcher class implements a Magic matcher that checks the
|
||||
number of rules based on the boolean operator OR.
|
||||
|
||||
It is used for rules parsed from XML files.
|
||||
|
||||
@@ -474,7 +481,8 @@ IMagicMatcher::IMagicMatcherList MagicRuleMatcher::createMatchers(
|
||||
|
||||
/*!
|
||||
\class Core::GlobPattern
|
||||
\brief Glob pattern for file names for mime type matching.
|
||||
\brief The GlobPattern class provides a glob pattern for file names for
|
||||
MIME type matching.
|
||||
|
||||
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule
|
||||
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
|
||||
@@ -518,7 +526,7 @@ bool MimeGlobPattern::matches(const QString &fileName) const
|
||||
/*!
|
||||
\class Core::MimeType
|
||||
|
||||
\brief Mime type data used in Qt Creator.
|
||||
\brief The MimeType class contains MIME type data used in \QC.
|
||||
|
||||
Contains most information from standard mime type XML database files.
|
||||
|
||||
@@ -918,7 +926,8 @@ namespace Internal {
|
||||
|
||||
/*!
|
||||
\class Core::Internal::BaseMimeTypeParser
|
||||
\brief Generic parser for a sequence of <mime-type>.
|
||||
\brief The BaseMimeTypeParser class provides a generic parser for a
|
||||
sequence of <mime-type>.
|
||||
|
||||
Calls abstract handler function process for MimeType it finds.
|
||||
|
||||
@@ -1183,7 +1192,8 @@ MimeMapEntry::MimeMapEntry(const MimeType &t, int aLevel) :
|
||||
|
||||
/*!
|
||||
\class Core::MimeDatabase
|
||||
\brief Mime data base to which the plugins can add the mime types they handle.
|
||||
\brief The MimeDatabase class is a MIME type database to which the plugins
|
||||
can add the MIME types they handle.
|
||||
|
||||
The class is protected by a QMutex and can therefore be accessed by threads.
|
||||
|
||||
@@ -1302,7 +1312,7 @@ MimeDatabasePrivate::MimeDatabasePrivate() :
|
||||
|
||||
/*!
|
||||
\class Core::Internal::MimeTypeParser
|
||||
\brief Mime type parser
|
||||
\brief The MimeTypeParser class provides a MIME type parser.
|
||||
|
||||
Populates Core::MimeDataBase
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
|
||||
/*!
|
||||
\class Core::SettingsDatabase
|
||||
\brief An alternative to the application-wide QSettings that is more
|
||||
\brief The SettingsDatabase class offers an alternative to the
|
||||
application-wide QSettings that is more
|
||||
suitable for storing large amounts of data.
|
||||
|
||||
The settings database is SQLite based, and lazily retrieves data when it
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
/*!
|
||||
\class Core::TextFile
|
||||
\brief Base class for text files with encoding helpers.
|
||||
\brief The TextFile class is a base class for text files with encoding
|
||||
helpers.
|
||||
|
||||
Stores the format obtained from read operations and uses that when writing
|
||||
out files, thus ensuring that CRLF/encodings are preserved.
|
||||
|
||||
@@ -274,23 +274,31 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
|
||||
if (topLevelDirectory)
|
||||
*topLevelDirectory = allThatCanManage.first().first;
|
||||
IVersionControl *versionControl = allThatCanManage.first().second;
|
||||
if (!versionControl->isConfigured()) {
|
||||
if (IEditor *curEditor = EditorManager::currentEditor()) {
|
||||
if (IDocument *curDocument = curEditor->document()) {
|
||||
Id vcsWarning("VcsNotConfiguredWarning");
|
||||
InfoBar *infoBar = curDocument->infoBar();
|
||||
if (infoBar->canInfoBeAdded(vcsWarning)) {
|
||||
InfoBarEntry info(vcsWarning,
|
||||
tr("%1 repository was detected but %1 is not configured.")
|
||||
.arg(versionControl->displayName()),
|
||||
InfoBarEntry::GlobalSuppressionEnabled);
|
||||
d->m_unconfiguredVcs = versionControl;
|
||||
info.setCustomButtonInfo(tr("Configure"), this, SLOT(configureVcs()));
|
||||
infoBar->addInfo(info);
|
||||
}
|
||||
const bool isVcsConfigured = versionControl->isConfigured();
|
||||
if (!isVcsConfigured || d->m_unconfiguredVcs) {
|
||||
Id vcsWarning("VcsNotConfiguredWarning");
|
||||
IDocument *curDocument = 0;
|
||||
if (IEditor *curEditor = EditorManager::currentEditor())
|
||||
curDocument = curEditor->document();
|
||||
if (isVcsConfigured) {
|
||||
if (curDocument && d->m_unconfiguredVcs == versionControl) {
|
||||
curDocument->infoBar()->removeInfo(vcsWarning);
|
||||
d->m_unconfiguredVcs = 0;
|
||||
}
|
||||
return versionControl;
|
||||
} else {
|
||||
InfoBar *infoBar = curDocument->infoBar();
|
||||
if (infoBar->canInfoBeAdded(vcsWarning)) {
|
||||
InfoBarEntry info(vcsWarning,
|
||||
tr("%1 repository was detected but %1 is not configured.")
|
||||
.arg(versionControl->displayName()),
|
||||
InfoBarEntry::GlobalSuppressionEnabled);
|
||||
d->m_unconfiguredVcs = versionControl;
|
||||
info.setCustomButtonInfo(tr("Configure"), this, SLOT(configureVcs()));
|
||||
infoBar->addInfo(info);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
versionControl = 0;
|
||||
}
|
||||
return versionControl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user