Commit d6b2e289 authored by Pino Toscano's avatar Pino Toscano

view1394: isolate DB loading in own function

This way it will be possible to call it only when needed.
parent edeb8acd
......@@ -272,8 +272,11 @@ void View1394::generateBusReset() {
OuiDb::OuiDb() {
QString filename=QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kcmview1394/oui.db"));
if (filename.isEmpty())
return;
if (!filename.isEmpty())
loadFromCustomOuiDb(filename);
}
void OuiDb::loadFromCustomOuiDb(const QString &filename) {
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
return;
......
......@@ -38,6 +38,7 @@ public:
OuiDb();
QString vendor(octlet_t guid);
private:
void loadFromCustomOuiDb(const QString &filename);
QMap<QString, QString> m_vendorIds;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment