Commit eefadb87 authored by Halla Rempt's avatar Halla Rempt
Browse files

Do not use QDir::separator to build file paths

Since https://doc.qt.io/qt-5/qdir.html#separator says

"You do not need to use this function to build file paths. If you always
use "/", Qt will translate your paths to conform to the underlying
operating system. "

CCBUG:421575
parent fb114d76
......@@ -72,7 +72,7 @@ void KisBContrastBenchmark::benchmarkFilter()
KisFilterConfigurationSP kfc = filter->defaultConfiguration(KisGlobalResourcesInterface::instance());
// Get the predefined configuration from a file
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + filter->id() + ".cfg");
QFile file(QString(FILES_DATA_DIR) + '/' + filter->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
......
......@@ -69,7 +69,7 @@ void KisBlurBenchmark::benchmarkFilter()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
KisFilterConfigurationSP kfc = filter->defaultConfiguration(KisGlobalResourcesInterface::instance());
// Get the predefined configuration from a file
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + filter->id() + ".cfg");
QFile file(QString(FILES_DATA_DIR) + '/' + filter->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
......
......@@ -141,7 +141,7 @@ void KisFilterSelectionsBenchmark::testAll()
initSelection();
const KoColorSpace *cs = KoColorSpaceRegistry::instance()->rgb8();
QImage image(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage image(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
m_device = new KisPaintDevice(cs);
m_device->convertFromQImage(image, 0, 0, 0);
......
......@@ -78,7 +78,7 @@ void KisLevelFilterBenchmark::benchmarkFilter()
kfc->setProperty("outblackvalue", 0);
kfc->setProperty("outwhitevalue", 255);
// Get the predefined configuration from a file
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + filter->id() + ".cfg");
QFile file(QString(FILES_DATA_DIR) + '/' + filter->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
......
......@@ -63,7 +63,7 @@ void KisLowMemoryBenchmark::benchmarkWideArea(const QString presetFileName,
int poolLimitMiB,
int index)
{
KisPaintOpPresetSP preset(new KisPaintOpPreset(QString(FILES_DATA_DIR) + QDir::separator() + presetFileName));
KisPaintOpPresetSP preset(new KisPaintOpPreset(QString(FILES_DATA_DIR) + '/' + presetFileName));
LOAD_PRESET_OR_RETURN(preset, presetFileName);
......
......@@ -42,9 +42,9 @@ void KisProjectionBenchmark::benchmarkProjection()
{
QBENCHMARK{
KisDocument *doc = KisPart::instance()->createDocument();
doc->loadNativeFormat(QString(FILES_DATA_DIR) + QDir::separator() + "load_test.kra");
doc->loadNativeFormat(QString(FILES_DATA_DIR) + '/' + "load_test.kra");
doc->image()->refreshGraph();
doc->exportDocumentSync(QUrl::fromLocalFile(QString(FILES_OUTPUT_DIR) + QDir::separator() + "save_test.kra"), doc->mimeType());
doc->exportDocumentSync(QUrl::fromLocalFile(QString(FILES_OUTPUT_DIR) + '/' + "save_test.kra"), doc->mimeType());
delete doc;
}
}
......@@ -53,7 +53,7 @@ void KisProjectionBenchmark::benchmarkLoading()
{
QBENCHMARK{
KisDocument *doc2 = KisPart::instance()->createDocument();
doc2->loadNativeFormat(QString(FILES_DATA_DIR) + QDir::separator() + "load_test.kra");
doc2->loadNativeFormat(QString(FILES_DATA_DIR) + '/' + "load_test.kra");
delete doc2;
}
}
......
......@@ -60,8 +60,8 @@ const QString OUTPUT_FORMAT = ".png";
void KisStrokeBenchmark::initTestCase()
{
m_dataPath = QString(FILES_DATA_DIR) + QDir::separator();
m_outputPath = QString(FILES_OUTPUT_DIR) + QDir::separator();
m_dataPath = QString(FILES_DATA_DIR) + '/';
m_outputPath = QString(FILES_OUTPUT_DIR) + '/';
m_colorSpace = KoColorSpaceRegistry::instance()->rgb8();
m_color = KoColor(m_colorSpace);
......
......@@ -42,7 +42,7 @@ void TestAbrStorage::initTestCase()
void TestAbrStorage::testResourceIterator()
{
QString filename = "brushes_by_mar_ka_d338ela.abr";
KisAbrStorage storage(FILES_DATA_DIR + QDir::separator() + filename);
KisAbrStorage storage(FILES_DATA_DIR + '/' + filename);
QSharedPointer<KisResourceStorage::ResourceIterator> iter(storage.resources(ResourceType::Brushes));
QVERIFY(iter->hasNext());
......@@ -59,7 +59,7 @@ void TestAbrStorage::testResourceIterator()
void TestAbrStorage::testTagIterator()
{
QString filename = "brushes_by_mar_ka_d338ela.abr";
KisAbrStorage storage(FILES_DATA_DIR + QDir::separator() + filename);
KisAbrStorage storage(FILES_DATA_DIR + '/' + filename);
QSharedPointer<KisResourceStorage::TagIterator> iter = storage.tags(ResourceType::Brushes);
int count = 0;
......@@ -75,7 +75,7 @@ void TestAbrStorage::testResourceItem()
QString name = "brushes_by_mar_ka_d338ela";
QString filename = name + ".abr";
QString resourceName = name + "_2"; // "1" seem to be invalid or something; it isn't not loaded in any case.
KisAbrStorage storage(FILES_DATA_DIR + QDir::separator() + filename);
KisAbrStorage storage(FILES_DATA_DIR + '/' + filename);
KisResourceStorage::ResourceItem item = storage.resourceItem(resourceName);
QVERIFY(!item.url.isEmpty());
......@@ -86,7 +86,7 @@ void TestAbrStorage::testResource()
QString name = "brushes_by_mar_ka_d338ela";
QString filename = name + ".abr";
QString resourceName = name + "_2"; // "1" seem to be invalid or something; it isn't not loaded in any case.
KisAbrStorage storage(FILES_DATA_DIR + QDir::separator() + filename);
KisAbrStorage storage(FILES_DATA_DIR + '/' + filename);
KoResourceSP res = storage.resource(resourceName);
QVERIFY(res);
QVERIFY(res->filename() == resourceName);
......
......@@ -54,7 +54,7 @@ void KisAutoBrushTest::testMaskGeneration()
cs->setOpacity(fdev->data(), OPACITY_OPAQUE_U8, 100 * 100);
QPoint errpoint;
QImage result(QString(FILES_DATA_DIR) + QDir::separator() + "result_autobrush_1.png");
QImage result(QString(FILES_DATA_DIR) + '/' + "result_autobrush_1.png");
QImage image = fdev->convertToQImage(0);
if (!TestUtil::compareQImages(errpoint, image, result)) {
......@@ -66,7 +66,7 @@ void KisAutoBrushTest::testMaskGeneration()
fdev = new KisFixedPaintDevice(cs);
a->mask(fdev, KoColor(Qt::black, cs), KisDabShape(), info);
result = QImage(QString(FILES_DATA_DIR) + QDir::separator() + "result_autobrush_3.png");
result = QImage(QString(FILES_DATA_DIR) + '/' + "result_autobrush_3.png");
image = fdev->convertToQImage(0);
if (!TestUtil::compareQImages(errpoint, image, result)) {
image.save("kis_autobrush_test_3.png");
......@@ -82,7 +82,7 @@ void KisAutoBrushTest::testMaskGeneration()
fdev = new KisFixedPaintDevice(cs);
a->mask(fdev, dev, KisDabShape(), info);
result = QImage(QString(FILES_DATA_DIR) + QDir::separator() + "result_autobrush_4.png");
result = QImage(QString(FILES_DATA_DIR) + '/' + "result_autobrush_4.png");
image = fdev->convertToQImage(0);
if (!TestUtil::compareQImages(errpoint, image, result)) {
image.save("kis_autobrush_test_4.png");
......
......@@ -35,7 +35,7 @@
void KisGbrBrushTest::testMaskGenerationSingleColor()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "brush.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "brush.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
Q_ASSERT(brush->valid());
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->rgb8();
......@@ -53,7 +53,7 @@ void KisGbrBrushTest::testMaskGenerationSingleColor()
brush->mask(fdev, KoColor(Qt::black, cs), KisDabShape(), info);
QPoint errpoint;
QImage result = QImage(QString(FILES_DATA_DIR) + QDir::separator() + "result_brush_3.png");
QImage result = QImage(QString(FILES_DATA_DIR) + '/' + "result_brush_3.png");
QImage image = fdev->convertToQImage(0);
if (!TestUtil::compareQImages(errpoint, image, result)) {
image.save("kis_gbr_brush_test_3.png");
......@@ -63,7 +63,7 @@ void KisGbrBrushTest::testMaskGenerationSingleColor()
void KisGbrBrushTest::testMaskGenerationDevColor()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "brush.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "brush.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
Q_ASSERT(brush->valid());
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->rgb8();
......@@ -86,7 +86,7 @@ void KisGbrBrushTest::testMaskGenerationDevColor()
brush->mask(fdev, dev, KisDabShape(), info);
QPoint errpoint;
QImage result = QImage(QString(FILES_DATA_DIR) + QDir::separator() + "result_brush_4.png");
QImage result = QImage(QString(FILES_DATA_DIR) + '/' + "result_brush_4.png");
QImage image = fdev->convertToQImage(0);
if (!TestUtil::compareQImages(errpoint, image, result)) {
image.save("kis_gbr_brush_test_4.png");
......@@ -96,7 +96,7 @@ void KisGbrBrushTest::testMaskGenerationDevColor()
void KisGbrBrushTest::testImageGeneration()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "testing_brush_512_bars.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "testing_brush_512_bars.gbr"));
bool res = brush->load(KisGlobalResourcesInterface::instance());
Q_UNUSED(res);
Q_ASSERT(res);
......@@ -131,7 +131,7 @@ void KisGbrBrushTest::testImageGeneration()
void KisGbrBrushTest::benchmarkPyramidCreation()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "testing_brush_512_bars.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "testing_brush_512_bars.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(!brush->brushTipImage().isNull());
......@@ -143,7 +143,7 @@ void KisGbrBrushTest::benchmarkPyramidCreation()
void KisGbrBrushTest::benchmarkScaling()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "testing_brush_512_bars.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "testing_brush_512_bars.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(!brush->brushTipImage().isNull());
qsrand(1);
......@@ -167,7 +167,7 @@ void KisGbrBrushTest::benchmarkScaling()
void KisGbrBrushTest::benchmarkRotation()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "testing_brush_512_bars.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "testing_brush_512_bars.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(!brush->brushTipImage().isNull());
qsrand(1);
......@@ -183,7 +183,7 @@ void KisGbrBrushTest::benchmarkRotation()
void KisGbrBrushTest::benchmarkMaskScaling()
{
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + QDir::separator() + "testing_brush_512_bars.gbr"));
QScopedPointer<KisGbrBrush> brush(new KisGbrBrush(QString(FILES_DATA_DIR) + '/' + "testing_brush_512_bars.gbr"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(!brush->brushTipImage().isNull());
qsrand(1);
......
......@@ -97,7 +97,7 @@ inline void KisImagePipeBrushTest::checkConsistency(KisImagePipeBrushSP brush)
void KisImagePipeBrushTest::testLoading()
{
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + QDir::separator() + "C_Dirty_Spot.gih"));
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + '/' + "C_Dirty_Spot.gih"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(brush->valid());
......@@ -106,7 +106,7 @@ void KisImagePipeBrushTest::testLoading()
void KisImagePipeBrushTest::testChangingBrushes()
{
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + QDir::separator() + "C_Dirty_Spot.gih"));
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + '/' + "C_Dirty_Spot.gih"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(brush->valid());
......@@ -152,7 +152,7 @@ void checkIncrementalPainting(KisBrushSP brush, const QString &prefix)
void KisImagePipeBrushTest::testSimpleDabApplication()
{
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + QDir::separator() + "C_Dirty_Spot.gih"));
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + '/' + "C_Dirty_Spot.gih"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(brush->valid());
......@@ -162,7 +162,7 @@ void KisImagePipeBrushTest::testSimpleDabApplication()
void KisImagePipeBrushTest::testColoredDab()
{
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + QDir::separator() + "G_Sparks.gih"));
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + '/' + "G_Sparks.gih"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(brush->valid());
......@@ -198,7 +198,7 @@ void KisImagePipeBrushTest::testColoredDab()
void KisImagePipeBrushTest::testColoredDabWash()
{
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + QDir::separator() + "G_Sparks.gih"));
QSharedPointer<KisImagePipeBrush> brush(new KisImagePipeBrush(QString(FILES_DATA_DIR) + '/' + "G_Sparks.gih"));
brush->load(KisGlobalResourcesInterface::instance());
QVERIFY(brush->valid());
......
......@@ -178,9 +178,9 @@ QString SvgLoadingContext::relativeFilePath(const QString &href)
QString result = href;
if (!gc->xmlBaseDir.isEmpty()) {
result = gc->xmlBaseDir + QDir::separator() + href;
result = gc->xmlBaseDir + '/' + href;
} else if (!d->initialXmlBaseDir.isEmpty()) {
result = d->initialXmlBaseDir + QDir::separator() + href;
result = d->initialXmlBaseDir + '/' + href;
}
return QDir::cleanPath(result);
......
......@@ -189,7 +189,7 @@ void SvgParser::setXmlBaseDir(const QString &baseDir)
setFileFetcher(
[this](const QString &name) {
const QString fileName = m_context.xmlBaseDir() + QDir::separator() + name;
const QString fileName = m_context.xmlBaseDir() + '/' + name;
QFile file(fileName);
if (!file.exists()) {
return QByteArray();
......
......@@ -247,7 +247,7 @@ QString KisImageConfig::safelyGetWritableTempLocation(const QString &suffix, con
// furthermore, this is just a default and swapDir can always be configured
// to another location.
QString swap = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QDir::separator() + suffix;
QString swap = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + '/' + suffix;
#else
Q_UNUSED(suffix);
QString swap = QDir::tempPath();
......@@ -275,7 +275,7 @@ QString KisImageConfig::safelyGetWritableTempLocation(const QString &suffix, con
* (yes, there is a hacky-global-variable workaround, but let's be safe)
*/
QTemporaryFile tempFile;
tempFile.setFileTemplate(location + QDir::separator() + "krita_test_swap_location");
tempFile.setFileTemplate(location + '/' + "krita_test_swap_location");
if (tempFile.open() && !tempFile.fileName().isEmpty()) {
chosenLocation = location;
break;
......
......@@ -287,7 +287,7 @@ void KisAslParserTest::testASLWriter()
void KisAslParserTest::testParserWithPatterns()
{
QDir dir(QString(FILES_DATA_DIR) + QDir::separator() + "testset");
QDir dir(QString(FILES_DATA_DIR) + '/' + "testset");
QFileInfoList files = dir.entryInfoList(QStringList() << "*.asl", QDir::Files);
......
......@@ -65,9 +65,9 @@ void KisAsyncMergerTest::testMerger()
const KoColorSpace * colorSpace = KoColorSpaceRegistry::instance()->rgb8();
KisImageSP image = new KisImage(0, 640, 441, colorSpace, "merger test");
QImage sourceImage1(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage sourceImage2(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage referenceProjection(QString(FILES_DATA_DIR) + QDir::separator() + "merged_hakonepa.png");
QImage sourceImage1(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage sourceImage2(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
QImage referenceProjection(QString(FILES_DATA_DIR) + '/' + "merged_hakonepa.png");
KisPaintDeviceSP device1 = new KisPaintDevice(colorSpace);
KisPaintDeviceSP device2 = new KisPaintDevice(colorSpace);
......@@ -128,7 +128,7 @@ void KisAsyncMergerTest::testMerger()
QVERIFY(rootLayer->exactBounds() == image->bounds());
QImage resultProjection = rootLayer->projection()->convertToQImage(0);
resultProjection.save(QString(FILES_OUTPUT_DIR) + QDir::separator() + "actual_merge_result.png");
resultProjection.save(QString(FILES_OUTPUT_DIR) + '/' + "actual_merge_result.png");
QPoint pt;
QVERIFY(TestUtil::compareQImages(pt, resultProjection, referenceProjection, 5, 0, 0));
}
......@@ -154,7 +154,7 @@ void KisAsyncMergerTest::debugObligeChild()
const KoColorSpace * colorSpace = KoColorSpaceRegistry::instance()->rgb8();
KisImageSP image = new KisImage(0, 640, 441, colorSpace, "merger test");
QImage sourceImage1(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage sourceImage1(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
KisPaintDeviceSP device1 = new KisPaintDevice(colorSpace);
device1->convertFromQImage(sourceImage1, 0, 0, 0);
......@@ -277,7 +277,7 @@ void KisAsyncMergerTest::testSubgraphingWithoutUpdatingParent()
image->initialRefreshGraph();
QImage refImage(QString(FILES_DATA_DIR) + QDir::separator() + "subgraphing_without_updating.png");
QImage refImage(QString(FILES_DATA_DIR) + '/' + "subgraphing_without_updating.png");
{
QImage resultImage = image->projection()->convertToQImage(0);
......
......@@ -112,7 +112,7 @@ void printPixel(QString prefix, int pixelSize, quint8 *data) {
void KisConvolutionPainterTest::testIdentityConvolution()
{
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
KisPaintDeviceSP dev = new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8());
dev->convertFromQImage(qimage, 0, 0, 0);
......@@ -273,7 +273,7 @@ void KisConvolutionPainterTest::testAsymmSkipAlpha()
// #include <valgrind/callgrind.h>
void KisConvolutionPainterTest::benchmarkConvolution()
{
QImage referenceImage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage referenceImage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QRect imageRect(QPoint(), referenceImage.size());
KisPaintDeviceSP dev = new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8());
......
......@@ -63,7 +63,7 @@ void KisCsConversionTest::testColorSpaceConversion()
QList<const KoColorSpace*> colorSpaces = KoColorSpaceRegistry::instance()->allColorSpaces(KoColorSpaceRegistry::AllColorSpaces, KoColorSpaceRegistry::OnlyDefaultProfile);
int failedColorSpaces = 0;
QImage image(QString(FILES_DATA_DIR) + QDir::separator() + "tile.png");
QImage image(QString(FILES_DATA_DIR) + '/' + "tile.png");
Q_FOREACH (const KoColorSpace * srcCs, colorSpaces) {
Q_FOREACH (const KoColorSpace * dstCs, colorSpaces) {
......
......@@ -58,8 +58,8 @@ void KisFilterMaskTest::testProjectionNotSelected()
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
......@@ -94,8 +94,8 @@ void KisFilterMaskTest::testProjectionSelected()
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
......
......@@ -64,8 +64,8 @@ void KisFilterTest::testWithProgressUpdater()
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
KisPaintDeviceSP dev = new KisPaintDevice(cs);
dev->convertFromQImage(qimage, 0, 0, 0);
......@@ -90,8 +90,8 @@ void KisFilterTest::testSingleThreaded()
{
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
KisPaintDeviceSP dev = new KisPaintDevice(cs);
dev->convertFromQImage(qimage, 0, 0, 0);
......@@ -114,8 +114,8 @@ void KisFilterTest::testDifferentSrcAndDst()
{
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + QDir::separator() + "inverted_hakonepa.png");
QImage qimage(QString(FILES_DATA_DIR) + '/' + "hakonepa.png");
QImage inverted(QString(FILES_DATA_DIR) + '/' + "inverted_hakonepa.png");
KisPaintDeviceSP src = new KisPaintDevice(cs);
KisPaintDeviceSP dst = new KisPaintDevice(cs);
KisSelectionSP sel = new KisSelection(new KisSelectionDefaultBounds(src));
......
Supports Markdown
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