mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
No need for a new variable
We already have provider in a local variable. The lookup and "model" variable is redundant. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
562f88d2b7
commit
d7762f8fbe
1 changed files with 3 additions and 4 deletions
|
@ -398,13 +398,12 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
|||
if (triggeredBy == INITIAL || (triggeredBy == KNOWNTYPES && value == 0) || triggeredBy == SEPARATOR) {
|
||||
// now try and guess the columns
|
||||
Q_FOREACH (QString columnText, currColumns) {
|
||||
ColumnNameProvider *model = (ColumnNameProvider *)ui->avaliableColumns->model();
|
||||
columnText.replace("\"", "");
|
||||
columnText.replace("number", "#", Qt::CaseInsensitive);
|
||||
int idx = model->mymatch(columnText);
|
||||
int idx = provider->mymatch(columnText);
|
||||
if (idx >= 0) {
|
||||
QString foundHeading = model->data(model->index(idx, 0), Qt::DisplayRole).toString();
|
||||
model->removeRow(idx);
|
||||
QString foundHeading = provider->data(provider->index(idx, 0), Qt::DisplayRole).toString();
|
||||
provider->removeRow(idx);
|
||||
headers.append(foundHeading);
|
||||
matchedSome = true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue