Fix MSVC warnings

This commit is contained in:
lupoDharkael
2018-01-18 17:26:58 +01:00
parent 05da137670
commit 16a082c713
5 changed files with 6 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ void CaptureButton::initButton() {
setFocusPolicy(Qt::NoFocus);
resize(buttonBaseSize(), buttonBaseSize());
setMask(QRegion(QRect(-1,-1,buttonBaseSize()+2, buttonBaseSize()+2), QRegion::Ellipse));
setMask(QRegion(QRect(-1,-1, buttonBaseSize()+2, buttonBaseSize()+2), QRegion::Ellipse));
setToolTip(m_tool->description());
@@ -165,7 +165,7 @@ void CaptureButton::setColor(const QColor &c) {
}
// getButtonBaseSize returns the base size of the buttons
size_t CaptureButton::buttonBaseSize() {
int CaptureButton::buttonBaseSize() {
return QApplication::fontMetrics().lineSpacing() * 2.2;
}

View File

@@ -55,7 +55,7 @@ public:
CaptureButton() = delete;
explicit CaptureButton(const ButtonType, QWidget *parent = nullptr);
static size_t buttonBaseSize();
static int buttonBaseSize();
static bool iconIsWhiteByColor(const QColor &);
static QString globalStyleSheet();
static QVector<CaptureButton::ButtonType> getIterableButtonTypes();

View File

@@ -102,7 +102,7 @@ void AppLauncherWidget::launch(const QModelIndex &index) {
}
}
QString command = index.data(Qt::UserRole).toString().replace(
QRegExp("(\%.)"), '"' + m_tempFile + '"');
QRegExp("(\\%.)"), '"' + m_tempFile + '"');
bool inTerminal = index.data(Qt::UserRole+1).toBool() ||
m_terminalCheckbox->isChecked();
if (inTerminal) {

View File

@@ -31,7 +31,7 @@ UIcolorEditor::UIcolorEditor(QWidget *parent) : QGroupBox(parent) {
m_hLayout = new QHBoxLayout;
m_vLayout = new QVBoxLayout;
const size_t space = QApplication::fontMetrics().lineSpacing();
const int space = QApplication::fontMetrics().lineSpacing();
m_hLayout->addItem(new QSpacerItem(space, space, QSizePolicy::Expanding));
m_vLayout->setAlignment(Qt::AlignVCenter);

View File

@@ -41,7 +41,7 @@ QString FileNameHandler::parseFilename(const QString &name) {
char data[MAX_CHARACTERS] = {0};
std::strftime(data, sizeof(data),
tempData, std::localtime(&t));
res = QString::fromLocal8Bit(data, strlen(data));
res = QString::fromLocal8Bit(data, (int)strlen(data));
free(tempData);
}
// add the parsed pattern in a correct format for the filesystem