~ubuntu-branches/ubuntu/oneiric/kdesdk/oneiric-updates

« back to all changes in this revision

Viewing changes to umbrello/umbrello/codegenerators/cpp/cppsourcecodeoperation.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers, Modestas Vainius, George Kiagiadakis, José Manuel Santamaría Lema, Pino Toscano
  • Date: 2011-04-27 12:23:44 UTC
  • mfrom: (1.1.58 upstream) (0.5.7 squeeze)
  • mto: (0.5.8 sid)
  • mto: This revision was merged to the branch mainline in revision 120.
  • Revision ID: james.westby@ubuntu.com-20110427122344-t9d1jf4lfnrl6hyv
Tags: 4:4.6.2-1
* New upstream release:
  - fixes plugin loading in kate sessions (Closes: #525853)
  - updates kate man page with respect to instance creation defaults
    (Closes: #598443)
  - fixes cursor position with static word-wrap in Kate (Closes: #570409)
  - xml2pot creates .pot files with the correct mimetype (Closes: #326060)
* Update installed files.
* Update lintian overrides.

[ Modestas Vainius ]
* Point debian/control Vcs fields to the new Git repository.
* Strip sequence numbers from debian/patches.
* Strip trailing whitespace in debian/copyright.
* Add kdeutils-dbg (<< 4:4.6) to kdesdk-dbg Breaks/Replaces (due to moved
  okteta).
* Add ${perl:Depends} to Depends of cervisia and kdesdk-kio-plugins.

[ George Kiagiadakis ]
* Add myself to uploaders.
* Refresh patch 02_append_kde.diff.
* Drop patch 03_kmtrace_compile.diff; fixed upstream in a better way.
* Add libkonq5-dev, libantlr-dev and antlr to build depends.
  (Closes: #505425)
* Bump kdepimlibs5-dev build dependency to version 4:4.6.
* Add new package: kdesdk-dolphin-plugins.

[ José Manuel Santamaría Lema ]
* Remove package kbugbuster.
* Enable DebianABIManager:
  - include DebianABIManager.cmake at the bottom of the main CMakeLists.txt
    (patch enable_debianabimanager.diff).
  - debian/control: managing all non-local unstable-BC libraries.
* Add packages for okteta:
  - okteta
  - okteta-dev
  - libkastencontrollers4
  - libkastencore4
  - libkastengui4
  - liboktetacore4
  - liboktetagui4
  - liboktetakastencontrollers4
  - liboktetakastencore4
  - liboktetakastengui4
* Add symbols files for new library packages.
* Bump kde-sc-dev-latest build dependency to 4:4.6.2.
* Bump pkg-kde-tools build dependency to 0.12.
* Switch debian/rules engine to dhmk based qt-kde-team/2/*
  - and remove cdbs from Build-Depends.
* Bump S-V to 3.9.1; update Replaces/Breaks/Conflicts.
* Add myself to Uploaders.

[ Pino Toscano ]
* Add build dependency on libqca2-dev.
* Do not ship kdesrc-build with kdesdk-scripts, it is packaged separately.
* Small updates to descriptions.
* Clean up Replaces/Breaks from the pre-squeeze era whenever possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *   (at your option) any later version.                                   *
6
6
 *                                                                         *
7
7
 *   copyright (C) 2003      Brian Thomas <thomas@mail630.gsfc.nasa.gov>   *
8
 
 *   copyright (C) 2004-2008                                               *
 
8
 *   copyright (C) 2004-2010                                               *
9
9
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
10
10
 ***************************************************************************/
11
11
 
35
35
 
36
36
void CPPSourceCodeOperation::updateContent( )
37
37
{
38
 
    CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
 
38
    CodeGenPolicyExt *pe = UMLApp::app()->policyExt();
39
39
    CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
40
40
    bool isInlineMethod = policy->getOperationsAreInline();
41
41
 
47
47
void CPPSourceCodeOperation::updateMethodDeclaration()
48
48
{
49
49
    CPPSourceCodeDocument * doc = dynamic_cast<CPPSourceCodeDocument*>(getParentDocument());
50
 
    CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
 
50
    CodeGenPolicyExt *pe = UMLApp::app()->policyExt();
51
51
    CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
52
52
    UMLClassifier * c = doc->getParentClassifier();
53
53
    UMLOperation * o = getParentOperation();
55
55
    bool isInlineMethod = policy->getOperationsAreInline( );
56
56
 
57
57
    // first, the comment on the operation
58
 
    QString comment = o->getDoc();
 
58
    QString comment = o->doc();
59
59
    getComment()->setText(comment);
60
60
 
61
61
    QString returnType = o->getTypeName();
62
 
    QString methodName = o->getName();
 
62
    QString methodName = o->name();
63
63
    QString paramStr;
64
 
    QString className = CodeGenerator::cleanName(c->getName());
 
64
    QString className = CodeGenerator::cleanName(c->name());
65
65
 
66
66
    // assemble parameters
67
67
    UMLAttributeList list = getParentOperation()->getParmList();
69
69
    int paramNum = 0;
70
70
    foreach (UMLAttribute* parm, list ) {
71
71
        QString rType = parm->getTypeName();
72
 
        QString paramName = parm->getName();
 
72
        QString paramName = parm->name();
73
73
        paramStr += rType + ' ' + paramName;
74
74
        paramNum++;
75
75
 
89
89
 
90
90
    // if a property has a friend stereotype, the operation should
91
91
    // not be a class name
92
 
    if (o->getStereotype() != "friend")
 
92
    if (o->stereotype() != "friend")
93
93
        startText += className + "::";
94
94
    startText += methodName + " (" + paramStr + ')';
95
95
    if (o->getConst())
100
100
 
101
101
    // Only write this out if it is a child of an interface OR is abstract.
102
102
    // and it is not inline
103
 
    if (isInterface || o->getAbstract() || isInlineMethod)
 
103
    if (isInterface || o->isAbstract() || isInlineMethod)
104
104
    {
105
105
        setWriteOutText(false);
106
106
    } else {