Commit 3c76ec10 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

use dtkCoreParameters alias + update test (wip)

parent 233086de
......@@ -38,7 +38,7 @@ public:
QJsonArray menu;
public:
QHash<QString, dtkCoreParameter *> parameters;
dtkCoreParameters parameters;
};
// ///////////////////////////////////////////////////////////////////
......@@ -146,7 +146,7 @@ void dtkWidgetsParameterMenuBarGenerator::populate(dtkWidgetsMenuBar *menubar)
}
}
QHash<QString, dtkCoreParameter *> dtkWidgetsParameterMenuBarGenerator::parameters(void) const
dtkCoreParameters dtkWidgetsParameterMenuBarGenerator::parameters(void) const
{
return d->parameters;
}
......
......@@ -16,11 +16,12 @@
#include <dtkWidgetsExport>
#include <dtkCore/dtkCoreParameters>
#include <QtCore>
class dtkWidgetsMenuBar;
class dtkCoreParameter;
class dtkWidgetsParameter;
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterMenuBarGenerator declaration
......@@ -36,7 +37,7 @@ public:
void populate(dtkWidgetsMenuBar *menubar);
public:
QHash<QString, dtkCoreParameter *> parameters(void) const;
dtkCoreParameters parameters(void) const;
protected:
class dtkWidgetsParameterMenuBarGeneratorPrivate *d;
......
......@@ -69,11 +69,14 @@ void dtkWidgetsParameterMenuBarGeneratorTestCase::init(void)
void dtkWidgetsParameterMenuBarGeneratorTestCase::testBasic(void)
{
QString nature_file_path = QFINDTESTDATA("../resources/parameters_nature.json");
QString definition_file_path = QFINDTESTDATA("../resources/parameters_definition.json");
QString nature_file_path = QFINDTESTDATA("../resources/new_menu.json");
QString definition_file_path = QFINDTESTDATA("../resources/new_definition.json");
dtkWidgetsParameterMenuBarGenerator menu_bar_generator(nature_file_path, definition_file_path);
dtkCoreParameters params = menu_bar_generator.parameters();
QCOMPARE(params.count() , 79);
}
void dtkWidgetsParameterMenuBarGeneratorTestCase::cleanup(void)
......
This diff is collapsed.
This diff is collapsed.
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