mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-04-04 22:39:10 +00:00
Fix MSVC warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user