Skip to content
Commit 47e8a38a authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

Finalize "C#: Windows Forms classes are not imported" and fix "C# importer...

Finalize "C#: Windows Forms classes are not imported" and fix "C# importer doesn't support properties"

umbrello/codeimport/csharp/csharpimport.{h,cpp}
- Reimplement function preprocess(QString&); from NativeImportBase,
  currently only to discard preprocessor lines.
  Reason: If we don't do this then preprocessor lines are forwarded to
  the m_source token stream which creates problems on parsing.

umbrello/codeimport/csharp/csharpimport.cpp
- Cosmetic change in function joinTypename: Use lookAhead() in place of
  m_source[m_srcIndex + 1].
- In function resolveClass first call
    findObject(className, currentScope())
  and if this returns non null then return the found object.
- In function parseStmt :
  - Before testing isTypeDeclaration(keyword), while
    isClassModifier(keyword) returns true assign advance() to keyword.
  - Simplify if-statement testing isTypeDeclaration(keyword), use
    `keyword' in place of nextKeyword.
  - Remove handling of keyword "#", this is obsoleted by reimplementing
    preprocess(QString&).
  - Before expecting `keyword' to be a type name advance over possible
    modifiers using isCommonModifier(keyword).
  - In handling of nextToken "(", do not try resolving the return type
    if it is "void". In this case set typeName empty to avoid creation
    of a bogus type for "void".
  - Before handling a data member declaration add handling of nextToken
    "{" (property).

BUG: 449268
BUG: 375223
FIXED-IN:2.33.80 (KDE releases 22.03.80)
parent 1b9ccdac
Pipeline #136455 passed with stage
in 18 minutes and 22 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment