Changeset View
Changeset View
Standalone View
Standalone View
src/views/KDbTableViewColumn.cpp
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 149 | if (d->captionAliasOrName.isEmpty()) | |||
---|---|---|---|---|---|
150 | d->captionAliasOrName = d->columnInfo->field()->name(); | 150 | d->captionAliasOrName = d->columnInfo->field()->name(); | ||
151 | //! @todo compute other auto-name? | 151 | //! @todo compute other auto-name? | ||
152 | } | 152 | } | ||
153 | //setup column's readonly flag: true, if | 153 | //setup column's readonly flag: true, if | ||
154 | // - it's not from parent table's field, or | 154 | // - it's not from parent table's field, or | ||
155 | // - if the query itself is coming from read-only connection, or | 155 | // - if the query itself is coming from read-only connection, or | ||
156 | // - if the query itself is stored (i.e. has connection) and lookup column is defined | 156 | // - if the query itself is stored (i.e. has connection) and lookup column is defined | ||
157 | const bool columnFromMasterTable = query.masterTable() == d->columnInfo->field()->table(); | 157 | const bool columnFromMasterTable = query.masterTable() == d->columnInfo->field()->table(); | ||
158 | d->readOnly = !columnFromMasterTable | 158 | d->readOnly = !columnFromMasterTable; | ||
159 | || (query.connection() && query.connection()->options()->isReadOnly()); | | |||
160 | //! @todo remove this when queries become editable ^^^^^^^^^^^^^^ | 159 | //! @todo remove this when queries become editable ^^^^^^^^^^^^^^ | ||
161 | // kdbDebug() << "KDbTableViewColumn: query.masterTable()==" | 160 | // kdbDebug() << "KDbTableViewColumn: query.masterTable()==" | ||
162 | // << (query.masterTable() ? query.masterTable()->name() : "notable") << ", columnInfo->field->table()==" | 161 | // << (query.masterTable() ? query.masterTable()->name() : "notable") << ", columnInfo->field->table()==" | ||
163 | // << (columnInfo->field->table() ? columnInfo->field->table()->name() : "notable"); | 162 | // << (columnInfo->field->table() ? columnInfo->field->table()->name() : "notable"); | ||
164 | } | 163 | } | ||
165 | 164 | | |||
166 | KDbTableViewColumn::KDbTableViewColumn(bool) | 165 | KDbTableViewColumn::KDbTableViewColumn(bool) | ||
167 | : d(new Private) | 166 | : d(new Private) | ||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |