Commit c65c6537 authored by Ralf Habacker's avatar Ralf Habacker

Merge branch 'test-kde-infrastructor' into 'master'

Test kde infrastructor

See merge request !1
parents 0ff187e4 c87a3d29
......@@ -2,18 +2,22 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
project(umbrello)
if(POLICY CMP0028)
cmake_policy(SET CMP0028 OLD)
endif()
# KDE Application Version, managed by release script
set (KDE_APPLICATIONS_VERSION_MAJOR "20")
set (KDE_APPLICATIONS_VERSION_MINOR "03")
set (KDE_APPLICATIONS_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "03")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set(UMBRELLO_VERSION_MAJOR "2")
set(UMBRELLO_VERSION_MINOR "30")
if (KDE_APPLICATIONS_VERSION_MICRO GREATER_EQUAL 70)
math(EXPR UMBRELLO_VERSION_MINOR "${UMBRELLO_VERSION_MINOR}-1")
if (RELEASE_SERVICE_VERSION_MICRO GREATER_EQUAL 70)
math(EXPR UMBRELLO_VERSION_MINOR "${UMBRELLO_VERSION_MINOR}-0")
endif()
set(UMBRELLO_VERSION_PATCH ${KDE_APPLICATIONS_VERSION_MICRO})
set(UMBRELLO_VERSION_PATCH ${RELEASE_SERVICE_VERSION_MICRO})
option(BUILD_ICONS "Create icons from svg source" OFF)
......@@ -67,7 +71,7 @@ else()
set(QT_MIN_VERSION "5.2.0")
set(KDEV_MIN_VERSION 5.1.2)
set(KDEV_SOURCE_DIR lib/kdev5-php)
set(KDEV_COMPONENTS KDev::Interfaces KDev::Language KDev::Tests)
set(KDEV_COMPONENTS KDev::Interfaces KDev::Language KDev::Shell)
endif()
# search packages used by Qt
......@@ -100,15 +104,14 @@ find_package(KF5 REQUIRED COMPONENTS
XmlGui
)
if(CMAKE_COMPILER_IS_GNUCXX)
string(REPLACE "-Wsuggest-override" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
if(BUILD_PHP_IMPORT)
find_package(KDevelop-PG-Qt)
find_package(KDevPlatform ${KDEV_MIN_VERSION} COMPONENTS ${KDEV_COMPONENTS})
endif()
if(BUILD_KF5 AND NOT TARGET KDev::Tests)
message(STATUS "Could not find required KDevPlatform component KDev::Tests - disabling php import support")
set(KDEVPLATFORM_FOUND 0)
set(BUILD_PHP_IMPORT 0)
endif()
if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND)
message(STATUS "requirements available - enable building php code import")
include_directories(
......@@ -124,6 +127,7 @@ if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND)
-DKDEVPHPPARSER_EXPORT=
-DENABLE_PHP_IMPORT
)
add_subdirectory(lib/kdevplatform)
add_subdirectory(${KDEV_SOURCE_DIR})
else()
set(BUILD_PHP_IMPORT 0)
......@@ -228,12 +232,46 @@ add_unstable_feature(COMBINED_STATE_DIRECT_EDIT) # experimental feature
# because of using umbrello specific XMI tag (UML:InstanceAttribute).
add_unstable_feature(OBJECT_DIAGRAM) # see https://bugs.kde.org/show_bug.cgi?id=123633
configure_file(Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile)
find_program(DOXYGEN_EXECUTABLE doxygen)
if(DOXYGEN_EXECUTABLE)
add_custom_target(apidoc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
# requires cmake >= 3.9.6
find_package(Doxygen OPTIONAL_COMPONENTS dot)
if(DOXYGEN_FOUND)
message(STATUS "found doxygen package")
find_program(QHELPGENERATOR_EXECUTABLE qhelpgenerator)
set(DOXYGEN_ABBREVIATE_BRIEF "The $name class" "The $name widget")
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_EXCLUDE_PATTERNS */lib/*)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_EXTRACT_PACKAGE YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_EXTRACT_STATIC YES)
set(DOXYGEN_GENERATE_HTMLHELP YES)
set(DOXYGEN_HAVE_DOT YES)
set(DOXYGEN_MARKDOWN_SUPPORT NO)
set(DOXYGEN_MAX_DOT_GRAPH_DEPTH 1000)
set(DOXYGEN_PROJECT_BRIEF "Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology")
set(DOXYGEN_PROJECT_NUMBER ${UMBRELLO_VERSION_STRING})
#set(DOXYGEN_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/umbrello/pics/global/hi32-apps-umbrello.png)
set(DOXYGEN_SOURCE_BROWSER NO)
set(DOXYGEN_UML_LOOK YES)
set(DOXYGEN_USE_PDFLATEX NO)
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/apidoc)
if(QHELPGENERATOR_EXECUTABLE)
set(DOXYGEN_GENERATE_QHP YES)
set(DOXYGEN_QCH_FILE ${CMAKE_BINARY_DIR}/umbrello.qch)
set(DOXYGEN_QHP_NAMESPACE org.kde.umbrello)
set(DOXYGEN_QHG_LOCATION ${QHELPGENERATOR_EXECUTABLE})
set(DOXYGEN_QHP_VIRTUAL_FOLDER doc)
install(FILES ${DOXYGEN_QCH_FILE} DESTINATION ${QT_DOC_DIR}/qch COMPONENT Devel)
endif()
doxygen_add_docs(apidoc
${CMAKE_SOURCE_DIR}
COMMENT "generating api doc"
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/apidoc DESTINATION ${UMBRELLO_DATA_INSTALL_DIR})
endif()
if(LIBXSLT_FOUND AND LIBXML2_FOUND)
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
<title>Copyright</title>
<para>Copyright 2001, Paul Hensgen</para>
<para>Copyright 2002-2014 The &umbrello; Authors.</para>
<para>Copyright 2002-2020 The &umbrello; Authors.</para>
&underFDL;
&underGPL;
......
......@@ -11,6 +11,7 @@
<!ENTITY working-with-umbrello-chapter SYSTEM "working_with_umbrello.docbook">
<!ENTITY code-import-and-generation-chapter SYSTEM "code_import_and_generation.docbook">
<!ENTITY other-features-chapter SYSTEM "other_features.docbook">
<!ENTITY settings-chapter SYSTEM "settings.docbook">
<!ENTITY authors-chapter SYSTEM "authors.docbook">
<!ENTITY credits-chapter SYSTEM "credits.docbook">
<!ENTITY % addindex "IGNORE">
......@@ -33,7 +34,7 @@
<holder>Paul Hensgen</holder>
</copyright>
<copyright>
<year>2002, 2003</year>
<year>2002-2020</year>
<holder>&umbrello; Authors</holder>
</copyright>
......@@ -44,7 +45,7 @@
<abstract>
<para>
&umbrello; helps the software development
process by using the industry standard Unified Modelling Language (&UML;)
process by using the industry standard Unified Modelling Language (&UML;)
to enable you to create diagrams for designing and documenting your systems.
</para>
</abstract>
......@@ -65,6 +66,7 @@ to enable you to create diagrams for designing and documenting your systems.
&working-with-umbrello-chapter;
&code-import-and-generation-chapter;
&other-features-chapter;
&settings-chapter;
&authors-chapter;
&credits-chapter;
......
This diff is collapsed.
......@@ -160,7 +160,7 @@ private:
//typedef __gnu_cxx::hash_multimap<HashedString, CachedLexedFilePointer> CachedLexedFileMap;
typedef std::multimap<HashedString, CachedLexedFilePointer> CachedLexedFileMap;
CachedLexedFileMap m_files;
QSet<HashedString> m_totalStringSet; ///This is used to reduce memory-usage: Most strings appear again and again. Because QString is reference-counted, this set contains a unique copy of each string to used for each appearance of the string
QSet<HashedString> m_totalStringSet; ///This is used to reduce memory-usage: Most strings appear again and again. Because QString is reference-counted, this set contains a unique copy of each string to use for each appearance of the string
struct FileModificationCache {
QDateTime m_readTime;
QDateTime m_modificationTime;
......
......@@ -602,12 +602,12 @@ public:
{
return false;
}
/**@return true if an item is a EnumModel.*/
/**@return true if an item is an EnumModel.*/
virtual bool isEnum() const
{
return false;
}
/**@return true if an item is a EnumeratorModel.*/
/**@return true if an item is an EnumeratorModel.*/
virtual bool isEnumerator() const
{
return false;
......
......@@ -525,7 +525,7 @@ int findLastMethodLine(ClassDom aClass, CodeModelItem::Access access);
int findLastVariableLine(ClassDom aClass, CodeModelItem::Access access);
/**
* Get the string representation of an accesss pecifier
* Get the string representation of an access specifier
* @param access An access specifier to get a string representation of.
* @return string The representation of an access (e.g. "public").
* @author Jonas Jacobi <j.jacobi@gmx.de>
......
......@@ -1584,7 +1584,7 @@ QList<CompletionTreeItemPointer> CodeCompletionContext::completionItems(bool& ab
///TODO: function-like statements should just be handled as a function with declaration etc.
/// e.g.: empty, eval, die, exit, isset, unset
/// but _not_ echo, print, catch, include*, require*
///TODO: use user's style for indendation etc.
///TODO: use user's style for indentation etc.
ADD_KEYWORD2("abstract class", "abstract class %SELECT%NAME%ENDSELECT% {\n%INDENT%\n}\n");
ADD_KEYWORD2("final class", "final class %SELECT%NAME%ENDSELECT% {\n%INDENT%\n}\n");
ADD_KEYWORD2("class", "class %SELECT%NAME%ENDSELECT% {\n%INDENT%\n}\n");
......
......@@ -149,7 +149,7 @@ private:
/// relative URLS have to start with a /
bool m_isFileCompletionAfterDirname;
/**
* a list of indizes of identifiers which must not be added as completion items
* a list of indexes of identifiers which must not be added as completion items
* examples:
* class test implements foo, ...
* => identifiers test and foo must not be proposed for completion
......
......@@ -203,7 +203,7 @@ const QString indentString(KTextEditor::Document *document)
return "\t";
}
QString getIndendation( const QString &line ) {
QString getIndentation( const QString &line ) {
return line.left(line.indexOf(QRegExp("\\S"), 0));
}
......
......@@ -59,15 +59,15 @@ QStringList getMethodTokens(QString text);
const QString KDEVPHPCOMPLETION_EXPORT indentString(KTextEditor::Document *document);
/**
* Get the indendation of a given line.
* Get the indentation of a given line.
*
* You usually want to use it with something like the following:
*
* \code
* const QString indendation = getIndendation( document->line(replaceRange.start().line()) );
* const QString indentation = getIndentation( document->line(replaceRange.start().line()) );
* \endcode
*/
QString KDEVPHPCOMPLETION_EXPORT getIndendation( const QString &line );
QString KDEVPHPCOMPLETION_EXPORT getIndentation( const QString &line );
}
#endif
......
......@@ -117,22 +117,22 @@ void ImplementationItem::execute(KTextEditor::Document* document, const KTextEdi
replaceRange.start() = KTextEditor::Cursor(methodText.count('\n'), methodText.length() - methodText.lastIndexOf('\n') - 1);
}
// get indendation
QString indendation;
// get indentation
QString indentation;
{
QString currentLine = document->line(replaceRange.start().line());
indendation = getIndendation(currentLine);
indentation = getIndentation(currentLine);
if ( !currentLine.isEmpty() && currentLine != indendation ) {
if ( !currentLine.isEmpty() && currentLine != indentation ) {
// since theres some non-whitespace in this line, skip to the enxt one
replText += '\n' + indendation;
replText += '\n' + indentation;
}
if (indendation.isEmpty()) {
// use a minimal indendation
if (indentation.isEmpty()) {
// use a minimal indentation
// TODO: respect code style
indendation = " ";
replText += indendation;
indentation = " ";
replText += indentation;
}
}
......@@ -148,12 +148,12 @@ void ImplementationItem::execute(KTextEditor::Document* document, const KTextEdi
kDebug() << "completion item for implementation has no parent context!";
}
replText += "/**\n" + indendation + " * ";
replText += "/**\n" + indentation + " * ";
// insert old comment:
const QString indentationWithExtra = "\n" + indendation + " *";
const QString indentationWithExtra = "\n" + indentation + " *";
replText += m_declaration->comment().replace('\n', indentationWithExtra.toAscii().constData());
replText += "\n" + indendation + " * @overload " + m_declaration->internalContext()->scopeIdentifier(true).toString();
replText += "\n" + indendation + " **/\n" + indendation;
replText += "\n" + indentation + " * @overload " + m_declaration->internalContext()->scopeIdentifier(true).toString();
replText += "\n" + indentation + " **/\n" + indentation;
}
#endif
......@@ -248,15 +248,15 @@ void ImplementationItem::execute(KTextEditor::Document* document, const KTextEdi
}
}
replText += QString("\n%1{\n%1 ").arg(indendation);
replText += QString("\n%1{\n%1 ").arg(indentation);
if (isInterface || m_type == ImplementationItem::Implement) {
} else if (!isConstructorOrDestructor && !voidReturnType) {
replText += QString("$ret = parent::%2%3;\n%1 return $ret;").arg(indendation).arg(functionName).arg(arguments);
replText += QString("$ret = parent::%2%3;\n%1 return $ret;").arg(indentation).arg(functionName).arg(arguments);
} else {
replText += QString("parent::%1%2;").arg(functionName).arg(arguments);
}
replText += QString("\n%1}\n%1")
.arg(indendation);
.arg(indentation);
}
......
......@@ -69,7 +69,7 @@ void KeywordItem::execute(KTextEditor::Document* document, const KTextEditor::Ra
{
if ( !m_replacement.isEmpty() ) {
QString replacement = m_replacement;
replacement = replacement.replace('\n', '\n' + getIndendation(document->line(word.start().line())));
replacement = replacement.replace('\n', '\n' + getIndentation(document->line(word.start().line())));
replacement = replacement.replace("%INDENT%", indentString(document));
int cursorPos = replacement.indexOf("%CURSOR%");
......
......@@ -33,8 +33,8 @@ class KeywordItem : public NormalDeclarationCompletionItem
{
public:
/// Use @p customReplacement for additional power on how the keyword gets replaced.
/// Newlines will be indendet to the indendation level of the line we execute the item on.
/// To increase an indendation level, use %INDENT%. To place the cursor, use %CURSOR%.
/// Newlines will be indented to the indentation level of the line we execute the item on.
/// To increase an indentation level, use %INDENT%. To place the cursor, use %CURSOR%.
/// Alternatively you can select a word with %SELECT%word%SELECT%
///
/// NOTE: By default (i.e. when this function never gets called) @p keyword will be used as replacement.
......
......@@ -41,7 +41,7 @@ QTEST_MAIN(Php::BenchmarkCodeCompletion)