2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2013-01-28 17:12:19 +01:00
|
|
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 15:08:31 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef CPPTOOLS_H
|
|
|
|
|
#define CPPTOOLS_H
|
|
|
|
|
|
2012-10-10 21:00:48 +02:00
|
|
|
#include "cpptools_global.h"
|
|
|
|
|
|
2013-03-27 18:54:03 +01:00
|
|
|
#include <projectexplorer/projectexplorer.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QSharedPointer>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QFileInfo;
|
|
|
|
|
class QDir;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace CppTools {
|
2011-02-03 15:48:14 +01:00
|
|
|
|
|
|
|
|
class CppToolsSettings;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class CppModelManager;
|
2009-04-29 09:04:59 +02:00
|
|
|
struct CppFileSettings;
|
2013-09-06 13:14:15 +02:00
|
|
|
class CppCodeModelSettings;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-03-19 11:51:36 +01:00
|
|
|
class CPPTOOLS_EXPORT CppToolsPlugin : public ExtensionSystem::IPlugin
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2012-02-21 16:52:28 +01:00
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CppTools.json")
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
|
|
|
|
CppToolsPlugin();
|
|
|
|
|
~CppToolsPlugin();
|
|
|
|
|
|
2013-03-19 11:51:36 +01:00
|
|
|
static CppToolsPlugin *instance();
|
2013-08-25 22:42:37 +03:00
|
|
|
static const QStringList &headerSearchPaths();
|
|
|
|
|
static const QStringList &sourceSearchPaths();
|
|
|
|
|
static void clearHeaderSourceCache();
|
2013-03-19 11:51:36 +01:00
|
|
|
|
2011-09-21 13:05:15 +02:00
|
|
|
bool initialize(const QStringList &arguments, QString *errorMessage);
|
2008-12-02 12:01:29 +01:00
|
|
|
void extensionsInitialized();
|
2010-07-13 13:36:47 +02:00
|
|
|
ShutdownFlag aboutToShutdown();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-09-06 13:14:15 +02:00
|
|
|
QSharedPointer<CppCodeModelSettings> codeModelSettings() const;
|
|
|
|
|
|
2013-03-19 11:51:36 +01:00
|
|
|
public slots:
|
2008-12-02 12:01:29 +01:00
|
|
|
void switchHeaderSource();
|
2013-02-05 14:14:33 +01:00
|
|
|
void switchHeaderSourceInNextSplit();
|
2012-09-22 14:24:43 +02:00
|
|
|
|
2013-03-19 11:51:36 +01:00
|
|
|
private slots:
|
2013-01-14 14:45:36 +01:00
|
|
|
#ifdef WITH_TESTS
|
2011-11-14 15:08:25 +01:00
|
|
|
void test_codegen_public_in_empty_class();
|
|
|
|
|
void test_codegen_public_in_nonempty_class();
|
|
|
|
|
void test_codegen_public_before_protected();
|
|
|
|
|
void test_codegen_private_after_protected();
|
|
|
|
|
void test_codegen_protected_in_nonempty_class();
|
|
|
|
|
void test_codegen_protected_between_public_and_private();
|
|
|
|
|
void test_codegen_qtdesigner_integration();
|
|
|
|
|
void test_codegen_definition_empty_class();
|
|
|
|
|
void test_codegen_definition_first_member();
|
|
|
|
|
void test_codegen_definition_last_member();
|
|
|
|
|
void test_codegen_definition_middle_member();
|
2013-06-07 16:44:08 +02:00
|
|
|
void test_codegen_definition_middle_member_surrounded_by_undefined();
|
|
|
|
|
void test_codegen_definition_member_specific_file();
|
2012-07-19 14:25:37 +02:00
|
|
|
|
2012-08-22 14:44:53 +02:00
|
|
|
void test_completion_forward_declarations_present();
|
2012-12-05 09:20:52 +01:00
|
|
|
void test_completion_inside_parentheses_c_style_conversion();
|
|
|
|
|
void test_completion_inside_parentheses_cast_operator_conversion();
|
2012-07-19 14:25:37 +02:00
|
|
|
void test_completion_basic_1();
|
|
|
|
|
void test_completion_template_1();
|
2012-10-08 13:23:21 +02:00
|
|
|
void test_completion_template_2();
|
|
|
|
|
void test_completion_template_3();
|
2012-10-18 15:06:13 +02:00
|
|
|
void test_completion_template_4();
|
|
|
|
|
void test_completion_template_5();
|
2012-11-21 09:56:31 +01:00
|
|
|
void test_completion_template_6();
|
2012-11-29 14:42:47 +01:00
|
|
|
void test_completion_template_7();
|
2012-12-29 07:40:20 +01:00
|
|
|
void test_completion_type_of_pointer_is_typedef();
|
2013-01-12 22:05:41 +01:00
|
|
|
void test_completion_instantiate_full_specialization();
|
2012-08-15 12:50:01 +02:00
|
|
|
void test_completion_template_as_base();
|
|
|
|
|
void test_completion_template_as_base_data();
|
2012-09-22 14:24:43 +02:00
|
|
|
void test_completion_use_global_identifier_as_base_class();
|
|
|
|
|
void test_completion_use_global_identifier_as_base_class_data();
|
|
|
|
|
void test_completion_base_class_has_name_the_same_as_derived();
|
|
|
|
|
void test_completion_base_class_has_name_the_same_as_derived_data();
|
2012-09-30 23:19:53 +02:00
|
|
|
void test_completion_cyclic_inheritance();
|
|
|
|
|
void test_completion_cyclic_inheritance_data();
|
2013-04-04 11:27:06 +04:00
|
|
|
void test_completion_template_function();
|
|
|
|
|
void test_completion_template_function_data();
|
2012-10-13 15:27:42 +02:00
|
|
|
void test_completion_enclosing_template_class();
|
|
|
|
|
void test_completion_enclosing_template_class_data();
|
2012-12-07 14:31:32 +01:00
|
|
|
void test_completion_instantiate_nested_class_when_enclosing_is_template();
|
|
|
|
|
void test_completion_instantiate_nested_of_nested_class_when_enclosing_is_template();
|
2013-01-30 22:08:21 +01:00
|
|
|
void test_completion_instantiate_template_with_default_argument_type();
|
|
|
|
|
void test_completion_instantiate_template_with_default_argument_type_as_template();
|
2013-01-30 09:58:09 +01:00
|
|
|
void test_completion_member_access_operator_1();
|
2013-05-22 08:46:09 +02:00
|
|
|
|
|
|
|
|
void test_completion_typedef_of_type_and_decl_of_type_no_replace_access_operator();
|
|
|
|
|
void test_completion_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator();
|
|
|
|
|
void test_completion_typedef_of_type_and_decl_of_pointer_replace_access_operator();
|
|
|
|
|
void test_completion_typedef_of_pointer_and_decl_of_type_replace_access_operator();
|
|
|
|
|
|
|
|
|
|
void test_completion_predecl_typedef_of_type_and_decl_of_pointer_replace_access_operator();
|
|
|
|
|
void test_completion_predecl_typedef_of_type_and_decl_type_no_replace_access_operator();
|
|
|
|
|
void test_completion_predecl_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator();
|
|
|
|
|
void test_completion_predecl_typedef_of_pointer_and_decl_of_type_replace_access_operator();
|
|
|
|
|
|
2013-02-01 21:43:38 +01:00
|
|
|
void test_completion_typedef_of_pointer();
|
|
|
|
|
void test_completion_typedef_of_pointer_inside_function();
|
|
|
|
|
void test_completion_typedef_is_inside_function_before_declaration_block();
|
2013-02-16 13:28:34 +01:00
|
|
|
void test_completion_resolve_complex_typedef_with_template();
|
2013-02-19 08:44:44 +01:00
|
|
|
void test_completion_template_specialization_with_pointer();
|
2013-02-21 15:06:02 +01:00
|
|
|
void test_completion_typedef_using_templates1();
|
|
|
|
|
void test_completion_typedef_using_templates2();
|
2013-04-07 17:48:16 +02:00
|
|
|
void test_completion_namespace_alias_with_many_namespace_declarations();
|
2013-04-13 08:40:54 +02:00
|
|
|
void test_completion_QTCREATORBUG9098();
|
2013-04-26 14:54:49 +02:00
|
|
|
void test_completion_type_and_using_declaration();
|
|
|
|
|
void test_completion_type_and_using_declaration_data();
|
2013-05-09 00:34:28 +02:00
|
|
|
void test_completion_instantiate_template_with_anonymous_class();
|
2013-05-16 10:20:36 +02:00
|
|
|
void test_completion_instantiate_template_function();
|
2013-05-19 07:23:57 +02:00
|
|
|
void test_completion_crash_cloning_template_class_QTCREATORBUG9329();
|
2013-06-11 09:22:18 +02:00
|
|
|
void test_completion_recursive_auto_declarations1_QTCREATORBUG9503();
|
|
|
|
|
void test_completion_recursive_auto_declarations2_QTCREATORBUG9503();
|
2013-06-11 10:22:10 +02:00
|
|
|
void test_completion_recursive_typedefs_declarations1();
|
|
|
|
|
void test_completion_recursive_typedefs_declarations2();
|
|
|
|
|
void test_completion_recursive_using_declarations1();
|
|
|
|
|
void test_completion_recursive_using_declarations2();
|
|
|
|
|
void test_completion_recursive_using_typedef_declarations();
|
2013-10-18 10:25:52 +02:00
|
|
|
void test_completion_recursive_typedefs_in_templates1();
|
|
|
|
|
void test_completion_recursive_typedefs_in_templates2();
|
2013-08-28 01:02:26 +04:00
|
|
|
void test_completion_prefix_first_QTCREATORBUG_8737();
|
|
|
|
|
void test_completion_prefix_first_QTCREATORBUG_9236();
|
2013-06-03 11:03:48 +02:00
|
|
|
|
|
|
|
|
void test_completion_class_declaration_inside_function_or_block_QTCREATORBUG3620();
|
|
|
|
|
void test_completion_class_declaration_inside_function_or_block_QTCREATORBUG3620_data();
|
|
|
|
|
void test_completion_namespace_alias_inside_function_or_block_QTCREATORBUG166();
|
|
|
|
|
void test_completion_namespace_alias_inside_function_or_block_QTCREATORBUG166_data();
|
|
|
|
|
void test_completion_class_declaration_inside_function_or_block_QTCREATORBUG3620_static_member();
|
|
|
|
|
void test_completion_enum_inside_block_inside_function_QTCREATORBUG5456();
|
|
|
|
|
void test_completion_enum_inside_function_QTCREATORBUG5456();
|
2012-09-22 14:24:43 +02:00
|
|
|
|
2013-06-18 23:05:57 +02:00
|
|
|
void test_completion_template_parameter_defined_inside_scope_of_declaration_QTCREATORBUG9169_1();
|
|
|
|
|
void test_completion_template_parameter_defined_inside_scope_of_declaration_QTCREATORBUG9169_2();
|
|
|
|
|
void test_completion_template_parameter_defined_inside_scope_of_declaration_QTCREATORBUG8852_1();
|
|
|
|
|
void test_completion_template_parameter_defined_inside_scope_of_declaration_QTCREATORBUG8852_2();
|
|
|
|
|
void test_completion_template_parameter_defined_inside_scope_of_declaration_QTCREATORBUG8852_3();
|
|
|
|
|
|
2013-06-25 15:41:17 +02:00
|
|
|
//lambda
|
|
|
|
|
void test_completion_lambdaCalls_1();
|
|
|
|
|
void test_completion_lambdaCalls_2();
|
|
|
|
|
void test_completion_lambdaCalls_3();
|
|
|
|
|
void test_completion_lambdaCalls_4();
|
|
|
|
|
void test_completion_lambdaCalls_5();
|
|
|
|
|
|
2013-07-04 09:09:35 +02:00
|
|
|
void test_completion_local_type_and_member_1();
|
|
|
|
|
void test_completion_local_type_and_member_2();
|
|
|
|
|
void test_completion_local_type_and_member_3();
|
|
|
|
|
void test_completion_local_type_and_member_4();
|
|
|
|
|
void test_completion_local_type_and_member_5();
|
|
|
|
|
void test_completion_local_type_and_member_6();
|
|
|
|
|
|
2013-07-30 11:56:50 +02:00
|
|
|
void test_completion_signals_hide_QPrivateSignal();
|
|
|
|
|
|
2013-01-14 14:45:36 +01:00
|
|
|
void test_format_pointerdeclaration_in_simpledeclarations();
|
|
|
|
|
void test_format_pointerdeclaration_in_simpledeclarations_data();
|
|
|
|
|
void test_format_pointerdeclaration_in_controlflowstatements();
|
|
|
|
|
void test_format_pointerdeclaration_in_controlflowstatements_data();
|
|
|
|
|
void test_format_pointerdeclaration_multiple_declarators();
|
|
|
|
|
void test_format_pointerdeclaration_multiple_declarators_data();
|
|
|
|
|
void test_format_pointerdeclaration_multiple_matches();
|
|
|
|
|
void test_format_pointerdeclaration_multiple_matches_data();
|
2013-02-07 09:02:56 +01:00
|
|
|
void test_format_pointerdeclaration_macros();
|
|
|
|
|
void test_format_pointerdeclaration_macros_data();
|
2013-01-14 14:45:36 +01:00
|
|
|
|
2013-07-25 11:21:31 +02:00
|
|
|
void test_cpppreprocessor_includes();
|
|
|
|
|
|
2013-07-11 12:37:44 +02:00
|
|
|
void test_modelmanager_paths_are_clean();
|
2012-12-20 15:53:12 +01:00
|
|
|
void test_modelmanager_framework_headers();
|
2013-07-11 12:37:44 +02:00
|
|
|
void test_modelmanager_refresh_also_includes_of_project_files();
|
|
|
|
|
void test_modelmanager_refresh_several_times();
|
2013-07-16 12:08:39 +02:00
|
|
|
void test_modelmanager_refresh_test_for_changes();
|
2013-07-10 14:46:08 +02:00
|
|
|
void test_modelmanager_refresh_added_and_purge_removed();
|
|
|
|
|
void test_modelmanager_refresh_timeStampModified_if_sourcefiles_change();
|
|
|
|
|
void test_modelmanager_refresh_timeStampModified_if_sourcefiles_change_data();
|
2013-06-28 11:26:02 +02:00
|
|
|
void test_modelmanager_snapshot_after_two_projects();
|
2013-07-01 10:25:03 +02:00
|
|
|
void test_modelmanager_extraeditorsupport_uiFiles();
|
2013-07-16 16:20:46 +02:00
|
|
|
void test_modelmanager_gc_if_last_cppeditor_closed();
|
2013-07-17 13:50:38 +02:00
|
|
|
void test_modelmanager_dont_gc_opened_files();
|
2013-08-19 16:05:29 +02:00
|
|
|
void test_modelmanager_defines_per_project();
|
2013-09-30 13:36:01 +02:00
|
|
|
void test_modelmanager_defines_per_project_pch();
|
2013-09-30 14:37:50 +02:00
|
|
|
void test_modelmanager_defines_per_editor();
|
2012-12-20 14:07:27 +01:00
|
|
|
|
2013-08-16 11:31:59 +02:00
|
|
|
void test_cpplocatorfilters_CppLocatorFilter();
|
|
|
|
|
void test_cpplocatorfilters_CppLocatorFilter_data();
|
|
|
|
|
void test_cpplocatorfilters_CppCurrentDocumentFilter();
|
|
|
|
|
|
2013-08-16 16:37:16 +02:00
|
|
|
void test_builtinsymbolsearcher();
|
|
|
|
|
void test_builtinsymbolsearcher_data();
|
|
|
|
|
|
2013-08-25 22:42:37 +03:00
|
|
|
void test_headersource_data();
|
|
|
|
|
void test_headersource();
|
|
|
|
|
|
2012-09-22 14:24:43 +02:00
|
|
|
private:
|
|
|
|
|
void test_completion();
|
2011-11-14 15:08:25 +01:00
|
|
|
#endif
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2009-04-29 09:04:59 +02:00
|
|
|
QSharedPointer<CppFileSettings> m_fileSettings;
|
2013-09-06 13:14:15 +02:00
|
|
|
QSharedPointer<CppCodeModelSettings> m_codeModelSettings;
|
2011-02-03 15:48:14 +01:00
|
|
|
CppToolsSettings *m_settings;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CppTools
|
|
|
|
|
|
|
|
|
|
#endif // CPPTOOLS_H
|