Changeset View
Changeset View
Standalone View
Standalone View
src/formeditor/widgetlibrary.cpp
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 83 | /*! @todo: reenable */ m_advancedProperties.insert("palette"); | |||
---|---|---|---|---|---|
87 | m_advancedProperties.insert("statusTip"); | 87 | m_advancedProperties.insert("statusTip"); | ||
88 | m_advancedProperties.insert("toolTipDuration"); | 88 | m_advancedProperties.insert("toolTipDuration"); | ||
89 | m_advancedProperties.insert("trapEnterKeyEvent"); | 89 | m_advancedProperties.insert("trapEnterKeyEvent"); | ||
90 | m_advancedProperties.insert("windowModality"); | 90 | m_advancedProperties.insert("windowModality"); | ||
91 | m_advancedProperties.insert("autoExclusive"); | 91 | m_advancedProperties.insert("autoExclusive"); | ||
92 | // by providing this in propeditor | 92 | // by providing this in propeditor | ||
93 | m_advancedProperties.insert("minimumSize"); | 93 | m_advancedProperties.insert("minimumSize"); | ||
94 | m_advancedProperties.insert("maximumSize"); | 94 | m_advancedProperties.insert("maximumSize"); | ||
95 | m_advancedProperties.insert("clickMessage"); // for backward compatibility Kexi projects created with Qt < 4.7 | 95 | m_advancedProperties.insert("clickMessage"); // for backward compatibility KEXI projects created with Qt < 4.7 | ||
96 | m_advancedProperties.insert("showClearButton"); // for backward compatibility Kexi projects created with Qt 4 | 96 | m_advancedProperties.insert("showClearButton"); // for backward compatibility KEXI projects created with Qt 4 | ||
97 | #ifndef KEXI_SHOW_UNFINISHED | 97 | #ifndef KEXI_SHOW_UNFINISHED | ||
98 | /*! @todo reenable */ | 98 | /*! @todo reenable */ | ||
99 | m_advancedProperties.insert("accel"); | 99 | m_advancedProperties.insert("accel"); | ||
100 | m_advancedProperties.insert("icon"); | 100 | m_advancedProperties.insert("icon"); | ||
101 | m_advancedProperties.insert("paletteBackgroundPixmap"); | 101 | m_advancedProperties.insert("paletteBackgroundPixmap"); | ||
102 | m_advancedProperties.insert("pixmap"); | 102 | m_advancedProperties.insert("pixmap"); | ||
103 | m_advancedProperties.insert("shortcut"); // renamed from "accel" in Qt 4 | 103 | m_advancedProperties.insert("shortcut"); // renamed from "accel" in Qt 4 | ||
104 | m_advancedProperties.insert("windowIcon"); // renamed from "icon" in Qt 4 | 104 | m_advancedProperties.insert("windowIcon"); // renamed from "icon" in Qt 4 | ||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Line(s) | 232 | //! @todo improve | |||
242 | m_loadFactoriesResult = true; | 242 | m_loadFactoriesResult = true; | ||
243 | return true; | 243 | return true; | ||
244 | } | 244 | } | ||
245 | 245 | | |||
246 | //! Loads of a single factory. @return true on success | 246 | //! Loads of a single factory. @return true on success | ||
247 | WidgetFactory *loadFactory(KexiFormWidgetsPluginMetaData *pluginMetaData) { | 247 | WidgetFactory *loadFactory(KexiFormWidgetsPluginMetaData *pluginMetaData) { | ||
248 | KPluginFactory *factory = qobject_cast<KPluginFactory*>(pluginMetaData->instantiate()); | 248 | KPluginFactory *factory = qobject_cast<KPluginFactory*>(pluginMetaData->instantiate()); | ||
249 | if (!factory) { | 249 | if (!factory) { | ||
250 | q->m_result = KDbResult(ERR_CANNOT_LOAD_OBJECT, | 250 | q->m_result = KDbResult( | ||
251 | xi18nc("@info", "Could not load Kexi Form Widgets plugin file <filename>%1</filename>.", | 251 | ERR_CANNOT_LOAD_OBJECT, | ||
252 | pluginMetaData->fileName())); | 252 | xi18nc("@info", "Could not load Form Widgets plugin file <filename>%1</filename> " | ||
253 | "for <application>%2</application>.", | ||||
254 | pluginMetaData->fileName(), QApplication::applicationDisplayName())); | ||||
253 | q->setErrorMessage(pluginMetaData, q->result().message()); | 255 | q->setErrorMessage(pluginMetaData, q->result().message()); | ||
254 | qWarning() << q->result().message(); | 256 | qWarning() << q->result().message(); | ||
255 | return 0; | 257 | return 0; | ||
256 | } | 258 | } | ||
257 | WidgetFactory *widgetFactory = factory->create<WidgetFactory>(q); | 259 | WidgetFactory *widgetFactory = factory->create<WidgetFactory>(q); | ||
258 | if (!widgetFactory) { | 260 | if (!widgetFactory) { | ||
259 | q->m_result = KDbResult(ERR_CANNOT_LOAD_OBJECT, | 261 | q->m_result = KDbResult( | ||
260 | xi18nc("@info", | 262 | ERR_CANNOT_LOAD_OBJECT, | ||
261 | "Could not open Kexi Form Widgets plugin <filename>%1</filename>.", | 263 | xi18nc("@info", "Could not open Form Widgets plugin <filename>%1</filename> for " | ||
262 | pluginMetaData->fileName())); | 264 | "<application>%2</application>.", | ||
265 | pluginMetaData->fileName(), QApplication::applicationDisplayName())); | ||||
263 | qWarning() << q->m_result.message(); | 266 | qWarning() << q->m_result.message(); | ||
264 | return 0; | 267 | return 0; | ||
265 | } | 268 | } | ||
266 | widgetFactory->setLibrary(q); | 269 | widgetFactory->setLibrary(q); | ||
267 | widgetFactory->setObjectName(pluginMetaData->id()); | 270 | widgetFactory->setObjectName(pluginMetaData->id()); | ||
268 | widgetFactory->setAdvancedPropertiesVisible(showAdvancedProperties); //inherit this flag from the library | 271 | widgetFactory->setAdvancedPropertiesVisible(showAdvancedProperties); //inherit this flag from the library | ||
269 | m_factories.insert(pluginMetaData->id().toLatin1(), widgetFactory); | 272 | m_factories.insert(pluginMetaData->id().toLatin1(), widgetFactory); | ||
270 | return widgetFactory; | 273 | return widgetFactory; | ||
▲ Show 20 Lines • Show All 515 Lines • Show Last 20 Lines |