summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 16:06:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 12:18:15 +0200
commit5afdcad4c0e7850b18996c549892b9360cd8973f (patch)
tree53bd3997d044fdf869ae4643855eef722682983e /vcl/qt5
parent39d364958447cd33a6e30dc9d2904ad94fd40aba (diff)
Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: I2a24a123a64b762fd0741c45eaca3ad4bdd5580d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5FilePicker.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx
index 18e24580107e..9a174a08c0c6 100644
--- a/vcl/qt5/Qt5FilePicker.cxx
+++ b/vcl/qt5/Qt5FilePicker.cxx
@@ -576,11 +576,11 @@ OUString SAL_CALL Qt5FilePicker::getLabel(sal_Int16 controlId)
return toOUString(label);
}
-QString Qt5FilePicker::getResString(const char* pResId)
+QString Qt5FilePicker::getResString(TranslateId pResId)
{
QString aResString;
- if (pResId == nullptr)
+ if (!pResId)
return aResString;
aResString = toQString(VclResId(pResId));
@@ -592,7 +592,7 @@ void Qt5FilePicker::addCustomControl(sal_Int16 controlId)
{
QWidget* widget = nullptr;
QLabel* label = nullptr;
- const char* resId = nullptr;
+ TranslateId resId;
QCheckBox* pCheckbox = nullptr;
switch (controlId)
@@ -805,7 +805,7 @@ void SAL_CALL Qt5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
static_cast<XFilePicker2*>(this), 1);
}
- const char* resId = nullptr;
+ TranslateId resId;
switch (acceptMode)
{
case QFileDialog::AcceptOpen: