Changeset View
Changeset View
Standalone View
Standalone View
krArc/krarc.cpp
Show All 31 Lines | |||||
32 | #include <qplatformdefs.h> | 32 | #include <qplatformdefs.h> | ||
33 | 33 | | |||
34 | #include <KArchive/KTar> | 34 | #include <KArchive/KTar> | ||
35 | #include <KCoreAddons/KProcess> | 35 | #include <KCoreAddons/KProcess> | ||
36 | #include <KI18n/KLocalizedString> | 36 | #include <KI18n/KLocalizedString> | ||
37 | #include <KIO/Job> | 37 | #include <KIO/Job> | ||
38 | #include <KIOCore/KFileItem> | 38 | #include <KIOCore/KFileItem> | ||
39 | 39 | | |||
40 | #include <kio_version.h> | ||||
41 | | ||||
40 | #include <errno.h> | 42 | #include <errno.h> | ||
41 | 43 | | |||
42 | #define MAX_IPC_SIZE (1024*32) | 44 | #define MAX_IPC_SIZE (1024*32) | ||
43 | #define TRIES_WITH_PASSWORDS 3 | 45 | #define TRIES_WITH_PASSWORDS 3 | ||
44 | 46 | | |||
45 | using namespace KIO; | 47 | using namespace KIO; | ||
46 | extern "C" | 48 | extern "C" | ||
47 | { | 49 | { | ||
▲ Show 20 Lines • Show All 1741 Lines • ▼ Show 20 Line(s) | 1772 | { | |||
1789 | 1791 | | |||
1790 | if (checkCachedAuthentication(authInfo) && !authInfo.password.isNull()) { | 1792 | if (checkCachedAuthentication(authInfo) && !authInfo.password.isNull()) { | ||
1791 | KRDEBUG(authInfo.password); | 1793 | KRDEBUG(authInfo.password); | ||
1792 | return (password = authInfo.password); | 1794 | return (password = authInfo.password); | ||
1793 | } | 1795 | } | ||
1794 | 1796 | | |||
1795 | authInfo.password.clear(); | 1797 | authInfo.password.clear(); | ||
1796 | 1798 | | |||
1799 | #if KIO_VERSION_MINOR >= 24 | ||||
1800 | int errCode = openPasswordDialogV2(authInfo, i18n("Accessing the file requires a password.")); | ||||
1801 | if (!errCode && !authInfo.password.isNull()) { | ||||
1802 | #else | ||||
1797 | if (openPasswordDialog(authInfo, i18n("Accessing the file requires a password.")) && !authInfo.password.isNull()) { | 1803 | if (openPasswordDialog(authInfo, i18n("Accessing the file requires a password.")) && !authInfo.password.isNull()) { | ||
1804 | #endif | ||||
1798 | KRDEBUG(authInfo.password); | 1805 | KRDEBUG(authInfo.password); | ||
1799 | return (password = authInfo.password); | 1806 | return (password = authInfo.password); | ||
1807 | #if KIO_VERSION_MINOR >= 24 | ||||
1808 | } else { | ||||
1809 | error(errCode, QString()); | ||||
1810 | #endif | ||||
1800 | } | 1811 | } | ||
1801 | 1812 | | |||
1802 | KRDEBUG(password); | 1813 | KRDEBUG(password); | ||
1803 | return password; | 1814 | return password; | ||
1804 | } | 1815 | } | ||
1805 | 1816 | | |||
1806 | QString kio_krarcProtocol::detectFullPathName(QString name) | 1817 | QString kio_krarcProtocol::detectFullPathName(QString name) | ||
1807 | { | 1818 | { | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |