diff --git a/obs/qt-ptr-variant.hpp b/obs/qt-ptr-variant.hpp index 287caff2e..962af5e03 100644 --- a/obs/qt-ptr-variant.hpp +++ b/obs/qt-ptr-variant.hpp @@ -26,7 +26,7 @@ struct PtrVariantDummy { Q_DECLARE_METATYPE(PtrVariantDummy*); -template static inline T VariantPtr(QVariant &v) +template static inline T VariantPtr(QVariant v) { return (T)v.value(); } diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index f36ed344a..3ba3e0244 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -88,7 +88,7 @@ void OBSBasic::RemoveSceneItem(obs_sceneitem_t item) obs_scene_t scene = obs_sceneitem_getscene(item); if (GetCurrentScene() == scene) { - for (unsigned int i = 0; i < ui->sources->count(); i++) { + for (int i = 0; i < ui->sources->count(); i++) { QListWidgetItem *listItem = ui->sources->item(i); QVariant userData = listItem->data(Qt::UserRole); diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 0bc8e429c..8200c1ffa 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -24,9 +24,7 @@ class QListWidgetItem; -namespace Ui { - class OBSBasic; -}; +#include "ui_OBSBasic.h" class OBSBasic : public QMainWindow { Q_OBJECT diff --git a/obs/window-namedialog.cpp b/obs/window-namedialog.cpp index bf29cbf30..ae1134e78 100644 --- a/obs/window-namedialog.cpp +++ b/obs/window-namedialog.cpp @@ -36,7 +36,7 @@ bool NameDialog::AskForName(QWidget *parent, const QString &title, bool accepted = (dialog.exec() == DialogCode::Accepted); if (accepted) - str = dialog.ui->userText->text().toUtf8(); + str = dialog.ui->userText->text().toStdString(); return accepted; } diff --git a/obs/window-namedialog.hpp b/obs/window-namedialog.hpp index 04dfd8478..054e4da45 100644 --- a/obs/window-namedialog.hpp +++ b/obs/window-namedialog.hpp @@ -21,9 +21,7 @@ #include #include -namespace Ui { - class NameDialog; -}; +#include "ui_NameDialog.h" class NameDialog : public QDialog { Q_OBJECT