Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/queries/kexiquerydesignersql.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 59 | Private() : | |||
---|---|---|---|---|---|
60 | statusPixmapOk(koDesktopIcon("dialog-ok")) | 60 | statusPixmapOk(koDesktopIcon("dialog-ok")) | ||
61 | , statusPixmapErr(koDesktopIcon("dialog-error")) | 61 | , statusPixmapErr(koDesktopIcon("dialog-error")) | ||
62 | , statusPixmapInfo(koDesktopIcon("dialog-information")) | 62 | , statusPixmapInfo(koDesktopIcon("dialog-information")) | ||
63 | , parsedQuery(0) | 63 | , parsedQuery(0) | ||
64 | , heightForStatusMode(-1) | 64 | , heightForStatusMode(-1) | ||
65 | , justSwitchedFromNoViewMode(false) | 65 | , justSwitchedFromNoViewMode(false) | ||
66 | , slotTextChangedEnabled(true) { | 66 | , slotTextChangedEnabled(true) { | ||
67 | } | 67 | } | ||
68 | ~Private() { | ||||
69 | delete parsedQuery; | ||||
70 | } | ||||
68 | KexiQueryDesignerSqlEditor *editor; | 71 | KexiQueryDesignerSqlEditor *editor; | ||
69 | QLabel *pixmapStatus, *lblStatus; | 72 | QLabel *pixmapStatus, *lblStatus; | ||
70 | QHBoxLayout *statusHLyr; | 73 | QHBoxLayout *statusHLyr; | ||
71 | QFrame *statusMainWidget; | 74 | QFrame *statusMainWidget; | ||
72 | KexiSectionHeader *head; | 75 | KexiSectionHeader *head; | ||
73 | QWidget *bottomPane; | 76 | QWidget *bottomPane; | ||
74 | QPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo; | 77 | QPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo; | ||
75 | QSplitter *splitter; | 78 | QSplitter *splitter; | ||
76 | //! For internal use, this pointer is usually copied to TempData structure, | 79 | //! For internal use, this pointer is usually copied to TempData structure, | ||
77 | //! when switching out of this view (then it's cleared). | 80 | //! when switching out of this view (then it's cleared). | ||
81 | //! If it's still present at destruction of Private then it's deleted. | ||||
78 | KDbQuerySchema *parsedQuery; | 82 | KDbQuerySchema *parsedQuery; | ||
79 | //! For internal use, statement passed in switching to this view | 83 | //! For internal use, statement passed in switching to this view | ||
80 | KDbEscapedString origStatement; | 84 | KDbEscapedString origStatement; | ||
81 | //! needed to remember height for both modes, between switching | 85 | //! needed to remember height for both modes, between switching | ||
82 | int heightForStatusMode; | 86 | int heightForStatusMode; | ||
83 | //! helper for beforeSwitchTo() | 87 | //! helper for beforeSwitchTo() | ||
84 | bool justSwitchedFromNoViewMode; | 88 | bool justSwitchedFromNoViewMode; | ||
85 | //! helper for slotTextChanged() | 89 | //! helper for slotTextChanged() | ||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Line(s) | 231 | if (sqlTextIsEmpty || !slotCheckQuery()) { | |||
246 | slotCheckQuery(); | 250 | slotCheckQuery(); | ||
247 | return true; | 251 | return true; | ||
248 | } | 252 | } | ||
249 | //this view is no longer _just_ switched from "NoViewMode" | 253 | //this view is no longer _just_ switched from "NoViewMode" | ||
250 | d->justSwitchedFromNoViewMode = false; | 254 | d->justSwitchedFromNoViewMode = false; | ||
251 | //replace old query schema with new one | 255 | //replace old query schema with new one | ||
252 | temp->setQuery(d->parsedQuery); //this will also delete temp->query() | 256 | temp->setQuery(d->parsedQuery); //this will also delete temp->query() | ||
253 | d->parsedQuery = 0; | 257 | d->parsedQuery = 0; | ||
258 | if (!compareSql(d->origStatement.toString(), d->editor->text())) { | ||||
254 | temp->setQueryChangedInView(true); | 259 | temp->setQueryChangedInView(true); | ||
255 | } | 260 | } | ||
256 | } | 261 | } | ||
262 | } | ||||
257 | d->origStatement = KDbEscapedString(d->editor->text()); | 263 | d->origStatement = KDbEscapedString(d->editor->text()); | ||
258 | } | 264 | } | ||
259 | 265 | | |||
260 | d->editor->setFocus(); | 266 | d->editor->setFocus(); | ||
261 | return true; | 267 | return true; | ||
262 | } | 268 | } | ||
263 | 269 | | |||
264 | tristate | 270 | tristate | ||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |