Browse Source

Update conditional moc inclusion for date range selector

Neal Wilson 7 years ago
parent
commit
6c77bb2969
4 changed files with 22 additions and 26 deletions
  1. 16
    18
      src/daterangeselector.cpp
  2. 1
    1
      src/daterangeselector.h
  3. 1
    3
      src/daterangeselector.w
  4. 4
    4
      src/typica.cpp

+ 16
- 18
src/daterangeselector.cpp View File

12
 #include "daterangeselector.h"
12
 #include "daterangeselector.h"
13
 
13
 
14
 /*697:*/
14
 /*697:*/
15
-#line 117 "./daterangeselector.w"
15
+#line 115 "./daterangeselector.w"
16
 
16
 
17
 CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
17
 CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
18
 QWidget(parent,Qt::Popup),startDateSelector(new QCalendarWidget),
18
 QWidget(parent,Qt::Popup),startDateSelector(new QCalendarWidget),
56
 }
56
 }
57
 
57
 
58
 /*:697*//*698:*/
58
 /*:697*//*698:*/
59
-#line 165 "./daterangeselector.w"
59
+#line 163 "./daterangeselector.w"
60
 
60
 
61
 void CustomDateRangePopup::hideEvent(QHideEvent*)
61
 void CustomDateRangePopup::hideEvent(QHideEvent*)
62
 {
62
 {
64
 }
64
 }
65
 
65
 
66
 /*:698*//*699:*/
66
 /*:698*//*699:*/
67
-#line 174 "./daterangeselector.w"
67
+#line 172 "./daterangeselector.w"
68
 
68
 
69
 void CustomDateRangePopup::applyRange()
69
 void CustomDateRangePopup::applyRange()
70
 {
70
 {
79
 }
79
 }
80
 
80
 
81
 /*:699*//*700:*/
81
 /*:699*//*700:*/
82
-#line 191 "./daterangeselector.w"
82
+#line 189 "./daterangeselector.w"
83
 
83
 
84
 void CustomDateRangePopup::validateRange()
84
 void CustomDateRangePopup::validateRange()
85
 {
85
 {
97
 #line 81 "./daterangeselector.w"
97
 #line 81 "./daterangeselector.w"
98
 
98
 
99
 /*701:*/
99
 /*701:*/
100
-#line 209 "./daterangeselector.w"
100
+#line 207 "./daterangeselector.w"
101
 
101
 
102
 DateRangeSelector::DateRangeSelector(QWidget*parent):
102
 DateRangeSelector::DateRangeSelector(QWidget*parent):
103
 QWidget(parent),quickSelector(new QComboBox(this)),
103
 QWidget(parent),quickSelector(new QComboBox(this)),
109
 
109
 
110
 QHBoxLayout*layout= new QHBoxLayout;
110
 QHBoxLayout*layout= new QHBoxLayout;
111
 /*702:*/
111
 /*702:*/
112
-#line 238 "./daterangeselector.w"
112
+#line 236 "./daterangeselector.w"
113
 
113
 
114
 quickSelector->addItem("Yesterday",QVariant(QStringList()<<
114
 quickSelector->addItem("Yesterday",QVariant(QStringList()<<
115
 currentDate.addDays(-1).toString(Qt::ISODate)));
115
 currentDate.addDays(-1).toString(Qt::ISODate)));
189
 quickSelector->addItem("Custom");
189
 quickSelector->addItem("Custom");
190
 
190
 
191
 /*:702*/
191
 /*:702*/
192
-#line 219 "./daterangeselector.w"
192
+#line 217 "./daterangeselector.w"
193
 
193
 
194
 QToolButton*customButton= new QToolButton;
194
 QToolButton*customButton= new QToolButton;
195
 customButton->setIcon(QIcon::fromTheme("office-calendar",
195
 customButton->setIcon(QIcon::fromTheme("office-calendar",
202
 }
202
 }
203
 
203
 
204
 /*:701*//*703:*/
204
 /*:701*//*703:*/
205
-#line 321 "./daterangeselector.w"
205
+#line 319 "./daterangeselector.w"
206
 
206
 
207
 void DateRangeSelector::updateRange(int index)
207
 void DateRangeSelector::updateRange(int index)
208
 {
208
 {
218
 }
218
 }
219
 
219
 
220
 /*:703*//*704:*/
220
 /*:703*//*704:*/
221
-#line 338 "./daterangeselector.w"
221
+#line 336 "./daterangeselector.w"
222
 
222
 
223
 void DateRangeSelector::popupHidden()
223
 void DateRangeSelector::popupHidden()
224
 {
224
 {
228
 }
228
 }
229
 
229
 
230
 /*:704*//*705:*/
230
 /*:704*//*705:*/
231
-#line 349 "./daterangeselector.w"
231
+#line 347 "./daterangeselector.w"
232
 
232
 
233
 void DateRangeSelector::setCustomRange(QVariant range)
233
 void DateRangeSelector::setCustomRange(QVariant range)
234
 {
234
 {
239
 }
239
 }
240
 
240
 
241
 /*:705*//*706:*/
241
 /*:705*//*706:*/
242
-#line 364 "./daterangeselector.w"
242
+#line 362 "./daterangeselector.w"
243
 
243
 
244
 void DateRangeSelector::toggleCustom()
244
 void DateRangeSelector::toggleCustom()
245
 {
245
 {
280
 }
280
 }
281
 
281
 
282
 /*:706*//*707:*/
282
 /*:706*//*707:*/
283
-#line 406 "./daterangeselector.w"
283
+#line 404 "./daterangeselector.w"
284
 
284
 
285
 QVariant DateRangeSelector::currentRange()
285
 QVariant DateRangeSelector::currentRange()
286
 {
286
 {
288
 }
288
 }
289
 
289
 
290
 /*:707*//*708:*/
290
 /*:707*//*708:*/
291
-#line 414 "./daterangeselector.w"
291
+#line 412 "./daterangeselector.w"
292
 
292
 
293
 void DateRangeSelector::setCurrentIndex(int index)
293
 void DateRangeSelector::setCurrentIndex(int index)
294
 {
294
 {
301
 }
301
 }
302
 
302
 
303
 /*:708*//*709:*/
303
 /*:708*//*709:*/
304
-#line 434 "./daterangeselector.w"
304
+#line 432 "./daterangeselector.w"
305
 
305
 
306
 void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
306
 void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
307
 {
307
 {
310
 }
310
 }
311
 
311
 
312
 /*:709*//*710:*/
312
 /*:709*//*710:*/
313
-#line 444 "./daterangeselector.w"
313
+#line 442 "./daterangeselector.w"
314
 
314
 
315
 void DateRangeSelector::removeIndex(int index)
315
 void DateRangeSelector::removeIndex(int index)
316
 {
316
 {
321
 #line 82 "./daterangeselector.w"
321
 #line 82 "./daterangeselector.w"
322
 
322
 
323
 
323
 
324
-#ifdef __unix__
325
-#ifndef __linux__
324
+#if __APPLE__
326
 #include "moc_daterangeselector.cpp"
325
 #include "moc_daterangeselector.cpp"
327
 #endif
326
 #endif
328
-#endif
329
 
327
 
330
 /*:695*/
328
 /*:695*/

+ 1
- 1
src/daterangeselector.h View File

10
 #define TypicaDateRangeSelectorHeader
10
 #define TypicaDateRangeSelectorHeader
11
 
11
 
12
 /*696:*/
12
 /*696:*/
13
-#line 93 "./daterangeselector.w"
13
+#line 91 "./daterangeselector.w"
14
 
14
 
15
 class CustomDateRangePopup:public QWidget
15
 class CustomDateRangePopup:public QWidget
16
 {
16
 {

+ 1
- 3
src/daterangeselector.w View File

81
 @<CustomDateRangePopup implementation@>
81
 @<CustomDateRangePopup implementation@>
82
 @<DateRangeSelector implementation@>
82
 @<DateRangeSelector implementation@>
83
 
83
 
84
-#ifdef __unix__
85
-#ifndef __linux__
84
+#if __APPLE__
86
 #include "moc_daterangeselector.cpp"
85
 #include "moc_daterangeselector.cpp"
87
 #endif
86
 #endif
88
-#endif
89
 
87
 
90
 @ The custom range pop up is represented as a separate class which is not to be
88
 @ The custom range pop up is represented as a separate class which is not to be
91
 instantiated except by |DateRangeSelector|.
89
 instantiated except by |DateRangeSelector|.

+ 4
- 4
src/typica.cpp View File

47
 #include "printerselector.h"
47
 #include "printerselector.h"
48
 
48
 
49
 /*:589*//*714:*/
49
 /*:589*//*714:*/
50
-#line 489 "./daterangeselector.w"
50
+#line 487 "./daterangeselector.w"
51
 
51
 
52
 #include "daterangeselector.h"
52
 #include "daterangeselector.h"
53
 #line 14571 "./typica.w"
53
 #line 14571 "./typica.w"
3407
 QScriptValue QTextEdit_print(QScriptContext*context,QScriptEngine*engine);
3407
 QScriptValue QTextEdit_print(QScriptContext*context,QScriptEngine*engine);
3408
 
3408
 
3409
 /*:685*//*713:*/
3409
 /*:685*//*713:*/
3410
-#line 482 "./daterangeselector.w"
3410
+#line 480 "./daterangeselector.w"
3411
 
3411
 
3412
 void addDateRangeToLayout(QDomElement element,
3412
 void addDateRangeToLayout(QDomElement element,
3413
 QStack<QWidget*> *widgetStack,
3413
 QStack<QWidget*> *widgetStack,
20591
 #line 12811 "./typica.w"
20591
 #line 12811 "./typica.w"
20592
 
20592
 
20593
 /*:596*//*711:*/
20593
 /*:596*//*711:*/
20594
-#line 453 "./daterangeselector.w"
20594
+#line 451 "./daterangeselector.w"
20595
 
20595
 
20596
 else if(currentElement.tagName()=="daterange")
20596
 else if(currentElement.tagName()=="daterange")
20597
 {
20597
 {
22801
 
22801
 
22802
 #line 1 "./plugins.w"
22802
 #line 1 "./plugins.w"
22803
 /*:687*//*712:*/
22803
 /*:687*//*712:*/
22804
-#line 463 "./daterangeselector.w"
22804
+#line 461 "./daterangeselector.w"
22805
 
22805
 
22806
 void addDateRangeToLayout(QDomElement element,QStack<QWidget*> *,
22806
 void addDateRangeToLayout(QDomElement element,QStack<QWidget*> *,
22807
 QStack<QLayout*> *layoutStack)
22807
 QStack<QLayout*> *layoutStack)

Loading…
Cancel
Save