Commit 9bc0f64a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QVector

parent c0bd8890
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <QComboBox> #include <QComboBox>
#include <QImageWriter> #include <QImageWriter>
#include <QWhatsThis> #include <QWhatsThis>
#include <QVector>
using namespace MessageComposer; using namespace MessageComposer;
class MessageComposer::ImageScalingWidgetPrivate class MessageComposer::ImageScalingWidgetPrivate
...@@ -168,7 +169,7 @@ void ImageScalingWidget::slotComboboxChanged(int index) ...@@ -168,7 +169,7 @@ void ImageScalingWidget::slotComboboxChanged(int index)
void ImageScalingWidget::initComboBox(QComboBox *combo) void ImageScalingWidget::initComboBox(QComboBox *combo)
{ {
const QList<int> size = { 240, 320, 512, 640, 800, 1024, 1600, 2048 }; const QVector<int> size = { 240, 320, 512, 640, 800, 1024, 1600, 2048 };
for (int val : size) { for (int val : size) {
combo->addItem(QString::number(val), val); combo->addItem(QString::number(val), val);
} }
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <QLineEdit> #include <QLineEdit>
#include <QMenu> #include <QMenu>
#include <QPainter> #include <QPainter>
#include <QVector>
#include <KLocalizedString> #include <KLocalizedString>
#include "messagelist_debug.h" #include "messagelist_debug.h"
...@@ -368,7 +369,7 @@ void View::applyThemeColumns() ...@@ -368,7 +369,7 @@ void View::applyThemeColumns()
// all saved then the total hint is equal to the total saved width. // all saved then the total hint is equal to the total saved width.
int totalVisibleWidthHint = 0; int totalVisibleWidthHint = 0;
QList< int > lColumnSizeHints; QVector< int > lColumnSizeHints;
for (const auto col : qAsConst(columns)) { for (const auto col : qAsConst(columns)) {
if (col->currentlyVisible() || (idx == 0)) { if (col->currentlyVisible() || (idx == 0)) {
//qCDebug(MESSAGELIST_LOG) << "Column " << idx << " will be visible"; //qCDebug(MESSAGELIST_LOG) << "Column " << idx << " will be visible";
...@@ -393,7 +394,7 @@ void View::applyThemeColumns() ...@@ -393,7 +394,7 @@ void View::applyThemeColumns()
// Now compute somewhat "proportional" widths. // Now compute somewhat "proportional" widths.
idx = 0; idx = 0;
QList< double > lColumnWidths; QVector< double > lColumnWidths;
lColumnWidths.reserve(columns.count()); lColumnWidths.reserve(columns.count());
int totalVisibleWidth = 0; int totalVisibleWidth = 0;
for (const auto col : qAsConst(columns)) { for (const auto col : qAsConst(columns)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment