Some warnings fixes

This commit is contained in:
GPayne
2022-02-22 13:50:16 -07:00
parent 976dd89128
commit 49aa1d524f
3 changed files with 9 additions and 9 deletions

View File

@@ -90,14 +90,14 @@ private:
std::function<void(int, int, const QRectF&)> _windowChangeCallback;
std::function<void(unsigned int)> _windowGuiCheckCallback;
QRectF defaultWindowSizes[4] = {
{50.0, 50.0, 1280.0, 720.0},
{900.0, 250.0, 1280.0, 720.0},
{1200.0, 340.0, 1280.0, 720.0},
{50.0, 50.0, 1280.0, 720.0}
{50.f, 50.f, 1280.f, 720.f},
{900.f, 250.f, 1280.f, 720.f},
{1200.f, 340.f, 1280.f, 720.f},
{50.f, 50.f, 1280.f, 720.f}
};
QList<QString> _monitorNames = { "Primary", "Secondary" };
int _lineEditWidthFixed = 50;
float _marginFractionOfWidgetSize = 0.025;
float _marginFractionOfWidgetSize = 0.025f;
unsigned int _nMonitors = 1;
unsigned int _monIndex = 0;
unsigned int _index = 0;

View File

@@ -37,7 +37,7 @@ SgctEdit::SgctEdit(QWidget* parent, std::vector<sgct::config::Window>& windowLis
void SgctEdit::systemMonitorConfiguration(const QList<QScreen*>& screenList) {
size_t nScreensManaged = std::min(screenList.length(), 2);
for (size_t s = 0; s < nScreensManaged; ++s) {
for (unsigned int s = 0; s < static_cast<unsigned int>(nScreensManaged); ++s) {
int actualWidth = std::max(
screenList[s]->size().width(),
screenList[s]->availableGeometry().width()

View File

@@ -64,7 +64,7 @@ WindowControl::WindowControl(unsigned int monitorIndex, unsigned int windowIndex
, _monitorResolutions(monitorDims)
, _colorForWindow(winColor)
{
_nMonitors = _monitorResolutions.size();
_nMonitors = static_cast<unsigned int>(_monitorResolutions.size());
createWidgets(parent);
}
@@ -390,7 +390,7 @@ void WindowControl::onOffsetXChanged(const QString& newText) {
_windowChangeCallback(_monIndex, _index, _windowDims);
}
}
catch (std::exception &e) {
catch (std::exception) {
//The QIntValidator ensures that the range is a +/- integer
//However, it's possible to enter only a - character which
//causes an exception throw, which is ignored here (when user
@@ -407,7 +407,7 @@ void WindowControl::onOffsetYChanged(const QString& newText) {
_windowChangeCallback(_monIndex, _index, _windowDims);
}
}
catch (std::exception &e) {
catch (std::exception) {
//See comment in onOffsetXChanged
}
}