Skip to content

Commit

Permalink
improved component registration
Browse files Browse the repository at this point in the history
  • Loading branch information
paulondcdev committed Aug 30, 2016
1 parent 1fb5cfa commit 0ee78c5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions source/cpp/nativefiledialogext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,9 @@ NativeFileDialogExt* NativeFileDialogExt::qmlAttachedProperties(QObject * object
return new NativeFileDialogExt();
}

struct NativeFileDialogExtTypeRegisterHelper {

NativeFileDialogExtTypeRegisterHelper() {

// overriding the qml version when this component is avaiable
qmlRegisterType<NativeFileDialogExt>("QuickNative", 0, 1, "NativeFileDialog");
}
};
static void registerNativeFileDialogExt() {
// overriding the qml version when this component is avaiable
qmlRegisterType<NativeFileDialogExt>("QuickNative", 0, 1, "NativeFileDialog");
}

static const NativeFileDialogExtTypeRegisterHelper typeRegisterHelper;
Q_COREAPP_STARTUP_FUNCTION(registerNativeFileDialogExt)

0 comments on commit 0ee78c5

Please sign in to comment.