Skip to content

Commit 0364adf

Browse files
committed
Fix opening devtools sample dialogs
1 parent d3e32d7 commit 0364adf

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

src/framework/interactive/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ target_sources(muse_interactive PRIVATE
3030
api/interactiveapi.cpp
3131
api/interactiveapi.h
3232

33+
dev/testdialog.cpp
34+
dev/testdialog.h
35+
dev/testdialog.ui
36+
3337
internal/iinteractiveprovider.h
3438
internal/interactive.cpp
3539
internal/interactive.h

src/framework/ui/dev/testdialog.cpp renamed to src/framework/interactive/dev/testdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "testdialog.h"
2323
#include "ui_testdialog.h"
2424

25-
using namespace muse::ui;
25+
using namespace muse::interactive;
2626

2727
TestDialog::TestDialog(QWidget* parent)
2828
: QDialog(parent),

src/framework/ui/dev/testdialog.h renamed to src/framework/interactive/dev/testdialog.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
* You should have received a copy of the GNU General Public License
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
22-
#ifndef MUSE_UI_TESTDIALOG_H
23-
#define MUSE_UI_TESTDIALOG_H
22+
23+
#pragma once
2424

2525
#include <QDialog>
2626

2727
namespace Ui {
2828
class TestDialog;
2929
}
3030

31-
namespace muse::ui {
31+
namespace muse::interactive {
3232
class TestDialog : public QDialog
3333
{
3434
Q_OBJECT
@@ -52,5 +52,3 @@ public slots:
5252
QString m_title;
5353
};
5454
}
55-
56-
#endif // MUSE_UI_TESTDIALOG_H
File renamed without changes.

src/framework/interactive/interactivemodule.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@
2727

2828
#include "internal/interactive.h"
2929
#include "internal/interactiveuriregister.h"
30+
#include "types/uri.h"
3031

3132
#ifdef Q_OS_WASM
3233
#include "internal/platform/web/webinteractive.h"
3334
#endif
3435

3536
#include "api/interactiveapi.h"
3637

38+
#include "dev/testdialog.h"
39+
3740
using namespace muse::interactive;
3841
using namespace muse::modularity;
3942

@@ -76,5 +79,8 @@ void InteractiveModule::resolveImports()
7679
ir->registerQmlUri(Uri("muse://interactive/progress"), "Muse.Interactive", "ProgressDialog");
7780
ir->registerQmlUri(Uri("muse://interactive/selectfile"), "Muse.Interactive", "FileDialog");
7881
ir->registerQmlUri(Uri("muse://interactive/selectdir"), "Muse.Interactive", "FolderDialog");
82+
83+
ir->registerQmlUri(Uri("muse://devtools/interactive/sample"), "Muse.Interactive", "SampleDialog");
84+
ir->registerWidgetUri<TestDialog>(Uri("muse://devtools/interactive/testdialog"));
7985
}
8086
}

src/framework/ui/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ target_sources(muse_ui PRIVATE
8888
view/widgetstatestore.cpp
8989
view/widgetstatestore.h
9090
view/widgetutils.h
91-
92-
dev/testdialog.cpp
93-
dev/testdialog.h
94-
dev/testdialog.ui
9591
)
9692

9793
if (OS_IS_MAC)

src/framework/ui/uimodule.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
#include "api/navigationapi.h"
5454
#include "api/keyboardapi.h"
5555

56-
#include "dev/testdialog.h"
57-
5856
#include "muse_framework_config.h"
5957

6058
#include "log.h"

0 commit comments

Comments
 (0)