From b51e232350d31b65a8cd055693c7869f0a896193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 7 Apr 2020 02:21:44 +0200 Subject: Added controlled conversions to char* instead of automatic ascii conversions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit ef3976a6cb843f51333ea43172306a9c8f4954ef) --- src/notecontent.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/notecontent.cpp') diff --git a/src/notecontent.cpp b/src/notecontent.cpp index 3574d7c..00b5795 100644 --- a/src/notecontent.cpp +++ b/src/notecontent.cpp @@ -541,7 +541,7 @@ bool TextContent::loadFromFile(bool lazyLoad) if (success) setText(content, lazyLoad); else { - std::cout << "FAILED TO LOAD TextContent: " << fullPath() << std::endl; + std::cout << "FAILED TO LOAD TextContent: " << fullPath().local8Bit() << std::endl; setText("", lazyLoad); if (!TQFile::exists(fullPath())) saveToFile(); // Reserve the fileName so no new note will have the same name! @@ -650,7 +650,7 @@ bool HtmlContent::loadFromFile(bool lazyLoad) if (success) setHtml(content, lazyLoad); else { - std::cout << "FAILED TO LOAD HtmlContent: " << fullPath() << std::endl; + std::cout << "FAILED TO LOAD HtmlContent: " << fullPath().local8Bit() << std::endl; setHtml("", lazyLoad); if (!TQFile::exists(fullPath())) saveToFile(); // Reserve the fileName so no new note will have the same name! @@ -782,7 +782,7 @@ bool ImageContent::finishLazyLoad() } } - std::cout << "FAILED TO LOAD ImageContent: " << fullPath() << std::endl; + std::cout << "FAILED TO LOAD ImageContent: " << fullPath().local8Bit() << std::endl; m_format = (char*)"PNG"; // If the image is set later, it should be saved without destruction, so we use PNG by default. m_pixmap.resize(1, 1); // Create a 1x1 pixels image instead of an undefined one. m_pixmap.fill(); @@ -1891,14 +1891,14 @@ void UnknownContent::addAlternateDragObjects(KMultipleDrag *dragObject) TQ_UINT64 size; // TODO: It was TQ_UINT32 in version 0.5.0 ! TQByteArray *array; TQStoredDrag *storedDrag; - for (uint i = 0; i < mimes.count(); ++i) { + for (TQValueList::iterator it = mimes.begin(); it != mimes.end(); ++it) { // Get the size: stream >> size; // Allocate memory to retreive size bytes and store them: array = new TQByteArray(size); stream.readRawBytes(array->data(), size); // Creata and add the TQDragObject: - storedDrag = new TQStoredDrag(*(mimes.at(i))); + storedDrag = new TQStoredDrag((*it).utf8()); storedDrag->setEncodedData(*array); dragObject->addDragObject(storedDrag); delete array; // FIXME: Should we? -- cgit v1.2.1