Contents of /trunk/kde4plasma-addons/patches/kde4plasma-addons-4.2.4-lancelot-qt45.patch
Parent Directory | Revision Log
Revision 843 -
(show annotations)
(download)
Fri Jun 12 08:28:17 2009 UTC (15 years, 3 months ago) by niro
File size: 8420 byte(s)
Fri Jun 12 08:28:17 2009 UTC (15 years, 3 months ago) by niro
File size: 8420 byte(s)
added kde4plasma-addon patches
1 | --- applets/lancelot/libs/lancelot/Global.cpp~ 2008-12-21 20:20:19.000000000 +0000 |
2 | +++ applets/lancelot/libs/lancelot/Global.cpp 2009-02-14 20:57:06.000000000 +0000 |
3 | @@ -326,8 +326,11 @@ |
4 | |
5 | d->confMain = new KConfig("lancelot" + app + "rc"); |
6 | |
7 | + Plasma::Theme::defaultTheme()->setUseGlobalSettings(true); |
8 | + qDebug() << "What is the plasma theme: " << Plasma::Theme::defaultTheme()->themeName(); |
9 | QString search = "desktoptheme/" + Plasma::Theme::defaultTheme()->themeName() + "/lancelot/" + app + "theme.config"; |
10 | kDebug() << search; |
11 | + qDebug() << "Trying:" << search; |
12 | |
13 | QString path = KStandardDirs::locate( "data", search ); |
14 | if (path == "") { |
15 | @@ -338,6 +341,8 @@ |
16 | path = "lancelotrc"; |
17 | } |
18 | kDebug() << path; |
19 | + |
20 | + qDebug() << "Using theme:" << path; |
21 | d->confTheme = new KConfig(path); |
22 | |
23 | Instance::Private::activeInstance = this; |
24 | --- applets/lancelot/libs/lancelot/widgets/PassagewayView.cpp~ 2009-01-06 17:23:55.000000000 +0000 |
25 | +++ applets/lancelot/libs/lancelot/widgets/PassagewayView.cpp 2009-02-14 21:35:13.000000000 +0000 |
26 | @@ -20,6 +20,10 @@ |
27 | #include "PassagewayView.h" |
28 | |
29 | #include <QWidget> |
30 | +#include <QGraphicsSceneMouseEvent> |
31 | +#include <QGraphicsView> |
32 | +#include <QApplication> |
33 | +#include <climits> |
34 | |
35 | namespace Lancelot { |
36 | |
37 | @@ -65,6 +69,8 @@ |
38 | : layout(NULL), buttonsLayout(NULL), listsLayout(NULL), parent(p), focusIndex(0) |
39 | { |
40 | parent->setLayout(layout = new NodeLayout()); |
41 | + layout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
42 | + layout->setMaximumSize(INT_MAX, INT_MAX); |
43 | |
44 | layout->addItem( |
45 | buttonsLayout = new QGraphicsLinearLayout(Qt::Horizontal), |
46 | @@ -72,6 +78,9 @@ |
47 | NodeLayout::NodeCoordinate(1, 0, 0, 32) |
48 | ); |
49 | |
50 | + buttonsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
51 | + buttonsLayout->setMaximumSize(INT_MAX, INT_MAX); |
52 | + |
53 | ExtenderButton * spacer = |
54 | new ExtenderButton(parent); |
55 | spacer->setGroupByName("PassagewayView-Spacer"); |
56 | @@ -88,6 +97,9 @@ |
57 | |
58 | listsLayout->setSizer(new PassagewayViewSizer()); |
59 | |
60 | + listsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
61 | + listsLayout->setMaximumSize(INT_MAX, INT_MAX); |
62 | + |
63 | buttonsLayout->setSpacing(0.0); |
64 | |
65 | next(Step("", QIcon(), entranceModel)); |
66 | @@ -161,7 +173,11 @@ |
67 | path.takeLast(); |
68 | |
69 | buttonsLayout->removeItem(button); |
70 | - layout->activate(); |
71 | + |
72 | + // This really shouldn't be needed :( |
73 | + buttonsLayout->setGeometry(buttonsLayout->geometry()); |
74 | + |
75 | + |
76 | listsLayout->pop(); |
77 | |
78 | button->deleteLater(); |
79 | @@ -196,19 +212,18 @@ |
80 | list->setCategoriesGroupByName("ActionListView-CategoriesPass"); |
81 | list->setCategoriesActivable(true); |
82 | |
83 | - // if (lists.count() > 0) { |
84 | - // lists.last()->clearSelection(); |
85 | - // } |
86 | - |
87 | focusIndex = lists.count(); |
88 | lists.append(list); |
89 | |
90 | - // list->initialSelection(); |
91 | path.append(step); |
92 | |
93 | buttonsLayout->addItem(button); |
94 | listsLayout->push(list); |
95 | |
96 | + // This really shouldn't be needed :( |
97 | + buttonsLayout->setGeometry(buttonsLayout->geometry()); |
98 | + listsLayout->setGeometry(listsLayout->geometry()); |
99 | + |
100 | QObject::connect( |
101 | list, SIGNAL(activated(int)), |
102 | parent, SLOT(listItemActivated(int)) |
103 | --- applets/lancelot/app/src/models/ContactsKopete.cpp 2009/02/14 16:58:48 926097 |
104 | +++ applets/lancelot/app/src/models/ContactsKopete.cpp 2009/02/15 10:37:30 926398 |
105 | @@ -22,7 +22,7 @@ |
106 | #include <KStandardDirs> |
107 | #include <KDebug> |
108 | |
109 | -#define UPDATE_INTERVAL 30000 |
110 | +#define UPDATE_INTERVAL 15000 |
111 | #define CHECK_RUNNING_INTERVAL 5000 |
112 | |
113 | namespace Models { |
114 | --- applets/lancelot/libs/lancelot/layouts/CardLayout.cpp 2008/08/16 21:14:21 848082 |
115 | +++ applets/lancelot/libs/lancelot/layouts/CardLayout.cpp 2009/02/15 10:37:30 926398 |
116 | @@ -31,6 +31,35 @@ |
117 | { |
118 | } |
119 | |
120 | + void _hide(QGraphicsWidget * widget) { |
121 | + // since Qt has some strange bug (or it |
122 | + // just doesn't behave as it should, |
123 | + // this is a temporary solution |
124 | + // so instead of hiding the item, |
125 | + // we are moving it somewhere |
126 | + // out of bounds |
127 | + // this is a very dirty hack! |
128 | + |
129 | + QRectF g = widget->geometry(); |
130 | + if (g.left() < 0) { |
131 | + return; |
132 | + } |
133 | + g.moveRight(- g.left()); |
134 | + widget->setGeometry(g); |
135 | + } |
136 | + |
137 | + void _show(QGraphicsWidget * widget) { |
138 | + // see the comment in _hide |
139 | + |
140 | + QRectF g = widget->geometry(); |
141 | + if (g.left() >= 0) { |
142 | + return; |
143 | + } |
144 | + |
145 | + g.moveLeft(- g.right()); |
146 | + widget->setGeometry(g); |
147 | + } |
148 | + |
149 | void relayout() |
150 | { |
151 | QRectF g = q->geometry(); |
152 | @@ -40,9 +69,11 @@ |
153 | } |
154 | |
155 | foreach (QGraphicsWidget * l, widgets) { |
156 | - l->show(); |
157 | + _show(l); |
158 | l->setGeometry(g); |
159 | - if (shown != l) l->hide(); |
160 | + if (shown != l) { |
161 | + _hide(l); |
162 | + } |
163 | } |
164 | } |
165 | |
166 | @@ -107,6 +138,7 @@ |
167 | if (widget) { |
168 | d->widgets[id] = widget; |
169 | // widget->hide(); // BUGS in QT |
170 | + d->_hide(widget); |
171 | } else { |
172 | d->removeItem(id); |
173 | } |
174 | @@ -142,17 +174,17 @@ |
175 | if (!d->widgets.contains(id)) return; |
176 | if (d->shown == d->widgets[id]) return; |
177 | if (d->shown) { |
178 | - d->shown->hide(); |
179 | + d->_hide(d->shown); |
180 | } |
181 | d->shown = d->widgets[id]; |
182 | d->shown->setGeometry(geometry()); |
183 | - d->shown->show(); |
184 | + d->_show(d->shown); |
185 | } |
186 | |
187 | void CardLayout::hideAll() |
188 | { |
189 | if (!d->shown) return; |
190 | - d->shown->hide(); |
191 | + d->_hide(d->shown); |
192 | d->shown = NULL; |
193 | } |
194 | |
195 | --- applets/lancelot/libs/lancelot/layouts/FullBorderLayout.cpp 2008/11/24 16:25:50 888490 |
196 | +++ applets/lancelot/libs/lancelot/layouts/FullBorderLayout.cpp 2009/02/15 10:37:30 926398 |
197 | @@ -41,10 +41,10 @@ |
198 | { |
199 | } |
200 | |
201 | - QMap< FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions; |
202 | - QMap< FullBorderLayout::Border, qreal > sizes; |
203 | + QMap < FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions; |
204 | + QMap < FullBorderLayout::Border, qreal > sizes; |
205 | |
206 | - void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) const |
207 | + void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) // const |
208 | { |
209 | // top |
210 | top = sizes[FullBorderLayout::TopBorder]; |
211 | @@ -121,7 +121,8 @@ |
212 | void FullBorderLayout::setGeometry(const QRectF & rect) |
213 | { |
214 | QGraphicsLayout::setGeometry(rect); |
215 | - kDebug() << rect; |
216 | + // WHATA HELL!? |
217 | + qDebug() << "FullBorderLayout::setGeometry()"; |
218 | |
219 | QRectF effectiveRect = geometry(); |
220 | qreal left = 0, top = 0, right = 0, bottom = 0; |
221 | @@ -158,7 +159,6 @@ |
222 | itemRect.setHeight(effectiveRect.height() - topBorder - bottomBorder); |
223 | |
224 | if (d->itemPositions[Right]) { |
225 | - kDebug() << "right" << itemRect; |
226 | d->itemPositions[Right]->setGeometry(itemRect); |
227 | } |
228 | |
229 | @@ -197,7 +197,6 @@ |
230 | ); |
231 | |
232 | if (d->itemPositions[Center]) { |
233 | - kDebug() << "center" << itemRect; |
234 | d->itemPositions[Center]->setGeometry(itemRect); |
235 | } |
236 | } |
237 | --- applets/lancelot/libs/lancelot/widgets/CustomListView.cpp 2009/02/08 10:49:35 923110 |
238 | +++ applets/lancelot/libs/lancelot/widgets/CustomListView.cpp 2009/02/15 10:37:30 926398 |
239 | @@ -163,9 +163,9 @@ |
240 | QGraphicsWidget * item = itemForIndex(i); |
241 | QRectF itemGeometry = item->geometry(); |
242 | if (viewport.intersects(itemGeometry)) { |
243 | - if (q->isVisible()) { |
244 | + //if (q->isVisible()) { |
245 | item->show(); |
246 | - } |
247 | + //} |
248 | transform.reset(); |
249 | if (!viewport.contains(itemGeometry)) { |
250 | QRectF clip = viewport.intersect(itemGeometry); |
251 | --- applets/lancelot/libs/lancelot/widgets/ScrollPane.cpp 2009/01/18 18:26:08 913061 |
252 | +++ applets/lancelot/libs/lancelot/widgets/ScrollPane.cpp 2009/02/15 10:37:30 926398 |
253 | @@ -229,8 +229,10 @@ |
254 | |
255 | void ScrollPane::setGeometry(const QRectF & rect) //> |
256 | { |
257 | + QRectF old_geometry = geometry(); |
258 | Widget::setGeometry(rect); |
259 | |
260 | + if (rect == old_geometry) return ; |
261 | scrollableWidgetSizeUpdateNeeded(); |
262 | } //< |
263 |