summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 13:19:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 18:44:00 +0200
commit40dde4385cd913ac08292ad3be28bf17de9d296c (patch)
tree9d7cb5602808e1ff5831fabfa8d3405d416a682b /vcl/qt5
parentca5c9591ba38ad83415a2d4ced98bfc74d30b032 (diff)
loplugin:ostr in vcl
Change-Id: I5b6ee5bda0c5ff69d297f7f8e87d4c3f3d21791c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167470 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtClipboard.cxx7
-rw-r--r--vcl/qt5/QtDragAndDrop.cxx20
-rw-r--r--vcl/qt5/QtFilePicker.cxx14
-rw-r--r--vcl/qt5/QtFrame.cxx8
-rw-r--r--vcl/qt5/QtInstance.cxx2
5 files changed, 28 insertions, 23 deletions
diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx
index ea05784bbfb2..f49a51710fc5 100644
--- a/vcl/qt5/QtClipboard.cxx
+++ b/vcl/qt5/QtClipboard.cxx
@@ -189,11 +189,14 @@ void QtClipboard::handleChanged(QClipboard::Mode aMode)
listener->changedContents(aEv);
}
-OUString QtClipboard::getImplementationName() { return "com.sun.star.datatransfer.QtClipboard"; }
+OUString QtClipboard::getImplementationName()
+{
+ return u"com.sun.star.datatransfer.QtClipboard"_ustr;
+}
css::uno::Sequence<OUString> QtClipboard::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+ return { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr };
}
sal_Bool QtClipboard::supportsService(const OUString& ServiceName)
diff --git a/vcl/qt5/QtDragAndDrop.cxx b/vcl/qt5/QtDragAndDrop.cxx
index ffabc1bbbaaa..2e4550983488 100644
--- a/vcl/qt5/QtDragAndDrop.cxx
+++ b/vcl/qt5/QtDragAndDrop.cxx
@@ -35,8 +35,8 @@ void QtDragSource::initialize(const css::uno::Sequence<css::uno::Any>& rArgument
{
if (rArguments.getLength() < 2)
{
- throw uno::RuntimeException("DragSource::initialize: Cannot install window event handler",
- getXWeak());
+ throw uno::RuntimeException(
+ u"DragSource::initialize: Cannot install window event handler"_ustr, getXWeak());
}
sal_IntPtr nFrame = 0;
@@ -44,7 +44,7 @@ void QtDragSource::initialize(const css::uno::Sequence<css::uno::Any>& rArgument
if (!nFrame)
{
- throw uno::RuntimeException("DragSource::initialize: missing SalFrame", getXWeak());
+ throw uno::RuntimeException(u"DragSource::initialize: missing SalFrame"_ustr, getXWeak());
}
m_pFrame = reinterpret_cast<QtFrame*>(nFrame);
@@ -91,7 +91,7 @@ void QtDragSource::fire_dragEnd(sal_Int8 nAction, bool bDropSuccessful)
OUString SAL_CALL QtDragSource::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclQtDragSource";
+ return u"com.sun.star.datatransfer.dnd.VclQtDragSource"_ustr;
}
sal_Bool SAL_CALL QtDragSource::supportsService(OUString const& ServiceName)
@@ -101,7 +101,7 @@ sal_Bool SAL_CALL QtDragSource::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> SAL_CALL QtDragSource::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.QtDragSource" };
+ return { u"com.sun.star.datatransfer.dnd.QtDragSource"_ustr };
}
QtDropTarget::QtDropTarget()
@@ -114,7 +114,7 @@ QtDropTarget::QtDropTarget()
OUString SAL_CALL QtDropTarget::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclQtDropTarget";
+ return u"com.sun.star.datatransfer.dnd.VclQtDropTarget"_ustr;
}
sal_Bool SAL_CALL QtDropTarget::supportsService(OUString const& ServiceName)
@@ -124,7 +124,7 @@ sal_Bool SAL_CALL QtDropTarget::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> SAL_CALL QtDropTarget::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.QtDropTarget" };
+ return { u"com.sun.star.datatransfer.dnd.QtDropTarget"_ustr };
}
QtDropTarget::~QtDropTarget() {}
@@ -139,8 +139,8 @@ void QtDropTarget::initialize(const uno::Sequence<uno::Any>& rArguments)
{
if (rArguments.getLength() < 2)
{
- throw uno::RuntimeException("DropTarget::initialize: Cannot install window event handler",
- getXWeak());
+ throw uno::RuntimeException(
+ u"DropTarget::initialize: Cannot install window event handler"_ustr, getXWeak());
}
sal_IntPtr nFrame = 0;
@@ -148,7 +148,7 @@ void QtDropTarget::initialize(const uno::Sequence<uno::Any>& rArguments)
if (!nFrame)
{
- throw uno::RuntimeException("DropTarget::initialize: missing SalFrame", getXWeak());
+ throw uno::RuntimeException(u"DropTarget::initialize: missing SalFrame"_ustr, getXWeak());
}
m_nDropAction = datatransfer::dnd::DNDConstants::ACTION_NONE;
diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index 2af28b29a36d..3193f9901db5 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -80,8 +80,9 @@ namespace
{
uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
{
- return { "com.sun.star.ui.dialogs.FilePicker", "com.sun.star.ui.dialogs.SystemFilePicker",
- "com.sun.star.ui.dialogs.QtFilePicker" };
+ return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.QtFilePicker"_ustr };
}
}
@@ -733,14 +734,15 @@ void SAL_CALL QtFilePicker::initialize(const uno::Sequence<uno::Any>& args)
// parameter checking
uno::Any arg;
if (args.getLength() == 0)
- throw lang::IllegalArgumentException("no arguments", static_cast<XFilePicker2*>(this), 1);
+ throw lang::IllegalArgumentException(u"no arguments"_ustr, static_cast<XFilePicker2*>(this),
+ 1);
arg = args[0];
if ((arg.getValueType() != cppu::UnoType<sal_Int16>::get())
&& (arg.getValueType() != cppu::UnoType<sal_Int8>::get()))
{
- throw lang::IllegalArgumentException("invalid argument type",
+ throw lang::IllegalArgumentException(u"invalid argument type"_ustr,
static_cast<XFilePicker2*>(this), 1);
}
@@ -839,7 +841,7 @@ void SAL_CALL QtFilePicker::initialize(const uno::Sequence<uno::Any>& args)
break;
default:
- throw lang::IllegalArgumentException("Unknown template",
+ throw lang::IllegalArgumentException(u"Unknown template"_ustr,
static_cast<XFilePicker2*>(this), 1);
}
@@ -913,7 +915,7 @@ void SAL_CALL QtFilePicker::notifyTermination(const css::lang::EventObject&)
OUString SAL_CALL QtFilePicker::getImplementationName()
{
- return "com.sun.star.ui.dialogs.QtFilePicker";
+ return u"com.sun.star.ui.dialogs.QtFilePicker"_ustr;
}
sal_Bool SAL_CALL QtFilePicker::supportsService(const OUString& ServiceName)
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 6aff814aacd2..d4a43fc7a544 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -1036,10 +1036,10 @@ static bool toVclFont(const QFont& rQFont, const css::lang::Locale& rLocale, vcl
QtFontFace::fillAttributesFromQFont(rQFont, aFA);
bool bFound = psp::PrintFontManager::get().matchFont(aFA, rLocale);
- SAL_INFO("vcl.qt", "font match result for '"
- << rQFont.family() << "': "
- << (bFound ? OUString::Concat("'") + aFA.GetFamilyName() + "'"
- : OUString("failed")));
+ SAL_INFO("vcl.qt",
+ "font match result for '"
+ << rQFont.family() << "': "
+ << (bFound ? OUString::Concat("'") + aFA.GetFamilyName() + "'" : u"failed"_ustr));
if (!bFound)
return false;
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 2801601115ec..6872fb0fe1a3 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -556,7 +556,7 @@ QtInstance::CreateClipboard(const css::uno::Sequence<css::uno::Any>& arguments)
}
else if (arguments.getLength() != 1 || !(arguments[0] >>= sel))
{
- throw css::lang::IllegalArgumentException("bad QtInstance::CreateClipboard arguments",
+ throw css::lang::IllegalArgumentException(u"bad QtInstance::CreateClipboard arguments"_ustr,
css::uno::Reference<css::uno::XInterface>(), -1);
}