[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kstars] kstars/tools: Remove useless indirecion
From: Khudyakov Alexey <alexey.skladnoy () gmail ! com>
Date: 2011-07-23 20:07:53
Message-ID: 20110723200753.214E1A60C8 () git ! kde ! org
[Download RAW message or body]
Git commit fd22b9b027e4aa84894f107d3dc41d1bfcf13b32 by Khudyakov Alexey.
Committed on 23/07/2011 at 21:21.
Pushed by khudyakov into branch 'master'.
Remove useless indirecion
void ObservingList::removeObject(SkyObject *o, bool sessionView) {
if ( sessionView )
slotRemoveObject( o, true );
else
slotRemoveObject( o );
}
equivalent to:
void ObservingList::removeObject(SkyObject *o, bool sessionView) {
slotRemoveObject( o, sessionView );
}
M +0 -7 kstars/tools/observinglist.h
M +2 -9 kstars/tools/observinglist.cpp
http://commits.kde.org/kstars/fd22b9b027e4aa84894f107d3dc41d1bfcf13b32
diff --git a/kstars/tools/observinglist.cpp b/kstars/tools/observinglist.cpp
index 7390d9d..6f1b6fa 100644
--- a/kstars/tools/observinglist.cpp
+++ b/kstars/tools/observinglist.cpp
@@ -378,13 +378,6 @@ void ObservingList::slotRemoveObject( SkyObject *o, bool session, bool update )
}
}
-void ObservingList::removeObject(SkyObject *o, bool sessionView) {
- if ( sessionView )
- slotRemoveObject( o, true );
- else
- slotRemoveObject( o );
-}
-
void ObservingList::slotRemoveSelectedObjects() {
QStandardItemModel *currentModel;
// ObservingListUI local_ui;
@@ -423,12 +416,12 @@ void ObservingList::slotRemoveSelectedObjects() {
//Stars named "star" must be matched by coordinates
if ( o->name() == "star" ) {
if ( o->ra0().toHMSString() == ra && o->dec0().toDMSString() == dc ) {
- removeObject(o, sessionView);
+ slotRemoveObject(o, sessionView);
break;
}
} else {
if ( o->translatedName() == mIndex.data().toString() ) {
- removeObject(o, sessionView);
+ slotRemoveObject(o, sessionView);
break;
}
}
diff --git a/kstars/tools/observinglist.h b/kstars/tools/observinglist.h
index 393e3a0..fa9e9ad 100644
--- a/kstars/tools/observinglist.h
+++ b/kstars/tools/observinglist.h
@@ -136,13 +136,6 @@ public:
*/
void setCurrentImage( SkyObject *o, bool temp = false );
- /**@short Chooses how to call slotRemoveObject according to sessionView
- *@p o Pointer to the SkyObject to be removed
- *@p sessionView Flag to tell it whether to remove the object
- *from the sessionlist or from the wishlist
- */
- void removeObject(SkyObject *o, bool sessionView);
-
/**@short Save the user log text to a file.
*@note the log is attached to the current object in obsList.
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic