Bug 154875 - Fix implementation of assignment operator
Summary: Fix implementation of assignment operator
Status: RESOLVED FIXED
Alias: None
Product: kcron
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Nicolas Ternisien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-30 20:50 UTC by Markus Elfring
Modified: 2008-11-19 18:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Adjustment of assignment operators (3.77 KB, patch)
2008-01-18 00:10 UTC, Markus Elfring
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Elfring 2007-12-30 20:50:10 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    SuSE RPMs
OS:                Linux

I recommend to add protection for self assignment in the class "CTTask".
http://websvn.kde.org/trunk/KDE/kdeadmin/kcron/cttask.cpp?revision=704796&view=markup
http://dietmar-kuehl.de/mirror/c++-faq/assignment-operators.html#faq-12.3
Comment 1 Maciej Pilichowski 2007-12-31 17:00:47 UTC
There is no danger in it, however awkwardly operator= does not return any value.

Anyway, since you went so far, maybe you add a patch?
Comment 2 Markus Elfring 2008-01-18 00:10:58 UTC
Created attachment 23112 [details]
Adjustment of assignment operators

I wonder also why the return type was "void" instead of usual references.
Is my update suggestion acceptable?
Comment 3 Nicolas Ternisien 2008-03-18 23:53:21 UTC
SVN commit 787315 by ternisien:

Improve errors management
Rewrite and simplify most part of KCron
Add right action buttons list for a easier action access
Improve command line parsing, to avoid the saving of good command line
Reimplement and rewrite the TaskEditorDialog, by allowing a minute per minute selecting, and a smarter
displaying.
Able to add multi-lines comments on variables and tasks
Clean API
All known bugs are now closed, KCron seems to be ready for KDE 4.1

It just needs a icon from KDE Artist team

BUG:59532
BUG:97118
BUG:131433
BUG:135652
BUG:154875


 _M            . (directory)  
 M  +4 -0      src/CMakeLists.txt  
 M  +1 -1      src/crontabPrinter.cpp  
 M  +102 -74   src/crontabWidget.cpp  
 M  +28 -31    src/crontabWidget.h  
 M  +9 -1      src/crontablib/ctGlobalCron.cpp  
 A             src/crontablib/ctHelper.cpp   [License: GPL (v2+)]
 A             src/crontablib/ctHelper.h   [License: GPL (v2+)]
 A             src/crontablib/ctInitializationError.cpp   [License: GPL (v2+)]
 A             src/crontablib/ctInitializationError.h   [License: GPL (v2+)]
 A             src/crontablib/ctSaveStatus.cpp   [License: GPL (v2+)]
 A             src/crontablib/ctSaveStatus.h   [License: GPL (v2+)]
 A             src/crontablib/ctSystemCron.cpp   [License: GPL (v2+)]
 A             src/crontablib/ctSystemCron.h   [License: GPL (v2+)]
 M  +86 -156   src/crontablib/ctcron.cpp  
 M  +84 -35    src/crontablib/ctcron.h  
 M  +42 -31    src/crontablib/cthost.cpp  
 M  +9 -22     src/crontablib/cthost.h  
 M  +5 -1      src/crontablib/ctminute.cpp  
 M  +3 -2      src/crontablib/ctminute.h  
 M  +127 -7    src/crontablib/cttask.cpp  
 M  +16 -1     src/crontablib/cttask.h  
 M  +7 -5      src/crontablib/ctunit.cpp  
 M  +9 -8      src/crontablib/ctunit.h  
 M  +51 -4     src/crontablib/ctvariable.cpp  
 M  +6 -1      src/crontablib/ctvariable.h  
 M  +57 -4     src/genericListWidget.cpp  
 M  +11 -0     src/genericListWidget.h  
 M  +23 -246   src/kcmCron.cpp  
 M  +7 -49     src/kcmCron.h  
 M  +15 -2     src/kcronHelper.cpp  
 M  +3 -0      src/kcronHelper.h  
 M  +0 -24     src/kcronIcons.cpp  
 M  +1 -6      src/kcronIcons.h  
 M  +443 -308  src/taskEditorDialog.cpp  
 M  +47 -24    src/taskEditorDialog.h  
 M  +1 -20     src/taskWidget.cpp  
 M  +0 -2      src/taskWidget.h  
 M  +139 -10   src/tasksWidget.cpp  
 M  +32 -1     src/tasksWidget.h  
 M  +8 -23     src/variableEditorDialog.cpp  
 M  +1 -1      src/variableEditorDialog.h  
 M  +1 -17     src/variableWidget.cpp  
 M  +110 -7    src/variablesWidget.cpp  
 M  +25 -1     src/variablesWidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=787315