[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/frameworks] /: Move KButtonGroup to KDE4Support
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2013-06-11 13:16:27
Message-ID: 20130611131627.2D44FA6067 () git ! kde ! org
[Download RAW message or body]
Git commit 60dfe18a3d93ce12e8bb8258efa9a93d704ba6ea by Anne-Marie Mahfouf.
Committed on 11/06/2013 at 15:12.
Pushed by annma into branch 'frameworks'.
Move KButtonGroup to KDE4Support
Move class, fix export in header, mark as deprecated
Move test to autotests, fix some trailing whitespaces
Review: 110478
M +0 -2 kdeui/CMakeLists.txt
M +0 -1 kdeui/tests/CMakeLists.txt
M +0 -6 kdewidgets/kde.widgets
M +6 -0 kdewidgets/kdedeprecated.widgets
M +1 -0 staging/kde4support/autotests/CMakeLists.txt
R +1 -1 staging/kde4support/autotests/kbuttongrouptest.cpp [from: \
kdeui/tests/kbuttongrouptest.cpp - 099% similarity] R +0 -0 \
staging/kde4support/autotests/kbuttongrouptest.h [from: \
kdeui/tests/kbuttongrouptest.h - 100% similarity] M +2 -0 \
staging/kde4support/src/CMakeLists.txt R +3 -3 \
staging/kde4support/src/kdeui/kbuttongroup.cpp [from: kdeui/widgets/kbuttongroup.cpp \
- 099% similarity] R +4 -2 staging/kde4support/src/kdeui/kbuttongroup.h [from: \
kdeui/widgets/kbuttongroup.h - 095% similarity]
http://commits.kde.org/kdelibs/60dfe18a3d93ce12e8bb8258efa9a93d704ba6ea
diff --git a/kdeui/CMakeLists.txt b/kdeui/CMakeLists.txt
index 562c7ca..6b4a365 100644
--- a/kdeui/CMakeLists.txt
+++ b/kdeui/CMakeLists.txt
@@ -138,7 +138,6 @@ set(kdeui_LIB_SRCS
util/kpassivepopup.cpp
util/kpassivepopupmessagehandler.cpp
util/kundoactions.cpp
- widgets/kbuttongroup.cpp
widgets/kcharselect.cpp
widgets/kcharselectdata.cpp
widgets/kcmodule.cpp
@@ -401,7 +400,6 @@ install( FILES
widgets/kcmodule.h
widgets/kcombobox.h
widgets/kcompletionbox.h
- widgets/kbuttongroup.h
widgets/kcharselect.h
widgets/kdatetable.h
widgets/khelpmenu.h
diff --git a/kdeui/tests/CMakeLists.txt b/kdeui/tests/CMakeLists.txt
index 4ca816e..beb1cba 100644
--- a/kdeui/tests/CMakeLists.txt
+++ b/kdeui/tests/CMakeLists.txt
@@ -18,7 +18,6 @@ ENDMACRO(KDEUI_EXECUTABLE_TESTS)
KDEUI_UNIT_TESTS(
kactioncollectiontest
kactioncategorytest
- kbuttongrouptest
kfindtest
kmainwindow_unittest
klineedit_unittest
diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets
index 261ac1f..b138d4e 100644
--- a/kdewidgets/kde.widgets
+++ b/kdewidgets/kde.widgets
@@ -14,12 +14,6 @@ ToolTip=An extended version of QToolButton which can display an \
animated icon. Group=Display (KDE)
ConstructorArgs=(parent)
-[KButtonGroup]
-IncludeFile=kbuttongroup.h
-ToolTip=Group of radio buttons with index selection.
-IsContainer=true
-Group=Container (KDE)
-
[KCapacityBar]
IncludeFile=kcapacitybar.h
ToolTip=Capacity Bar (KDE)
diff --git a/kdewidgets/kdedeprecated.widgets b/kdewidgets/kdedeprecated.widgets
index 92185a7..47dfaec 100644
--- a/kdewidgets/kdedeprecated.widgets
+++ b/kdewidgets/kdedeprecated.widgets
@@ -9,6 +9,12 @@ ToolTip=Draws a button which shows an arrow pointing into a certain \
direction. Group=Buttons (KDE)
ConstructorArgs=(parent,Qt::UpArrow)
+[KButtonGroup]
+IncludeFile=kbuttongroup.h
+ToolTip=Group of radio buttons with index selection.
+IsContainer=true
+Group=Container (KDE)
+
[KEditListBox]
ToolTip=Fullfeatured edit box with buttons (KDE)
Group=Views (KDE)
diff --git a/staging/kde4support/autotests/CMakeLists.txt \
b/staging/kde4support/autotests/CMakeLists.txt index 8cef72f..ada9d00 100644
--- a/staging/kde4support/autotests/CMakeLists.txt
+++ b/staging/kde4support/autotests/CMakeLists.txt
@@ -24,6 +24,7 @@ kde4support_unit_tests(
globalcleanuptest
kaccelgentest
kdebugtest
+ kbuttongrouptest
kdialog_unittest
kfadewidgeteffecttest
kconfigafterkglobaltest1
diff --git a/kdeui/tests/kbuttongrouptest.cpp \
b/staging/kde4support/autotests/kbuttongrouptest.cpp similarity index 99%
rename from kdeui/tests/kbuttongrouptest.cpp
rename to staging/kde4support/autotests/kbuttongrouptest.cpp
index 93dd05e..a93ebe6 100644
--- a/kdeui/tests/kbuttongrouptest.cpp
+++ b/staging/kde4support/autotests/kbuttongrouptest.cpp
@@ -53,7 +53,7 @@ void KButtonGroupTest::initTestCase()
void KButtonGroupTest::directSelectionTestCase()
{
- // test where setSelected is called before the
+ // test where setSelected is called before the
// ensurePolished() is called.
KButtonGroup* kbuttongroup2 = new KButtonGroup();
kbuttongroup2->setSelected( 3 );
diff --git a/kdeui/tests/kbuttongrouptest.h \
b/staging/kde4support/autotests/kbuttongrouptest.h similarity index 100%
rename from kdeui/tests/kbuttongrouptest.h
rename to staging/kde4support/autotests/kbuttongrouptest.h
diff --git a/staging/kde4support/src/CMakeLists.txt \
b/staging/kde4support/src/CMakeLists.txt index f89e845..ca1fe7f 100644
--- a/staging/kde4support/src/CMakeLists.txt
+++ b/staging/kde4support/src/CMakeLists.txt
@@ -39,6 +39,7 @@ set(libkde4support_SRCS
kdeui/k3icon.cpp
kdeui/kaction.cpp
kdeui/kapplication.cpp
+ kdeui/kbuttongroup.cpp
kdeui/kcolorchoosermode.cpp
kdeui/kcolordialog.cpp
kdeui/kcolorhelpers.cpp
@@ -150,6 +151,7 @@ install(FILES
kdeui/kaccelgen.h
kdeui/kaction.h
kdeui/kapplication.h
+ kdeui/kbuttongroup.h
kdeui/kcolorchoosermode.h
kdeui/kcolordialog.h
kdeui/kcolorvalueselector.h
diff --git a/kdeui/widgets/kbuttongroup.cpp \
b/staging/kde4support/src/kdeui/kbuttongroup.cpp similarity index 99%
rename from kdeui/widgets/kbuttongroup.cpp
rename to staging/kde4support/src/kdeui/kbuttongroup.cpp
index c4d918d..139d60d 100644
--- a/kdeui/widgets/kbuttongroup.cpp
+++ b/staging/kde4support/src/kdeui/kbuttongroup.cpp
@@ -69,7 +69,7 @@ void KButtonGroup::setSelected( int id )
ensurePolished();
return;
}
-
+
QHash<QObject*, int>::Iterator it = d->btnMap.begin();
QHash<QObject*, int>::Iterator itEnd = d->btnMap.end();
QAbstractButton* button = 0;
@@ -84,7 +84,7 @@ void KButtonGroup::setSelected( int id )
return;
}
}
- // button not found, it might still show up though, eg. because of premature \
polishing above + // button not found, it might still show up though, eg. because \
of premature polishing above d->wantToBeId = id;
}
@@ -110,7 +110,7 @@ void KButtonGroup::childEvent( QChildEvent* event )
d->releasedMapper.setMapping( button, d->nextId );
d->btnMap[ button ] = d->nextId;
-
+
if ( d->nextId == d->wantToBeId )
{
d->currentId = d->wantToBeId;
diff --git a/kdeui/widgets/kbuttongroup.h \
b/staging/kde4support/src/kdeui/kbuttongroup.h similarity index 95%
rename from kdeui/widgets/kbuttongroup.h
rename to staging/kde4support/src/kdeui/kbuttongroup.h
index 5bc89dd..06f2aa2 100644
--- a/kdeui/widgets/kbuttongroup.h
+++ b/staging/kde4support/src/kdeui/kbuttongroup.h
@@ -22,12 +22,14 @@
#ifndef KBUTTONGROUP_H
#define KBUTTONGROUP_H
-#include <kdeui_export.h>
+#include <kde4support_export.h>
#include <QGroupBox>
class QAbstractButton;
/**
+ * @deprecated since 5.0, use QGroupBox and QButtonGroup instead
+ *
* @short Group box with index of the selected button
* KButtonGroup is a simple group box that can keep track of the current selected
* button of the ones added to it.
@@ -38,7 +40,7 @@ class QAbstractButton;
*
* @author Pino Toscano <toscano.pino@tiscali.it>
*/
-class KDEUI_EXPORT KButtonGroup
+class KDE4SUPPORT_EXPORT KButtonGroup
: public QGroupBox
{
Q_OBJECT
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic