equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 #include "hbinputdialog.h" |
18 #include "hbinputdialog.h" |
19 |
19 |
20 bool HbInputDialog::mGetTextFails = false; |
20 bool HbInputDialog::mGetTextFails = false; |
|
21 QString HbInputDialog::mGetTextReturnValue = QString(); |
|
22 int HbInputDialog::mGetTextCallCount = 0; |
21 |
23 |
22 |
24 |
23 QString HbInputDialog::getText(const QString &label,const QString &text, |
25 QString HbInputDialog::getText(const QString &label,const QString &text, |
24 bool *ok, QGraphicsScene *scene, QGraphicsItem *parent) |
26 bool *ok, QGraphicsScene *scene, QGraphicsItem *parent) |
25 { |
27 { |
26 Q_UNUSED(label); |
28 Q_UNUSED(label); |
27 Q_UNUSED(scene); |
29 Q_UNUSED(scene); |
28 Q_UNUSED(parent); |
30 Q_UNUSED(parent); |
29 QString textReturn = text; |
31 mGetTextCallCount++; |
|
32 QString textReturn; |
|
33 if(HbInputDialog::mGetTextReturnValue.isNull()) |
|
34 { |
|
35 textReturn = text; |
|
36 } |
|
37 else |
|
38 { |
|
39 textReturn = mGetTextReturnValue; |
|
40 } |
30 if(mGetTextFails) |
41 if(mGetTextFails) |
31 { |
42 { |
32 *ok = false; |
43 *ok = false; |
33 textReturn = ""; |
44 textReturn = ""; |
34 } |
45 } |