Changeset View
Changeset View
Standalone View
Standalone View
kexi/core/kexiproject.cpp
Show First 20 Lines • Show All 855 Lines • ▼ Show 20 Line(s) | 855 | if (viewMode != Kexi::DataViewMode && data()->userMode()) | |||
---|---|---|---|---|---|
856 | return 0; | 856 | return 0; | ||
857 | 857 | | |||
858 | KexiDB::MessageTitle et(this); | 858 | KexiDB::MessageTitle et(this); | ||
859 | KexiPart::Part *part = findPartFor(item); | 859 | KexiPart::Part *part = findPartFor(item); | ||
860 | if (!part) | 860 | if (!part) | ||
861 | return 0; | 861 | return 0; | ||
862 | KexiWindow *window = part->openInstance(parent, item, viewMode, staticObjectArgs); | 862 | KexiWindow *window = part->openInstance(parent, item, viewMode, staticObjectArgs); | ||
863 | if (!window) { | 863 | if (!window) { | ||
864 | if (part->lastOperationStatus().error()) | 864 | if (part->lastOperationStatus().error()) { | ||
865 | m_sql = part->lastOperationStatus().errorSql; // pass proper SQL error | ||||
865 | setError(i18n("Opening object \"%1\" failed.", item.name()) + "<br>" | 866 | setError(i18n("Opening object \"%1\" failed.", item.name()) + "<br>" | ||
866 | + part->lastOperationStatus().message, | 867 | + part->lastOperationStatus().message, | ||
867 | part->lastOperationStatus().description); | 868 | part->lastOperationStatus().description); | ||
869 | } | ||||
868 | return 0; | 870 | return 0; | ||
869 | } | 871 | } | ||
870 | return window; | 872 | return window; | ||
871 | } | 873 | } | ||
872 | 874 | | |||
873 | KexiWindow* KexiProject::openObject(QWidget* parent, const QString &partClass, | 875 | KexiWindow* KexiProject::openObject(QWidget* parent, const QString &partClass, | ||
874 | const QString& name, Kexi::ViewMode viewMode) | 876 | const QString& name, Kexi::ViewMode viewMode) | ||
875 | { | 877 | { | ||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |