https://bugs.kde.org/show_bug.cgi?id=417107

Toni Asensi Esteve <toni.ase...@kdemail.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #3 from Toni Asensi Esteve <toni.ase...@kdemail.net> ---
Hi, Eric, the "QCoreApplication::applicationDirPath: Please instantiate the
QApplication object first" message wasn't seen in my logs, nor in my normal
use, nor in my tests, using Kubuntu 18.04 (with Qt 5.9.5), nor Ubuntu 16.04 LTS
(after having installed Qt 5.9.9 manually); although the message is seen when
testing under Kubuntu 19.10 (with Qt 5.12.4), executing Krusader from the
command line.

A possible solution is not easy to find, for example I replaced the content of
the main.cpp file of Krusader with only that text:

    # include <QDebug>

    int main()
    {
        qDebug() << "1----" << endl;
        exit(0);
    }
and I did some changes in order to make Krusader build [^1], I compiled and
installed Krusader, but its execution still showed:
    QCoreApplication::applicationDirPath: Please instantiate the QApplication
object first
    1---- 


[^1]: diff --git a/krusader/Archive/abstractthreadedjob.cpp
b/krusader/Archive/abstractthreadedjob.cpp
    index 928a3b32..47569725 100644
    --- a/krusader/Archive/abstractthreadedjob.cpp
    +++ b/krusader/Archive/abstractthreadedjob.cpp
    @@ -650,13 +650,13 @@ bool AbstractJobThread::getArchiveInformation(QString
&path, QString &type, QStr
        QMimeType mt = db.mimeTypeForUrl(url);
        QString mime = mt.isValid() ? mt.name() : QString();
        bool encrypted = false;
    -    type = arcHandler.getType(encrypted, path, mime);
    +//    type = arcHandler.getType(encrypted, path, mime);

    -    // Check that the archive is supported
    -    if (!KRarcHandler::arcSupported(type)) {
    -        sendError(KIO::ERR_NO_CONTENT, i18nc("%1=archive filename", "%1,
unsupported archive type.", arcName));
    -        return false;
    -    }
    +//    // Check that the archive is supported
    +//    if (!KRarcHandler::arcSupported(type)) {
    +//        sendError(KIO::ERR_NO_CONTENT, i18nc("%1=archive filename", "%1,
unsupported archive type.", arcName));
    +//        return false;
    +//    }

        password = encrypted ? getPassword(path) : QString();

    diff --git a/krusader/FileSystem/filesearcher.cpp
b/krusader/FileSystem/filesearcher.cpp
    index 9e28fb9e..46cad36e 100644
    --- a/krusader/FileSystem/filesearcher.cpp
    +++ b/krusader/FileSystem/filesearcher.cpp
    @@ -138,12 +138,12 @@ void FileSearcher::scanDirectory(const QUrl &url)
                // query search in archive; NOTE: only supported for local
files
                QUrl archiveURL = fileUrl;
                bool encrypted;
    -            const QString type = arcHandler.getType(encrypted,
fileUrl.path(), fileItem->getMime());
    +//            const QString type = arcHandler.getType(encrypted,
fileUrl.path(), fileItem->getMime());

    -            if (!encrypted) {
    -                archiveURL.setScheme(TAR_TYPES.contains(type) ? "tar" :
"krarc");
    -                m_unScannedUrls.push(archiveURL);
    -            }
    +//            if (!encrypted) {
    +//                archiveURL.setScheme(TAR_TYPES.contains(type) ? "tar" :
"krarc");
    +//                m_unScannedUrls.push(archiveURL);
    +//            }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to