| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /***************************************************************************
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Contact:  Qt Software Information (qt-info@nokia.com) | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** Non-Open Source Usage | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** Licensees may use this file in accordance with the Qt Beta Version | 
					
						
							|  |  |  | ** License Agreement, Agreement version 2.2 provided with the Software or, | 
					
						
							|  |  |  | ** alternatively, in accordance with the terms contained in a written | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** agreement between you and Nokia. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** GNU General Public License Usage | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** Alternatively, this file may be used under the terms of the GNU General | 
					
						
							|  |  |  | ** Public License versions 2.0 or 3.0 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation and appearing in the file LICENSE.GPL included in the packaging | 
					
						
							|  |  |  | ** of this file.  Please review the following information to ensure GNU | 
					
						
							|  |  |  | ** General Public Licensing requirements will be met: | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
 | 
					
						
							|  |  |  | ** http://www.gnu.org/copyleft/gpl.html.
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** In addition, as a special exception, Nokia gives you certain additional | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** rights. These rights are described in the Nokia Qt GPL Exception | 
					
						
							| 
									
										
										
										
											2008-12-16 17:20:00 +01:00
										 |  |  | ** version 1.3, included in the file GPL_EXCEPTION.txt in this package. | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ***************************************************************************/ | 
					
						
							| 
									
										
										
										
											2008-12-02 15:08:31 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-12 14:39:51 +01:00
										 |  |  | #include "cpptoolsplugin.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "completionsettingspage.h"
 | 
					
						
							| 
									
										
										
										
											2008-11-28 15:36:54 +01:00
										 |  |  | #include "cppclassesfilter.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | #include "cppcodecompletion.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-09 17:15:00 +01:00
										 |  |  | #include "cppfunctionsfilter.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | #include "cppmodelmanager.h"
 | 
					
						
							|  |  |  | #include "cpptoolsconstants.h"
 | 
					
						
							|  |  |  | #include "cppquickopenfilter.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <coreplugin/icore.h>
 | 
					
						
							|  |  |  | #include <coreplugin/mimedatabase.h>
 | 
					
						
							|  |  |  | #include <coreplugin/coreconstants.h>
 | 
					
						
							|  |  |  | #include <coreplugin/uniqueidmanager.h>
 | 
					
						
							| 
									
										
										
										
											2009-01-13 13:39:31 +01:00
										 |  |  | #include <coreplugin/actionmanager/actionmanager.h>
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | #include <coreplugin/editormanager/editormanager.h>
 | 
					
						
							|  |  |  | #include <cppeditor/cppeditorconstants.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QtCore/qplugin.h>
 | 
					
						
							|  |  |  | #include <QtCore/QFileInfo>
 | 
					
						
							|  |  |  | #include <QtCore/QDir>
 | 
					
						
							|  |  |  | #include <QtCore/QDebug>
 | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  | #include <QtCore/QSettings>
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | #include <QtGui/QMenu>
 | 
					
						
							|  |  |  | #include <QtGui/QAction>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | using namespace CppTools::Internal; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum { debug = 0 }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CppToolsPlugin *CppToolsPlugin::m_instance = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CppToolsPlugin::CppToolsPlugin() : | 
					
						
							|  |  |  |     m_core(0), | 
					
						
							|  |  |  |     m_context(-1), | 
					
						
							|  |  |  |     m_modelManager(0) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     m_instance = this; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CppToolsPlugin::~CppToolsPlugin() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     m_instance = 0; | 
					
						
							|  |  |  |     m_modelManager = 0; // deleted automatically
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); | 
					
						
							| 
									
										
										
										
											2009-01-13 13:39:31 +01:00
										 |  |  |     Core::ActionManager *am = m_core->actionManager(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Objects
 | 
					
						
							|  |  |  |     m_modelManager = new CppModelManager(this); | 
					
						
							|  |  |  |     addAutoReleasedObject(m_modelManager); | 
					
						
							| 
									
										
										
										
											2008-12-15 12:27:36 +01:00
										 |  |  |     m_completion = new CppCodeCompletion(m_modelManager, m_core); | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  |     addAutoReleasedObject(m_completion); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     CppQuickOpenFilter *quickOpenFilter = new CppQuickOpenFilter(m_modelManager, | 
					
						
							|  |  |  |                                                                  m_core->editorManager()); | 
					
						
							|  |  |  |     addAutoReleasedObject(quickOpenFilter); | 
					
						
							| 
									
										
										
										
											2008-11-28 15:36:54 +01:00
										 |  |  |     addAutoReleasedObject(new CppClassesFilter(m_modelManager, m_core->editorManager())); | 
					
						
							| 
									
										
										
										
											2008-12-09 17:15:00 +01:00
										 |  |  |     addAutoReleasedObject(new CppFunctionsFilter(m_modelManager, m_core->editorManager())); | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  |     addAutoReleasedObject(new CompletionSettingsPage(m_completion)); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Menus
 | 
					
						
							|  |  |  |     Core::IActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS); | 
					
						
							|  |  |  |     Core::IActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP); | 
					
						
							|  |  |  |     QMenu *menu = mcpptools->menu(); | 
					
						
							|  |  |  |     menu->setTitle(tr("&C++")); | 
					
						
							|  |  |  |     menu->setEnabled(true); | 
					
						
							|  |  |  |     mtools->addMenu(mcpptools); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Actions
 | 
					
						
							|  |  |  |     m_context = m_core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR); | 
					
						
							|  |  |  |     QList<int> context = QList<int>() << m_context; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     QAction *switchAction = new QAction(tr("Switch Header/Source"), this); | 
					
						
							|  |  |  |     Core::ICommand *command = am->registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context); | 
					
						
							|  |  |  |     command->setDefaultKeySequence(QKeySequence(Qt::Key_F4)); | 
					
						
							|  |  |  |     mcpptools->addAction(command); | 
					
						
							|  |  |  |     connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource())); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  |     // Restore settings
 | 
					
						
							|  |  |  |     QSettings *settings = m_core->settings(); | 
					
						
							|  |  |  |     settings->beginGroup(QLatin1String("CppTools")); | 
					
						
							|  |  |  |     settings->beginGroup(QLatin1String("Completion")); | 
					
						
							|  |  |  |     const bool caseSensitive = settings->value(QLatin1String("CaseSensitive"), true).toBool(); | 
					
						
							|  |  |  |     m_completion->setCaseSensitivity(caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); | 
					
						
							|  |  |  |     m_completion->setAutoInsertBraces(settings->value(QLatin1String("AutoInsertBraces"), true).toBool()); | 
					
						
							| 
									
										
										
										
											2008-12-16 16:55:44 +01:00
										 |  |  |     m_completion->setPartialCompletionEnabled(settings->value(QLatin1String("PartiallyComplete"), true).toBool()); | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  |     settings->endGroup(); | 
					
						
							|  |  |  |     settings->endGroup(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     return true; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void CppToolsPlugin::extensionsInitialized() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  | void CppToolsPlugin::shutdown() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     // Save settings
 | 
					
						
							|  |  |  |     QSettings *settings = m_core->settings(); | 
					
						
							|  |  |  |     settings->beginGroup(QLatin1String("CppTools")); | 
					
						
							|  |  |  |     settings->beginGroup(QLatin1String("Completion")); | 
					
						
							|  |  |  |     settings->setValue(QLatin1String("CaseSensitive"), m_completion->caseSensitivity() == Qt::CaseSensitive); | 
					
						
							|  |  |  |     settings->setValue(QLatin1String("AutoInsertBraces"), m_completion->autoInsertBraces()); | 
					
						
							| 
									
										
										
										
											2008-12-16 16:55:44 +01:00
										 |  |  |     settings->setValue(QLatin1String("PartiallyComplete"), m_completion->isPartialCompletionEnabled()); | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  |     settings->endGroup(); | 
					
						
							|  |  |  |     settings->endGroup(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | void CppToolsPlugin::switchHeaderSource() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if (!m_core) | 
					
						
							|  |  |  |         return; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Core::IEditor *editor = m_core->editorManager()->currentEditor(); | 
					
						
							|  |  |  |     QString otherFile = correspondingHeaderOrSource(editor->file()->fileName()); | 
					
						
							|  |  |  |     if (!otherFile.isEmpty()) { | 
					
						
							|  |  |  |         m_core->editorManager()->openEditor(otherFile); | 
					
						
							|  |  |  |         m_core->editorManager()->ensureEditorManagerVisible(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | QFileInfo CppToolsPlugin::findFile(const QDir &dir, const QString &name, | 
					
						
							|  |  |  |                                    const ProjectExplorer::Project *project) const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if (debug) | 
					
						
							|  |  |  |         qDebug() << Q_FUNC_INFO << dir << name; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-06 17:37:45 +01:00
										 |  |  |     QFileInfo fileInSameDir(dir, name); | 
					
						
							|  |  |  |     if (project && !fileInSameDir.isFile()) { | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         QString pattern = QString(1, QLatin1Char('/')); | 
					
						
							|  |  |  |         pattern += name; | 
					
						
							|  |  |  |         const QStringList projectFiles = project->files(ProjectExplorer::Project::AllFiles); | 
					
						
							|  |  |  |         const QStringList::const_iterator pcend = projectFiles.constEnd(); | 
					
						
							|  |  |  |         for (QStringList::const_iterator it = projectFiles.constBegin(); it != pcend; ++it) | 
					
						
							|  |  |  |             if (it->endsWith(pattern)) | 
					
						
							|  |  |  |                 return QFileInfo(*it); | 
					
						
							|  |  |  |         return QFileInfo(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2009-01-06 17:37:45 +01:00
										 |  |  |     return fileInSameDir; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Figure out file type
 | 
					
						
							| 
									
										
										
										
											2008-12-12 16:36:33 +01:00
										 |  |  | enum FileType { | 
					
						
							|  |  |  |     HeaderFile, | 
					
						
							|  |  |  |     C_SourceFile, | 
					
						
							|  |  |  |     CPP_SourceFile, | 
					
						
							|  |  |  |     UnknownType | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | static inline FileType fileType(const Core::MimeDatabase *mimeDatase, const  QFileInfo & fi) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     const Core::MimeType mimeType = mimeDatase->findByFile(fi); | 
					
						
							|  |  |  |     if (!mimeType) | 
					
						
							|  |  |  |         return UnknownType; | 
					
						
							|  |  |  |     const QString typeName = mimeType.type(); | 
					
						
							|  |  |  |     if (typeName == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)) | 
					
						
							|  |  |  |         return C_SourceFile; | 
					
						
							|  |  |  |     if (typeName == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)) | 
					
						
							|  |  |  |         return CPP_SourceFile; | 
					
						
							|  |  |  |     if (typeName == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE) | 
					
						
							|  |  |  |         || typeName == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)) | 
					
						
							|  |  |  |         return HeaderFile; | 
					
						
							|  |  |  |     return UnknownType; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Return the suffixes that should be checked when trying to find a
 | 
					
						
							|  |  |  | // source belonging to a header and vice versa
 | 
					
						
							|  |  |  | static QStringList matchingCandidateSuffixes(const Core::MimeDatabase *mimeDatase, FileType type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							|  |  |  |     case UnknownType: | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case HeaderFile: // Note that C/C++ headers are undistinguishable
 | 
					
						
							|  |  |  |         return mimeDatase->findByType(QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)).suffixes() + | 
					
						
							|  |  |  |                mimeDatase->findByType(QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)).suffixes(); | 
					
						
							|  |  |  |     case C_SourceFile: | 
					
						
							|  |  |  |         return mimeDatase->findByType(QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)).suffixes(); | 
					
						
							|  |  |  |     case CPP_SourceFile: | 
					
						
							|  |  |  |         return mimeDatase->findByType(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)).suffixes(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     return QStringList(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | QString CppToolsPlugin::correspondingHeaderOrSourceI(const QString &fileName) const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     const Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>(); | 
					
						
							|  |  |  |     const Core::MimeDatabase *mimeDatase = core->mimeDatabase(); | 
					
						
							|  |  |  |     ProjectExplorer::ProjectExplorerPlugin *explorer = | 
					
						
							|  |  |  |         ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::ProjectExplorerPlugin>(); | 
					
						
							|  |  |  |     ProjectExplorer::Project *project = (explorer ? explorer->currentProject() : 0); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const QFileInfo fi(fileName); | 
					
						
							|  |  |  |     const FileType type = fileType(mimeDatase, fi); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (debug) | 
					
						
							|  |  |  |         qDebug() << Q_FUNC_INFO << fileName <<  type; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (type == UnknownType) | 
					
						
							|  |  |  |         return QString(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const QDir absoluteDir = fi.absoluteDir(); | 
					
						
							|  |  |  |     const QString baseName = fi.baseName(); | 
					
						
							|  |  |  |     const QStringList suffixes = matchingCandidateSuffixes(mimeDatase, type); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const QString privateHeaderSuffix = QLatin1String("_p"); | 
					
						
							|  |  |  |     const QChar dot = QLatin1Char('.'); | 
					
						
							|  |  |  |     QStringList candidates; | 
					
						
							|  |  |  |     // Check base matches 'source.h'-> 'source.cpp' and vice versa
 | 
					
						
							|  |  |  |     const QStringList::const_iterator scend = suffixes.constEnd(); | 
					
						
							|  |  |  |     for (QStringList::const_iterator it = suffixes.constBegin(); it != scend; ++it) { | 
					
						
							|  |  |  |         QString candidate = baseName; | 
					
						
							|  |  |  |         candidate += dot; | 
					
						
							|  |  |  |         candidate += *it; | 
					
						
							|  |  |  |         const QFileInfo candidateFi = findFile(absoluteDir, candidate, project); | 
					
						
							|  |  |  |         if (candidateFi.isFile()) | 
					
						
							|  |  |  |             return candidateFi.absoluteFilePath(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     if (type == HeaderFile) { | 
					
						
							|  |  |  |         // 'source_p.h': try 'source.cpp'
 | 
					
						
							|  |  |  |         if (baseName.endsWith(privateHeaderSuffix)) { | 
					
						
							|  |  |  |             QString sourceBaseName = baseName; | 
					
						
							|  |  |  |             sourceBaseName.truncate(sourceBaseName.size() - privateHeaderSuffix.size()); | 
					
						
							|  |  |  |             for (QStringList::const_iterator it = suffixes.constBegin(); it != scend; ++it) { | 
					
						
							|  |  |  |                 QString candidate = sourceBaseName; | 
					
						
							|  |  |  |                 candidate += dot; | 
					
						
							|  |  |  |                 candidate += *it; | 
					
						
							|  |  |  |                 const QFileInfo candidateFi = findFile(absoluteDir, candidate, project); | 
					
						
							|  |  |  |                 if (candidateFi.isFile()) | 
					
						
							|  |  |  |                     return candidateFi.absoluteFilePath(); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |         // 'source.cpp': try 'source_p.h'
 | 
					
						
							|  |  |  |         const QStringList::const_iterator scend = suffixes.constEnd(); | 
					
						
							|  |  |  |         for (QStringList::const_iterator it = suffixes.constBegin(); it != scend; ++it) { | 
					
						
							|  |  |  |             QString candidate = baseName; | 
					
						
							|  |  |  |             candidate += privateHeaderSuffix; | 
					
						
							|  |  |  |             candidate += dot; | 
					
						
							|  |  |  |             candidate += *it; | 
					
						
							|  |  |  |             const QFileInfo candidateFi = findFile(absoluteDir, candidate, project); | 
					
						
							|  |  |  |             if (candidateFi.isFile()) | 
					
						
							|  |  |  |                 return candidateFi.absoluteFilePath(); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     return QString(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | QString CppToolsPlugin::correspondingHeaderOrSource(const QString &fileName) const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     const QString rc = correspondingHeaderOrSourceI(fileName); | 
					
						
							|  |  |  |     if (debug) | 
					
						
							|  |  |  |         qDebug() << Q_FUNC_INFO << fileName << rc; | 
					
						
							|  |  |  |     return rc; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Q_EXPORT_PLUGIN(CppToolsPlugin) |