diff -Nru qesteidutil-0.3.1/AUTHORS qesteidutil-0.3.1/AUTHORS --- qesteidutil-0.3.1/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/AUTHORS 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,3 @@ +Jargo Kõster +Raul Metsma +Kalev Lember diff -Nru qesteidutil-0.3.1/build.bat qesteidutil-0.3.1/build.bat --- qesteidutil-0.3.1/build.bat 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/build.bat 2009-04-25 19:54:10.000000000 +0000 @@ -0,0 +1,17 @@ +@echo off + +set target_dir=target + +IF EXIST build GOTO :BuildExists +md build +cd build +cmake .. -G "NMake Makefiles" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX="" +nmake +nmake install DESTDIR="%target_dir%" + +goto :EOF + +:BuildExists +echo Directory "build" already exists, quitting. diff -Nru qesteidutil-0.3.1/cmake/modules/COPYING-CMAKE-SCRIPTS qesteidutil-0.3.1/cmake/modules/COPYING-CMAKE-SCRIPTS --- qesteidutil-0.3.1/cmake/modules/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/COPYING-CMAKE-SCRIPTS 2010-06-21 15:41:48.000000000 +0000 @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru qesteidutil-0.3.1/cmake/modules/FindCppUnit.cmake qesteidutil-0.3.1/cmake/modules/FindCppUnit.cmake --- qesteidutil-0.3.1/cmake/modules/FindCppUnit.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindCppUnit.cmake 2009-03-20 18:50:08.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find cppunit +# Find the native cppunit includes and library +# +# CPPUNIT_INCLUDE_DIR - where to find cppunit/Test.h, etc. +# CPPUNIT_LIBRARIES - List of libraries when using cppunit. +# CPPUNIT_FOUND - True if cppunit found. + + +IF (CPPUNIT_INCLUDE_DIR) + # Already in cache, be silent + SET(CPPUNIT_FIND_QUIETLY TRUE) +ENDIF (CPPUNIT_INCLUDE_DIR) + +FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h) + +SET(CPPUNIT_NAMES cppunit) +FIND_LIBRARY(CPPUNIT_LIBRARY NAMES ${CPPUNIT_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit DEFAULT_MSG CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR) + +IF(CPPUNIT_FOUND) + SET( CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ) +ELSE(CPPUNIT_FOUND) + SET( CPPUNIT_LIBRARIES ) +ENDIF(CPPUNIT_FOUND) + +MARK_AS_ADVANCED( CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindGecko.cmake qesteidutil-0.3.1/cmake/modules/FindGecko.cmake --- qesteidutil-0.3.1/cmake/modules/FindGecko.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindGecko.cmake 2010-01-29 18:47:14.000000000 +0000 @@ -0,0 +1,83 @@ +# - Try to find Gecko +# Once done this will define +# +# GECKO_FOUND - System has Gecko +# GECKO_INCLUDE_DIR - The Gecko include directory +# GECKO_IDL_DIR - The Gecko idl include directory +# GECKO_DEFINITIONS - Compiler switches required for using Gecko +# GECKO_XPIDL_EXECUTABLE - The idl compiler xpidl coming with Gecko + + +IF (GECKO_INCLUDE_DIR AND GECKO_IDL_DIR AND GECKO_XPIDL_EXECUTABLE) + # in cache already + SET(Gecko_FIND_QUIETLY TRUE) +ENDIF (GECKO_INCLUDE_DIR AND GECKO_IDL_DIR AND GECKO_XPIDL_EXECUTABLE) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_LIBXUL libxul) + SET(GECKO_DEFINITIONS ${PC_LIBXUL_CFLAGS_OTHER}) + + # Use FindPkgConfig internal function _pkgconfig_invoke to get sdkdir + _pkgconfig_invoke(libxul "PC_LIBXUL" SDKDIR "" --variable=sdkdir) +ENDIF (NOT WIN32) + +IF (MSVC) + SET(GECKO_DEFINITIONS "/Zc:wchar_t-") +ENDIF (MSVC) + +SET(XULRUNNER_SDK_SEARCH_DIRS + /build/Win32/xulrunner-sdk + ${PROJECT_SOURCE_DIR}/xulrunner-sdk + ${PROJECT_SOURCE_DIR}/../xulrunner-sdk + ) + +FIND_PATH(GECKO_STABLE_INCLUDE_DIR nsISupports.h + HINTS + ${PC_LIBXUL_INCLUDE_DIRS} + ${XULRUNNER_SDK_SEARCH_DIRS} + PATH_SUFFIXES sdk/include + ) + +FIND_PATH(GECKO_NSPR4_INCLUDE_DIR prcpucfg.h + HINTS + ${PC_LIBXUL_INCLUDE_DIRS} + ${XULRUNNER_SDK_SEARCH_DIRS} + PATH_SUFFIXES sdk/include nspr4 + ) + +FIND_PATH(GECKO_XPCOM_INCLUDE_DIR xpcom-config.h + HINTS + ${PC_LIBXUL_SDKDIR} + ${XULRUNNER_SDK_SEARCH_DIRS} + PATH_SUFFIXES sdk/include + ) + +SET(GECKO_INCLUDE_DIR ${GECKO_STABLE_INCLUDE_DIR} ${GECKO_NSPR4_INCLUDE_DIR} ${GECKO_XPCOM_INCLUDE_DIR}) +LIST(REMOVE_DUPLICATES GECKO_INCLUDE_DIR) + + +FIND_PATH(GECKO_IDL_DIR nsIDOMWindow.idl + HINTS + ${PC_LIBXUL_SDKDIR} + ${XULRUNNER_SDK_SEARCH_DIRS} + PATH_SUFFIXES idl + ) + +FIND_PROGRAM(GECKO_XPIDL_EXECUTABLE xpidl + HINTS + ${PC_LIBXUL_LIBDIR} + ${PC_LIBXUL_SDKDIR} + ${XULRUNNER_SDK_SEARCH_DIRS} + PATH_SUFFIXES bin + ) + +INCLUDE(FindPackageHandleStandardArgs) + +# handle the QUIETLY and REQUIRED arguments and set GECKO_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gecko DEFAULT_MSG GECKO_INCLUDE_DIR GECKO_IDL_DIR GECKO_XPIDL_EXECUTABLE) + +MARK_AS_ADVANCED(GECKO_INCLUDE_DIR GECKO_IDL_DIR GECKO_XPIDL_EXECUTABLE) diff -Nru qesteidutil-0.3.1/cmake/modules/FindIconv.cmake qesteidutil-0.3.1/cmake/modules/FindIconv.cmake --- qesteidutil-0.3.1/cmake/modules/FindIconv.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindIconv.cmake 2009-05-20 10:32:06.000000000 +0000 @@ -0,0 +1,58 @@ +# /kde/kdesupport/strigi/cmake +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# +include(CheckCXXSourceCompiles) + +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLdap.cmake qesteidutil-0.3.1/cmake/modules/FindLdap.cmake --- qesteidutil-0.3.1/cmake/modules/FindLdap.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLdap.cmake 2009-12-02 16:26:10.000000000 +0000 @@ -0,0 +1,48 @@ +# - Try to find the LDAP client libraries +# Once done this will define +# +# LDAP_FOUND - system has libldap +# LDAP_INCLUDE_DIR - the ldap include directory +# LDAP_LIBRARIES - libldap + liblber (if found) library +# LBER_LIBRARIES - liblber library + +if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + # Already in cache, be silent + set(Ldap_FIND_QUIETLY TRUE) +endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + +if(UNIX) + FIND_PATH(LDAP_INCLUDE_DIR ldap.h) + if(APPLE) + FIND_LIBRARY(LDAP_LIBRARIES NAMES LDAP + PATHS + /System/Library/Frameworks + /Library/Frameworks + ) + else(APPLE) + FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) + FIND_LIBRARY(LBER_LIBRARIES NAMES lber) + endif(APPLE) +else(UNIX) + FIND_PATH(LDAP_INCLUDE_DIR winldap.h) + FIND_LIBRARY(LDAP_LIBRARIES NAMES wldap32) +endif(UNIX) + +if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + set(LDAP_FOUND TRUE) + if(LBER_LIBRARIES) + set(LDAP_LIBRARIES ${LDAP_LIBRARIES} ${LBER_LIBRARIES}) + endif(LBER_LIBRARIES) +endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + +if(LDAP_FOUND) + if(NOT Ldap_FIND_QUIETLY) + message(STATUS "Found ldap: ${LDAP_LIBRARIES}") + endif(NOT Ldap_FIND_QUIETLY) +else(LDAP_FOUND) + if (Ldap_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find ldap") + endif (Ldap_FIND_REQUIRED) +endif(LDAP_FOUND) + +MARK_AS_ADVANCED(LDAP_INCLUDE_DIR LDAP_LIBRARIES LBER_LIBRARIES) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLibDigiDoc.cmake qesteidutil-0.3.1/cmake/modules/FindLibDigiDoc.cmake --- qesteidutil-0.3.1/cmake/modules/FindLibDigiDoc.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLibDigiDoc.cmake 2009-06-08 11:36:43.000000000 +0000 @@ -0,0 +1,28 @@ +# - Find LibDigiDoc +# Find the native LibDigiDoc includes and library +# +# LIBDIGIDOC_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. +# LIBDIGIDOC_LIBRARIES - List of libraries when using LibDigiDoc. +# LIBDIGIDOC_FOUND - True if LibDigiDoc found. + + +IF (LIBDIGIDOC_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBDIGIDOC_FIND_QUIETLY TRUE) +ENDIF (LIBDIGIDOC_INCLUDE_DIR) + +FIND_PATH(LIBDIGIDOC_INCLUDE_DIR libdigidoc/DigiDocDefs.h) +FIND_LIBRARY(LIBDIGIDOC_LIBRARY NAMES digidoc) + +# handle the QUIETLY and REQUIRED arguments and set LIBDIGIDOC_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDigiDoc DEFAULT_MSG LIBDIGIDOC_LIBRARY LIBDIGIDOC_INCLUDE_DIR) + +IF(LIBDIGIDOC_FOUND) + SET( LIBDIGIDOC_LIBRARIES ${LIBDIGIDOC_LIBRARY} ) +ELSE(LIBDIGIDOC_FOUND) + SET( LIBDIGIDOC_LIBRARIES ) +ENDIF(LIBDIGIDOC_FOUND) + +MARK_AS_ADVANCED(LIBDIGIDOC_LIBRARY LIBDIGIDOC_INCLUDE_DIR) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLibDigiDocpp.cmake qesteidutil-0.3.1/cmake/modules/FindLibDigiDocpp.cmake --- qesteidutil-0.3.1/cmake/modules/FindLibDigiDocpp.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLibDigiDocpp.cmake 2009-10-21 16:56:37.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find LibDigiDocpp +# Find the native LibDigiDocpp includes and library +# +# LIBDIGIDOCPP_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. +# LIBDIGIDOCPP_CONF - where is digidocpp.conf file +# LIBDIGIDOCPP_LIBRARIES - List of libraries when using LibDigiDocpp. +# LIBDIGIDOCPP_FOUND - True if LibDigiDocpp found. + + +IF (LIBDIGIDOCPP_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBDIGIDOCPP_FIND_QUIETLY TRUE) +ENDIF (LIBDIGIDOCPP_INCLUDE_DIR) + +FIND_PATH(LIBDIGIDOCPP_INCLUDE_DIR digidocpp/BDoc.h /usr/include /usr/local/include) +FIND_FILE(LIBDIGIDOCPP_CONF digidocpp.conf /etc/digidocpp /usr/local/etc/digidocpp) +FIND_LIBRARY(LIBDIGIDOCPP_LIBRARY NAMES digidocpp) + +# handle the QUIETLY and REQUIRED arguments and set LIBDIGIDOCPP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDigiDocpp DEFAULT_MSG LIBDIGIDOCPP_LIBRARY LIBDIGIDOCPP_INCLUDE_DIR) + +IF(LIBDIGIDOCPP_FOUND) + SET( LIBDIGIDOCPP_LIBRARIES ${LIBDIGIDOCPP_LIBRARY} ) +ELSE(LIBDIGIDOCPP_FOUND) + SET( LIBDIGIDOCPP_LIBRARIES ) +ENDIF(LIBDIGIDOCPP_FOUND) + +MARK_AS_ADVANCED(LIBDIGIDOCPP_LIBRARY LIBDIGIDOCPP_INCLUDE_DIR LIBDIGIDOCPP_CONF) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLibDL.cmake qesteidutil-0.3.1/cmake/modules/FindLibDL.cmake --- qesteidutil-0.3.1/cmake/modules/FindLibDL.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLibDL.cmake 2009-10-21 17:09:24.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find libdl +# Find the native LIBDL includes and library +# +# LIBDL_INCLUDE_DIR - where to find dlfcn.h, etc. +# LIBDL_LIBRARIES - List of libraries when using libdl. +# LIBDL_FOUND - True if libdl found. + + +IF (LIBDL_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBDL_FIND_QUIETLY TRUE) +ENDIF (LIBDL_INCLUDE_DIR) + +FIND_PATH(LIBDL_INCLUDE_DIR dlfcn.h) + +SET(LIBDL_NAMES dl libdl ltdl libltdl) +FIND_LIBRARY(LIBDL_LIBRARY NAMES ${LIBDL_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set LIBDL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDL DEFAULT_MSG LIBDL_LIBRARY LIBDL_INCLUDE_DIR) + +IF(LIBDL_FOUND) + SET( LIBDL_LIBRARIES ${LIBDL_LIBRARY} ) +ELSE(LIBDL_FOUND) + SET( LIBDL_LIBRARIES ) +ENDIF(LIBDL_FOUND) + +MARK_AS_ADVANCED( LIBDL_LIBRARY LIBDL_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLibP11.cmake qesteidutil-0.3.1/cmake/modules/FindLibP11.cmake --- qesteidutil-0.3.1/cmake/modules/FindLibP11.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLibP11.cmake 2009-03-13 13:06:53.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find libp11 +# Find the native LIBP11 includes and library +# +# LIBP11_INCLUDE_DIR - where to find libp11.h, etc. +# LIBP11_LIBRARIES - List of libraries when using libp11. +# LIBP11_FOUND - True if libp11 found. + + +IF (LIBP11_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBP11_FIND_QUIETLY TRUE) +ENDIF (LIBP11_INCLUDE_DIR) + +FIND_PATH(LIBP11_INCLUDE_DIR libp11.h) + +SET(LIBP11_NAMES p11 libp11) +FIND_LIBRARY(LIBP11_LIBRARY NAMES ${LIBP11_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set LIBP11_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibP11 DEFAULT_MSG LIBP11_LIBRARY LIBP11_INCLUDE_DIR) + +IF(LIBP11_FOUND) + SET( LIBP11_LIBRARIES ${LIBP11_LIBRARY} ) +ELSE(LIBP11_FOUND) + SET( LIBP11_LIBRARIES ) +ENDIF(LIBP11_FOUND) + +MARK_AS_ADVANCED( LIBP11_LIBRARY LIBP11_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindLibPython.py qesteidutil-0.3.1/cmake/modules/FindLibPython.py --- qesteidutil-0.3.1/cmake/modules/FindLibPython.py 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindLibPython.py 2010-06-21 15:31:45.000000000 +0000 @@ -0,0 +1,13 @@ + +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +import sys +import distutils.sysconfig + +print("exec_prefix:%s" % sys.exec_prefix) +print("short_version:%s" % sys.version[:3]) +print("long_version:%s" % sys.version.split()[0]) +print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) +print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) diff -Nru qesteidutil-0.3.1/cmake/modules/FindMiniZip.cmake qesteidutil-0.3.1/cmake/modules/FindMiniZip.cmake --- qesteidutil-0.3.1/cmake/modules/FindMiniZip.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindMiniZip.cmake 2009-12-06 17:43:46.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find minizip +# Find the native MINIZIP includes and library +# +# MINIZIP_INCLUDE_DIR - where to find minizip.h, etc. +# MINIZIP_LIBRARIES - List of libraries when using minizip. +# MINIZIP_FOUND - True if minizip found. + + +IF (MINIZIP_INCLUDE_DIR) + # Already in cache, be silent + SET(MINIZIP_FIND_QUIETLY TRUE) +ENDIF (MINIZIP_INCLUDE_DIR) + +FIND_PATH(MINIZIP_INCLUDE_DIR zip.h PATH_SUFFIXES minizip) + +SET(MINIZIP_NAMES minizip) +FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set MINIZIP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(MiniZip DEFAULT_MSG MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR) + +IF(MINIZIP_FOUND) + SET( MINIZIP_LIBRARIES ${MINIZIP_LIBRARY} ) +ELSE(MINIZIP_FOUND) + SET( MINIZIP_LIBRARIES ) +ENDIF(MINIZIP_FOUND) + +MARK_AS_ADVANCED( MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindOpenSC.cmake qesteidutil-0.3.1/cmake/modules/FindOpenSC.cmake --- qesteidutil-0.3.1/cmake/modules/FindOpenSC.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindOpenSC.cmake 2009-10-21 17:09:24.000000000 +0000 @@ -0,0 +1,35 @@ +# - Find opensc +# Find the native OPENSC includes +# +# OPENSC_INCLUDE_DIR - where to find pkcs11.h +# OPENSC_FOUND - True if opensc found. + + +IF (OPENSC_INCLUDE_DIR) + # Already in cache, be silent + SET(OPENSC_FIND_QUIETLY TRUE) +ENDIF (OPENSC_INCLUDE_DIR) + +FIND_PATH(OPENSC_INCLUDE_DIR opensc/pkcs11.h) + +IF(WIN32 AND MSVC) + SET(OPENSC_NAMES libpkcs11MD libpkcs11) +ELSE(WIN32 AND MSVC) + SET(OPENSC_NAMES libpkcs11 libpkcs11MD) +ENDIF(WIN32 AND MSVC) + +FIND_LIBRARY(OPENSC_LIBRARY NAMES ${OPENSC_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set OPENSCSC_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSc DEFAULT_MSG OPENSC_LIBRARY OPENSC_INCLUDE_DIR) + +IF(OPENSC_FOUND) + SET( OPENSC_LIBRARIES ${OPENSC_LIBRARY} ) +ELSE(OPENSC_FOUND) + SET( OPENSC_LIBRARIES ) +ENDIF(OPENSC_FOUND) + +MARK_AS_ADVANCED( OPENSC_LIBRARY OPENSC_INCLUDE_DIR ) + diff -Nru qesteidutil-0.3.1/cmake/modules/FindOpenSSLCrypto.cmake qesteidutil-0.3.1/cmake/modules/FindOpenSSLCrypto.cmake --- qesteidutil-0.3.1/cmake/modules/FindOpenSSLCrypto.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindOpenSSLCrypto.cmake 2009-03-13 13:06:53.000000000 +0000 @@ -0,0 +1,35 @@ +# - Find OpenSSL crypto library +# Find OpenSSL crypto includes and library +# +# OPENSSLCRYPTO_INCLUDE_DIR - OpenSSL include directory +# OPENSSLCRYPTO_LIBRARIES - OpenSSL crypto libraries +# OPENSSLCRYPTO_FOUND - True if OpenSSL crypto library was found + + +IF (OPENSSLCRYPTO_LIBRARIES) + # Already in cache, be silent. + SET(OPENSSLCRYPTO_FIND_QUIETLY TRUE) +ENDIF (OPENSSLCRYPTO_LIBRARIES) + +FIND_PATH(OPENSSLCRYPTO_INCLUDE_DIR openssl/ssl.h) + +IF(WIN32 AND MSVC) + SET(OPENSSLCRYPTO_NAMES libeay32MD eay libeay32) +ELSE(WIN32 AND MSVC) + SET(OPENSSLCRYPTO_NAMES crypto eay libeay32 libeay32MD) +ENDIF(WIN32 AND MSVC) + +FIND_LIBRARY(OPENSSLCRYPTO_LIBRARY NAMES ${OPENSSLCRYPTO_NAMES} ) + +# Handle the QUIETLY and REQUIRED arguments and set OPENSSLCRYPTO_FOUND to +# TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSSLCrypto DEFAULT_MSG OPENSSLCRYPTO_LIBRARY OPENSSLCRYPTO_INCLUDE_DIR) + +IF(OPENSSLCRYPTO_FOUND) + SET( OPENSSLCRYPTO_LIBRARIES ${OPENSSLCRYPTO_LIBRARY} ) +ELSE(OPENSSLCRYPTO_FOUND) + SET( OPENSSLCRYPTO_LIBRARIES ) +ENDIF(OPENSSLCRYPTO_FOUND) + +MARK_AS_ADVANCED( OPENSSLCRYPTO_LIBRARY OPENSSLCRYPTO_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindPCSCLite.cmake qesteidutil-0.3.1/cmake/modules/FindPCSCLite.cmake --- qesteidutil-0.3.1/cmake/modules/FindPCSCLite.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindPCSCLite.cmake 2009-10-21 16:47:02.000000000 +0000 @@ -0,0 +1,43 @@ +# - Find PCSC-Lite +# Find the native PCSC-Lite includes and library +# +# PCSCLITE_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. +# PCSCLITE_LIBRARIES - List of libraries when using PCSC-Lite. +# PCSCLITE_FOUND - True if PCSC-Lite found. + + +IF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES) + # Already in cache, be silent + SET(PCSCLITE_FIND_QUIETLY TRUE) +ENDIF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES) + +IF (NOT WIN32) + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_PCSCLITE libpcsclite) +ENDIF (NOT WIN32) + +FIND_PATH(PCSCLITE_INCLUDE_DIR winscard.h + HINTS + ${PC_PCSCLITE_INCLUDEDIR} + ${PC_PCSCLITE_INCLUDE_DIRS} + ${PC_PCSCLITE_INCLUDE_DIRS}/PCSC + ) + +FIND_LIBRARY(PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC + HINTS + ${PC_PCSCLITE_LIBDIR} + ${PC_PCSCLITE_LIBRARY_DIRS} + ) + +# handle the QUIETLY and REQUIRED arguments and set PCSCLITE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC-Lite DEFAULT_MSG PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR) + +IF(PCSCLITE_FOUND) + SET( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} ) +ELSE(PCSCLITE_FOUND) + SET( PCSCLITE_LIBRARIES ) +ENDIF(PCSCLITE_FOUND) + +MARK_AS_ADVANCED( PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindPHPLibs.cmake qesteidutil-0.3.1/cmake/modules/FindPHPLibs.cmake --- qesteidutil-0.3.1/cmake/modules/FindPHPLibs.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindPHPLibs.cmake 2010-06-21 15:32:18.000000000 +0000 @@ -0,0 +1,46 @@ +# - FindPHPLibs +# Find PHP interpreter includes and library +# +# PHPLIBS_FOUND - True if PHP libs found +# PHP_VERSION_STRING - The version of PHP found (x.y.z) +# PHP_LIBRARIES - Libaries (standard variable) +# PHP_INCLUDE_DIRS - List of include directories +# PHP_INCLUDE_DIR - Main include directory prefix +# PHP_EXTENSION_DIR - Location of PHP extension DSO-s +# PHP_EXECUTABLE - PHP executable +# PHP_INSTALL_PREFIX - PHP install prefix, as reported + +INCLUDE(CMakeFindFrameworks) + +IF( NOT PHP_CONFIG_EXECUTABLE ) +FIND_PROGRAM(PHP_CONFIG_EXECUTABLE + NAMES php5-config php-config + ) +ENDIF( NOT PHP_CONFIG_EXECUTABLE ) + +MACRO(GET_FROM_PHP_CONFIG args variable) + EXECUTE_PROCESS(COMMAND ${PHP_CONFIG_EXECUTABLE} ${args} + OUTPUT_VARIABLE ${variable}) + STRING(REPLACE "\n" "" ${variable} "${${variable}}") +ENDMACRO(GET_FROM_PHP_CONFIG cmd variable) + +IF(PHP_CONFIG_EXECUTABLE) + GET_FROM_PHP_CONFIG("--version" PHP_VERSION_STRING) + GET_FROM_PHP_CONFIG("--php-binary" PHP_EXECUTABLE) + GET_FROM_PHP_CONFIG("--include-dir" PHP_INCLUDE_DIR) + GET_FROM_PHP_CONFIG("--extension-dir" PHP_EXTENSION_DIR) + GET_FROM_PHP_CONFIG("--includes" PHP_INCLUDE_DIRS) + GET_FROM_PHP_CONFIG("--prefix" PHP_INSTALL_PREFIX) + STRING(REPLACE "-I" "" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}") + STRING(REPLACE " " ";" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}") +ENDIF(PHP_CONFIG_EXECUTABLE) + +# FIXME: Maybe we need all this crap that php-config --libs puts out, +# however after building a few swig bindings without them, +# I seriously doubt it. +SET(PHP_LIBRARIES "") + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHPLibs DEFAULT_MSG PHP_INCLUDE_DIRS) + +MARK_AS_ADVANCED(PHP_LIBRARIES PHP_INCLUDE_DIRS) diff -Nru qesteidutil-0.3.1/cmake/modules/FindPKCS11H.cmake qesteidutil-0.3.1/cmake/modules/FindPKCS11H.cmake --- qesteidutil-0.3.1/cmake/modules/FindPKCS11H.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindPKCS11H.cmake 2009-06-22 20:49:35.000000000 +0000 @@ -0,0 +1,44 @@ +# - Find PKCS11-Helper +# Find the native PKCS11-Helper includes and library +# +# PKCS11H_INCLUDE_DIR - where to find pkcs11.h, etc. +# PKCS11H_LIBRARIES - List of libraries when using PKCS11-Helper. +# PKCS11H_FOUND - True if PKCS11-Helper found. + + +IF (PKCS11H_INCLUDE_DIR AND PKCS11H_LIBRARIES) + # Already in cache, be silent + SET(PKCS11H_FIND_QUIETLY TRUE) +ENDIF (PKCS11H_INCLUDE_DIR AND PKCS11H_LIBRARIES) + +IF (NOT WIN32) + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_PKCSH11 libpkcs11-helper-1) +ENDIF (NOT WIN32) + +FIND_PATH(PKCS11H_INCLUDE_DIR pkcs11.h + HINTS + ${PC_PKCSH11_INCLUDEDIR} + ${PC_PKCSH11_INCLUDEDIR}/pkcs11-helper-1.0 + ${PC_PKCSH11_INCLUDE_DIRS} + ${PC_PKCSH11_INCLUDE_DIRS}/pkcs11-helper-1.0 + ) + +FIND_LIBRARY(PKCS11H_LIBRARY NAMES pkcs11-helper libpkcs11-helper + HINTS + ${PC_PKCS11H_LIBDIR} + ${PC_PKCS11H_LIBRARY_DIRS} + ) + +# handle the QUIETLY and REQUIRED arguments and set PKCS11H_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PKCS11H DEFAULT_MSG PKCS11H_INCLUDE_DIR PKCS11H_LIBRARY) + +IF(PKCS11H_FOUND) + SET( PKCS11H_LIBRARIES ${PKCS11H_LIBRARY} ) +ELSE(PKCS11H_FOUND) + SET( PKCS11H_LIBRARIES ) +ENDIF(PKCS11H_FOUND) + +MARK_AS_ADVANCED( PKCS11H_LIBRARY PKCS11H_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindPythonLibrary.cmake qesteidutil-0.3.1/cmake/modules/FindPythonLibrary.cmake --- qesteidutil-0.3.1/cmake/modules/FindPythonLibrary.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindPythonLibrary.cmake 2010-06-21 15:31:45.000000000 +0000 @@ -0,0 +1,94 @@ +# Find Python +# ~~~~~~~~~~~ +# Find the Python interpreter and related Python directories. +# +# This file defines the following variables: +# +# PYTHON_EXECUTABLE - The path and filename of the Python interpreter. +# +# PYTHON_SHORT_VERSION - The version of the Python interpreter found, +# excluding the patch version number. (e.g. 2.5 and not 2.5.1)) +# +# PYTHON_LONG_VERSION - The version of the Python interpreter found as a human +# readable string. +# +# PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory. +# +# PYTHON_INCLUDE_PATH - Directory holding the python.h include file. +# +# PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library. + +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + + +INCLUDE(CMakeFindFrameworks) + +if(EXISTS PYTHON_LIBRARY) + # Already in cache, be silent + set(PYTHONLIBRARY_FOUND TRUE) +else(EXISTS PYTHON_LIBRARY) + + FIND_PACKAGE(PythonInterp) + + if(PYTHONINTERP_FOUND) + + FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH}) + + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_lib_python_py} OUTPUT_VARIABLE python_config) + if(python_config) + STRING(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config}) + STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config}) + STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config}) + STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" PYTHON_INCLUDE_PATH ${python_config}) + if(NOT PYTHON_SITE_PACKAGES_DIR) + if(NOT PYTHON_LIBS_WITH_KDE_LIBS) + STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config}) + else(NOT PYTHON_LIBS_WITH_KDE_LIBS) + set(PYTHON_SITE_PACKAGES_DIR ${KDE4_LIB_INSTALL_DIR}/python${PYTHON_SHORT_VERSION}/site-packages) + endif(NOT PYTHON_LIBS_WITH_KDE_LIBS) + endif(NOT PYTHON_SITE_PACKAGES_DIR) + STRING(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) + set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) + if(WIN32) + STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) + endif(WIN32) + FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH) + set(PYTHONLIBRARY_FOUND TRUE) + endif(python_config) + + # adapted from cmake's builtin FindPythonLibs + if(APPLE) + CMAKE_FIND_FRAMEWORKS(Python) + set(PYTHON_FRAMEWORK_INCLUDES) + if(Python_FRAMEWORKS) + # If a framework has been selected for the include path, + # make sure "-framework" is used to link it. + if("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") + set(PYTHON_LIBRARY "") + set(PYTHON_DEBUG_LIBRARY "") + endif("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") + if(NOT PYTHON_LIBRARY) + set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + endif(NOT PYTHON_LIBRARY) + set(PYTHONLIBRARY_FOUND TRUE) + endif(Python_FRAMEWORKS) + endif(APPLE) + endif(PYTHONINTERP_FOUND) + + if(PYTHONLIBRARY_FOUND) + set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) + if(NOT PYTHONLIBRARY_FIND_QUIETLY) + message(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}") + message(STATUS "Found Python version: ${PYTHON_LONG_VERSION}") + message(STATUS "Found Python library: ${PYTHON_LIBRARY}") + endif(NOT PYTHONLIBRARY_FIND_QUIETLY) + else(PYTHONLIBRARY_FOUND) + if(PYTHONLIBRARY_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Python") + endif(PYTHONLIBRARY_FIND_REQUIRED) + endif(PYTHONLIBRARY_FOUND) + +endif (EXISTS PYTHON_LIBRARY) diff -Nru qesteidutil-0.3.1/cmake/modules/FindSmartCardpp.cmake qesteidutil-0.3.1/cmake/modules/FindSmartCardpp.cmake --- qesteidutil-0.3.1/cmake/modules/FindSmartCardpp.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindSmartCardpp.cmake 2011-06-27 06:57:01.000000000 +0000 @@ -0,0 +1,47 @@ +# - Find smartcardpp +# Find the native SMARTCARDPP includes and library +# +# SMARTCARDPP_INCLUDE_DIR - where to find smartcardpp.h, etc. +# SMARTCARDPP_LIBRARIES - List of libraries when using smartcardpp. +# SMARTCARDPP_FOUND - True if smartcardpp found. + + +IF (SMARTCARDPP_INCLUDE_DIR) + # Already in cache, be silent + SET(SMARTCARDPP_FIND_QUIETLY TRUE) +ENDIF (SMARTCARDPP_INCLUDE_DIR) + +IF (NOT WIN32) + # try using pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_SMARTCARDPP smartcardpp) +ENDIF (NOT WIN32) + +FIND_PATH(SMARTCARDPP_INCLUDE_DIR smartcardpp/smartcardpp.h + HINTS + ${PC_SMARTCARDPP_INCLUDEDIR} + ${PC_SMARTCARDPP_INCLUDE_DIRS} + ) + +SET(SMARTCARDPP_NAMES smartcardpp) +FIND_LIBRARY(SMARTCARDPP_LIBRARY NAMES ${SMARTCARDPP_NAMES} + HINTS + ${PC_SMARTCARDPP_LIBDIR} + ${PC_SMARTCARDPP_LIBRARY_DIRS} + ) + +# handle the QUIETLY and REQUIRED arguments and set SMARTCARDPP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SmartCardpp DEFAULT_MSG SMARTCARDPP_LIBRARY SMARTCARDPP_INCLUDE_DIR) + +IF(SMARTCARDPP_FOUND) + SET( SMARTCARDPP_INCLUDE_DIRS ${SMARTCARDPP_INCLUDE_DIR} ${PC_SMARTCARDPP_INCLUDE_DIRS}) + SET( SMARTCARDPP_LIBRARIES ${SMARTCARDPP_LIBRARY} ) +ELSE(SMARTCARDPP_FOUND) + SET( SMARTCARDPP_INCLUDE_DIRS ) + SET( SMARTCARDPP_LIBRARIES ) +ENDIF(SMARTCARDPP_FOUND) + +MARK_AS_ADVANCED( SMARTCARDPP_LIBRARY SMARTCARDPP_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindXercesC.cmake qesteidutil-0.3.1/cmake/modules/FindXercesC.cmake --- qesteidutil-0.3.1/cmake/modules/FindXercesC.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindXercesC.cmake 2009-03-13 13:06:53.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find Xerces-C +# Find the Xerces-C includes and library +# +# XERCESC_INCLUDE_DIR - Where to find xercesc include sub-directory. +# XERCESC_LIBRARIES - List of libraries when using Xerces-C. +# XERCESC_FOUND - True if Xerces-C found. + + +IF (XERCESC_INCLUDE_DIR) + # Already in cache, be silent. + SET(XERCESC_FIND_QUIETLY TRUE) +ENDIF (XERCESC_INCLUDE_DIR) + +FIND_PATH(XERCESC_INCLUDE_DIR xercesc/dom/DOM.hpp) + +SET(XERCESC_NAMES xerces-c xerces-c_3 xerces-c_2) +FIND_LIBRARY(XERCESC_LIBRARY NAMES ${XERCESC_NAMES} ) + +# Handle the QUIETLY and REQUIRED arguments and set XERCESC_FOUND to +# TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC DEFAULT_MSG XERCESC_LIBRARY XERCESC_INCLUDE_DIR) + +IF(XERCESC_FOUND) + SET( XERCESC_LIBRARIES ${XERCESC_LIBRARY} ) +ELSE(XERCESC_FOUND) + SET( XERCESC_LIBRARIES ) +ENDIF(XERCESC_FOUND) + +MARK_AS_ADVANCED( XERCESC_LIBRARY XERCESC_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindXmlSecurityC.cmake qesteidutil-0.3.1/cmake/modules/FindXmlSecurityC.cmake --- qesteidutil-0.3.1/cmake/modules/FindXmlSecurityC.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindXmlSecurityC.cmake 2009-03-13 13:06:53.000000000 +0000 @@ -0,0 +1,30 @@ +# - Find XML-Security-C +# Find the XML-Security-C includes and library +# +# XMLSECURITYC_INCLUDE_DIR - Where to find xsec include sub-directory. +# XMLSECURITYC_LIBRARIES - List of libraries when using XML-Security-C. +# XMLSECURITYC_FOUND - True if XML-Security-C found. + + +IF (XMLSECURITYC_INCLUDE_DIR) + # Already in cache, be silent. + SET(XMLSECURITYC_FIND_QUIETLY TRUE) +ENDIF (XMLSECURITYC_INCLUDE_DIR) + +FIND_PATH(XMLSECURITYC_INCLUDE_DIR xsec/utils/XSECPlatformUtils.hpp) + +SET(XMLSECURITYC_NAMES xml-security-c xsec_1) +FIND_LIBRARY(XMLSECURITYC_LIBRARY NAMES ${XMLSECURITYC_NAMES} ) + +# Handle the QUIETLY and REQUIRED arguments and set XMLSECURITYC_FOUND to +# TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XmlSecurityC DEFAULT_MSG XMLSECURITYC_LIBRARY XMLSECURITYC_INCLUDE_DIR) + +IF(XMLSECURITYC_FOUND) + SET( XMLSECURITYC_LIBRARIES ${XMLSECURITYC_LIBRARY} ) +ELSE(XMLSECURITYC_FOUND) + SET( XMLSECURITYC_LIBRARIES ) +ENDIF(XMLSECURITYC_FOUND) + +MARK_AS_ADVANCED( XMLSECURITYC_LIBRARY XMLSECURITYC_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/FindXSD.cmake qesteidutil-0.3.1/cmake/modules/FindXSD.cmake --- qesteidutil-0.3.1/cmake/modules/FindXSD.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/FindXSD.cmake 2009-03-13 13:06:53.000000000 +0000 @@ -0,0 +1,24 @@ +# - Find XSD +# Find XSD includes and executable +# +# XSD_INCLUDE_DIR - Where to find xsd include sub-directory. +# XSD_EXECUTABLE - XSD compiler. +# XSD_FOUND - True if XSD found. + + +IF (XSD_INCLUDE_DIR) + # Already in cache, be silent. + SET(XSD_FIND_QUIETLY TRUE) +ENDIF (XSD_INCLUDE_DIR) + +FIND_PATH(XSD_INCLUDE_DIR xsd/cxx/parser/elements.hxx) + +SET(XSD_NAMES xsdcxx xsdgen xsd) +FIND_PROGRAM(XSD_EXECUTABLE NAMES ${XSD_NAMES} ) + +# Handle the QUIETLY and REQUIRED arguments and set XSD_FOUND to +# TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XSD DEFAULT_MSG XSD_EXECUTABLE XSD_INCLUDE_DIR) + +MARK_AS_ADVANCED( XSD_EXECUTABLE XSD_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/cmake/modules/InstallSettings.cmake qesteidutil-0.3.1/cmake/modules/InstallSettings.cmake --- qesteidutil-0.3.1/cmake/modules/InstallSettings.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/InstallSettings.cmake 2009-06-16 08:02:30.000000000 +0000 @@ -0,0 +1,136 @@ +# Copyright (c) 2008 Kevin Krammer +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) + +if (WIN32) +# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files + + set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + + set(EXEC_INSTALL_PREFIX "" ) # Base directory for executables and libraries + set(SHARE_INSTALL_PREFIX "share" ) # Base directory for files which go to share/ + set(BIN_INSTALL_DIR "bin" ) # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin) + set(SBIN_INSTALL_DIR "sbin" ) # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin) + + set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR}) + set(INCLUDE_INSTALL_DIR "include" ) # The subdirectory to the header prefix + + set(PLUGIN_INSTALL_DIR "lib${LIB_SUFFIX}/kde4" ) # "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4) + set(CONFIG_INSTALL_DIR "share/config" ) # The config file install dir + set(DATA_INSTALL_DIR "share/apps" ) # The parent directory where applications can install their data + set(HTML_INSTALL_DIR "share/doc/HTML" ) # The HTML install dir for documentation + set(ICON_INSTALL_DIR "share/icons" ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/) + set(KCFG_INSTALL_DIR "share/config.kcfg" ) # The install dir for kconfig files + set(LOCALE_INSTALL_DIR "share/locale" ) # The install dir for translations + set(MIME_INSTALL_DIR "share/mimelnk" ) # The install dir for the mimetype desktop files + set(SERVICES_INSTALL_DIR "share/kde4/services" ) # The install dir for service (desktop, protocol, ...) files + set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files + set(SOUND_INSTALL_DIR "share/sounds" ) # The install dir for sound files + set(TEMPLATES_INSTALL_DIR "share/templates" ) # The install dir for templates (Create new file...) + set(WALLPAPER_INSTALL_DIR "share/wallpapers" ) # The install dir for wallpapers + set(DEMO_INSTALL_DIR "share/demos" ) # The install dir for demos + set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir + set(AUTOSTART_INSTALL_DIR "share/autostart" ) # The install dir for autostart files + + set(XDG_APPS_INSTALL_DIR "share/applications/kde4" ) # The XDG apps dir + set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory + set(XDG_MIME_INSTALL_DIR "share/mime/packages" ) # The install dir for the xdg mimetypes + + set(SYSCONF_INSTALL_DIR "etc" ) # The kde sysconfig install dir (default /etc) + set(MAN_INSTALL_DIR "share/man" ) # The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/) + set(INFO_INSTALL_DIR "share/info" ) # The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") + set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") + set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services" ) # The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") + +else (WIN32) + + # this macro implements some very special logic how to deal with the cache + # by default the various install locations inherit their value from theit "parent" variable + # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will + # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX + # this would work completely without using the cache. + # but if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into + # the cache, otherwise it will be forgotten on the next cmake run. + # Once a variable is in the cache, it doesn't depend on its "parent" variables + # anymore and you can only change it by editing it directly. + # this macro helps in this regard, because as long as you don't set one of the + # variables explicitely to some location, it will always calculate its value from its + # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect. + # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location + # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX. + macro(_SET_FANCY _var _value _comment) + set(predefinedvalue "${_value}") + + if (NOT DEFINED ${_var}) + set(${_var} ${predefinedvalue}) + else (NOT DEFINED ${_var}) + set(${_var} "${${_var}}" CACHE PATH "${_comment}") + endif (NOT DEFINED ${_var}) + endmacro(_SET_FANCY) + + + _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") + _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") + _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") + _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") + _set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})") + _set_fancy(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/kde4/libexec)") + _set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") + + _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") + _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") + _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") + _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") + _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") + _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") + _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") + _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") + _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") + _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") + _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") + _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") + _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") + _set_fancy(DEMO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/demos" "The install dir for demos") + _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") + _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") + + _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") + _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") + _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") + + _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)") + _set_fancy(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" "The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/)") + _set_fancy(INFO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/info" "The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") + _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") + _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") + +endif (WIN32) + +# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed. +# The arguments are also ok for regular executables, i.e. executables which don't go +# into sbin/ or libexec/, but for installing executables the basic syntax +# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}") +# is enough, so using this variable there doesn't help a lot. +# The variable must not be used for installing plugins. +# Usage is like this: +# install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} ) +# +# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go +# into bin/. +# Later on it will be possible to extend this for installing OSX frameworks +# The COMPONENT Devel argument has the effect that static libraries belong to the +# "Devel" install component. If we use this also for all install() commands +# for header files, it will be possible to install +# -everything: make install OR cmake -P cmake_install.cmake +# -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake +# -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake +# This can then also be used for packaging with cpack. + +set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" + LIBRARY DESTINATION "${LIB_INSTALL_DIR}" + ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) + + diff -Nru qesteidutil-0.3.1/cmake/modules/PythonCompile.py qesteidutil-0.3.1/cmake/modules/PythonCompile.py --- qesteidutil-0.3.1/cmake/modules/PythonCompile.py 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/PythonCompile.py 2010-06-21 15:31:45.000000000 +0000 @@ -0,0 +1,4 @@ +# By Simon Edwards +# This file is in the public domain. +import py_compile +py_compile.main() diff -Nru qesteidutil-0.3.1/cmake/modules/PythonMacros.cmake qesteidutil-0.3.1/cmake/modules/PythonMacros.cmake --- qesteidutil-0.3.1/cmake/modules/PythonMacros.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/cmake/modules/PythonMacros.cmake 2010-06-21 15:31:45.000000000 +0000 @@ -0,0 +1,62 @@ +# Python macros +# ~~~~~~~~~~~~~ +# Copyright (c) 2007, Simon Edwards +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# This file defines the following macros: +# +# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR) +# Install the SOURCE_FILE, which is a Python .py file, into the +# destination directory during install. The file will be byte compiled +# and both the .py file and .pyc file will be installed. + +GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) + +MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) + + FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) + + ADD_CUSTOM_TARGET(compile_python_files ALL) + + # Install the source file. + INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) + + # Byte compile and install the .pyc file. + GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) + GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) + GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) + + if(WIN32) + string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") + endif(WIN32) + + SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) + SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) + + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) + + SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") + + GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) + IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. + ADD_CUSTOM_COMMAND( + TARGET compile_python_files + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} + DEPENDS ${_absfilename} + ) + ELSE(_abs_bin_py STREQUAL ${_absfilename}) + ADD_CUSTOM_COMMAND( + TARGET compile_python_files + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} + COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} + DEPENDS ${_absfilename} + ) + ENDIF(_abs_bin_py STREQUAL ${_absfilename}) + + INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) +ENDMACRO(PYTHON_INSTALL) diff -Nru qesteidutil-0.3.1/CMakeLists.txt qesteidutil-0.3.1/CMakeLists.txt --- qesteidutil-0.3.1/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/CMakeLists.txt 2011-07-06 16:50:13.000000000 +0000 @@ -0,0 +1,210 @@ +cmake_minimum_required(VERSION 2.6) +project(qesteidutil) + +# Custom cmake modules +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") + +include(InstallSettings) + +if(PKCS11_MODULE) + add_definitions(-DPKCS11_MODULE="${PKCS11_MODULE}") +endif(PKCS11_MODULE) + +find_package(Qt4 4.4.0 COMPONENTS QtCore QtGui QtNetwork QtWebkit QtXml REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(OpenSSLCrypto REQUIRED) +find_package(LibP11 REQUIRED) +find_package(SmartCardpp REQUIRED) +if(UNIX) + find_package(PCSCLite) +endif() + +if(WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN) +endif(WIN32) + +if(MSVC) + # Needed for smartcardpp + add_definitions(-D_SECURE_SCL=0) +endif(MSVC) + +set(QT_USE_QTNETWORK true) +set(QT_USE_QTWEBKIT true) +set(QT_USE_QTXML true) + +include(${QT_USE_FILE}) + +# try to find system copy of qtsingleapplication +find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES QtSolutions) +find_library(QTSINGLEAPPLICATION_LIBRARIES QtSolutions_SingleApplication-2.6) +if(QTSINGLEAPPLICATION_INCLUDE_DIRS AND QTSINGLEAPPLICATION_LIBRARIES) + message(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARIES}") +else() + message(STATUS "QtSingleApplication not found; using bundled copy") + add_subdirectory(qtsingleapplication) + set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/qtsingleapplication/src) + set(QTSINGLEAPPLICATION_LIBRARIES qtsingleapplication) +endif() + +set(qesteidutil_MOC_HDRS + common/CertificateWidget.h + common/PinDialog.h + common/Settings.h + common/sslConnect.h + common/sslConnect_p.h + src/CertUpdate.h + src/DiagnosticsDialog.h + src/SettingsDialog.h + src/jscardmanager.h + src/jscertdata.h + src/jsesteidcard.h + src/jsextender.h + src/mainwindow.h +) + +set(qesteidutil_HDRS + ${qesteidutil_MOC_HDRS} + common/SslCertificate.h + src/version.h +) + +QT4_WRAP_CPP(qesteidutil_MOC_SRCS ${qesteidutil_MOC_HDRS}) +set(qesteidutil_SRCS + ${qesteidutil_HDRS} + ${qesteidutil_MOC_SRCS} + common/CertificateWidget.cpp + common/PinDialog.cpp + common/SslCertificate.cpp + common/sslConnect.cpp + src/CertUpdate.cpp + src/DiagnosticsDialog.cpp + src/SettingsDialog.cpp + src/jscardmanager.cpp + src/jscertdata.cpp + src/jsesteidcard.cpp + src/jsextender.cpp + src/main.cpp + src/mainwindow.cpp +) + +QT4_WRAP_UI( UI_HEADERS + common/ui/CertificateWidget.ui + src/ui/DiagnosticsDialog.ui + src/ui/SettingsDialog.ui +) + +set(QM_DIR ${CMAKE_BINARY_DIR}) +configure_file(common/translations/common_tr.qrc.cmake ${QM_DIR}/common_tr.qrc) +configure_file(src/translations/tr.qrc.cmake ${QM_DIR}/tr.qrc) + +QT4_ADD_RESOURCES( qesteidutil_RCC_SRCS + ${QM_DIR}/common_tr.qrc + ${QM_DIR}/tr.qrc + src/qesteidutil.qrc +) + +QT4_ADD_TRANSLATION( QM_FILES + common/translations/common_en.ts + common/translations/common_et.ts + common/translations/common_ru.ts + common/translations/qt_et.ts + common/translations/qt_ru.ts + src/translations/en.ts + src/translations/et.ts + src/translations/ru.ts +) + +find_package(Subversion) +if (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) + Subversion_WC_INFO(${PROJECT_SOURCE_DIR} PROJECT) + message(STATUS "Current SVN revision is ${PROJECT_WC_REVISION}") + add_definitions(-DBUILD_VER=${PROJECT_WC_REVISION}) +else (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) + add_definitions(-DBUILD_VER=0) +endif (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) + +include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${LIBP11_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${PCSCLITE_INCLUDE_DIR} + ${QTSINGLEAPPLICATION_INCLUDE_DIRS} + ${SMARTCARDPP_INCLUDE_DIRS} +) + +if(APPLE) + set(APP_CONTENTS_DIR "${CMAKE_SOURCE_DIR}/mac") + set(LIBQJPEG_FILE "${QT_PLUGINS_DIR}/imageformats/libqjpeg.dylib") + + # xCode hacks + include_directories(/usr/local/include/../include) + + # Bundle resources + file(GLOB_RECURSE RESOURCE_FILES ${APP_CONTENTS_DIR}/Resources/*.icns ${APP_CONTENTS_DIR}/Resources/**/*.strings) + + foreach(_file ${RESOURCE_FILES}) + get_filename_component(_file_dir ${_file} PATH) + file(RELATIVE_PATH _file_dir ${APP_CONTENTS_DIR}/Resources ${_file_dir}) + set_source_files_properties(${_file} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${_file_dir}" ) + endforeach(_file) + + # Qt jpeg plugin + set(RESOURCE_FILES ${RESOURCE_FILES} ${LIBQJPEG_FILE}) + set_source_files_properties(${LIBQJPEG_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/imageformats" ) + + find_library(CARBON_LIBRARY Carbon) +endif(APPLE) + +IF(WIN32) + SET(qesteidutil_SRCS ${qesteidutil_SRCS} src/qesteidutil.rc) + SET(WIN_LIBRARIES ws2_32) +ENDIF(WIN32) + +add_executable(qesteidutil WIN32 MACOSX_BUNDLE + ${qesteidutil_SRCS} + ${QM_FILES} + ${qesteidutil_RCC_SRCS} + ${UI_HEADERS} + ${RESOURCE_FILES} +) + +if(APPLE) + configure_file( + ${APP_CONTENTS_DIR}/Info.plist.cmake + ${APP_CONTENTS_DIR}/Info.plist + @ONLY) + + set_target_properties(qesteidutil + PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${APP_CONTENTS_DIR}/Info.plist + ) +endif(APPLE) + +target_link_libraries(qesteidutil + ${QT_QTMAIN_LIBRARY} + ${QT_LIBRARIES} + ${LIBP11_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${OPENSSLCRYPTO_LIBRARIES} + ${QTSINGLEAPPLICATION_LIBRARIES} + ${SMARTCARDPP_LIBRARIES} + ${WIN_LIBRARIES} + ${CARBON_LIBRARY} +) + +if(UNIX AND NOT APPLE) + INSTALL(FILES qesteidutil.desktop DESTINATION ${SHARE_INSTALL_PREFIX}/applications) + + # Install icons + foreach(RES 16x16 32x32 48x48) + install( + FILES src/html/images/id_icon_${RES}.png + DESTINATION ${SHARE_INSTALL_PREFIX}/icons/hicolor/${RES}/apps/ + RENAME qesteidutil.png + ) + endforeach(RES) +endif(UNIX AND NOT APPLE) + +install(TARGETS qesteidutil DESTINATION ${BIN_INSTALL_DIR}) +install(FILES qesteidutil.1 DESTINATION ${MAN_INSTALL_DIR}/man1) diff -Nru qesteidutil-0.3.1/common/CertificateWidget.cpp qesteidutil-0.3.1/common/CertificateWidget.cpp --- qesteidutil-0.3.1/common/CertificateWidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/CertificateWidget.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,176 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "CertificateWidget.h" + +#include "ui_CertificateWidget.h" +#include "SslCertificate.h" + +#include +#include +#include +#include +#include +#include + +class CertificateDialogPrivate: public Ui::CertificateDialog +{ +public: + QSslCertificate cert; +}; + +CertificateDialog::CertificateDialog( QWidget *parent ) +: QDialog( parent ) +, d( new CertificateDialogPrivate ) +{ + d->setupUi( this ); + d->tabWidget->removeTab( 2 ); +} + +CertificateDialog::CertificateDialog( const QSslCertificate &cert, QWidget *parent ) +: QDialog( parent ) +, d( new CertificateDialogPrivate ) +{ + d->setupUi( this ); + setCertificate( cert ); + d->tabWidget->removeTab( 2 ); +} + +CertificateDialog::~CertificateDialog() { delete d; } + +void CertificateDialog::addItem( const QString &variable, const QString &value, const QVariant &valueext ) +{ + QTreeWidgetItem *t = new QTreeWidgetItem( d->parameters ); + t->setText( 0, variable ); + t->setText( 1, value ); + t->setData( 1, Qt::UserRole, valueext ); + d->parameters->addTopLevelItem( t ); +} + +void CertificateDialog::on_parameters_itemSelectionChanged() +{ + if ( !d->parameters->selectionModel()->hasSelection() || !d->parameters->selectedItems().size() ) + return; + if( !d->parameters->selectedItems().value(0)->data( 1, Qt::UserRole ).toString().isEmpty() ) + d->parameterContent->setPlainText( d->parameters->selectedItems().value(0)->data( 1, Qt::UserRole ).toString() ); + else + d->parameterContent->setPlainText( d->parameters->selectedItems().value(0)->text( 1 ) ); +} + +void CertificateDialog::save() +{ + QString file = QFileDialog::getSaveFileName( this, + tr("Save certificate"), + QString( "%1%2%3.cer" ) + .arg( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) ) + .arg( QDir::separator() ) + .arg( d->cert.subjectInfo( "serialNumber" ) ), + tr("Certificates (*.cer *.crt *.pem)") ); + if( file.isEmpty() ) + return; + + QFile f( file ); + if( f.open( QIODevice::WriteOnly ) ) + { + f.write( QFileInfo( file ).suffix().toLower() == "pem" ? d->cert.toPem() : d->cert.toDer() ); + f.close(); + } + else + QMessageBox::warning( this, tr("Save certificate"), tr("Failed to save file") ); +} + +void CertificateDialog::setCertificate( const QSslCertificate &cert ) +{ + d->cert = cert; + SslCertificate c = cert; + QString i; + QTextStream s( &i ); + s << "" << tr("Certificate Information") << "
"; + s << "
"; + s << "" << tr("This certificate is intended for following purpose(s):") << ""; + s << "
    "; + Q_FOREACH( const QString &ext, c.enhancedKeyUsage() ) + s << "
  • " << ext << "
  • "; + s << "
"; + s << "



"; + //s << tr("* Refer to the certification authority's statement for details.") << "
"; + s << "
"; + s << "

"; + s << "" << tr("Issued to:") << " " << c.subjectInfo( QSslCertificate::CommonName ); + s << "


"; + s << "" << tr("Issued by:") << " " << c.issuerInfo( QSslCertificate::CommonName ); + s << "


"; + s << "" << tr("Valid from") << " " << c.effectiveDate().toLocalTime().toString( "dd.MM.yyyy" ) << " "; + s << "" << tr("to") << " "<< c.expiryDate().toLocalTime().toString( "dd.MM.yyyy" ); + s << "

"; + d->info->setHtml( i ); + + addItem( tr("Version"), "V" + c.version() ); + addItem( tr("Serial number"), QString( "%1 (0x%2)" ) + .arg( c.serialNumber().constData() ) + .arg( QString::number( c.serialNumber().toInt(), 16 ) ) ); + addItem( tr("Signature algorithm"), "sha1RSA" ); + + QStringList text, textExt; + QList subjects; + subjects << "CN" << "OU" << "O" << "C"; + Q_FOREACH( const QByteArray &subject, subjects ) + { + const QString &data = c.issuerInfo( subject ); + if( data.isEmpty() ) + continue; + text << data; + textExt << QString( "%1 = %2" ).arg( subject.constData() ).arg( data ); + } + addItem( tr("Issuer"), text.join( ", " ), textExt.join( "\n" ) ); + addItem( tr("Valid from"), c.effectiveDate().toLocalTime().toString( "dd.MM.yyyy hh:mm:ss" ) ); + addItem( tr("Vaild to"), c.expiryDate().toLocalTime().toString( "dd.MM.yyyy hh:mm:ss" ) ); + + subjects.clear(); + text.clear(); + textExt.clear(); + subjects << "serialNumber" << "GN" << "SN" << "CN" << "OU" << "O" << "C"; + Q_FOREACH( const QByteArray &subject, subjects ) + { + const QString &data = c.subjectInfo( subject ); + if( data.isEmpty() ) + continue; + text << data; + textExt << QString( "%1 = %2" ).arg( subject.constData() ).arg( data ); + } + addItem( tr("Subject"), text.join( ", " ), textExt.join( "\n" ) ); + addItem( tr("Public key"), QString("%1 (%2)") + .arg( c.publicKey().algorithm() == QSsl::Rsa ? "RSA" : "DSA" ) + .arg( c.publicKey().length() ), + c.toHex( c.publicKey().toDer() ) ); + + QStringList enhancedKeyUsage = c.enhancedKeyUsage(); + if( !enhancedKeyUsage.isEmpty() ) + addItem( tr("Enhanched key usage"), enhancedKeyUsage.join( ", " ), enhancedKeyUsage.join( "\n" ) ); + QStringList policies = c.policies(); + if( !policies.isEmpty() ) + addItem( tr("Certificate policies"), policies.join( ", " ) ); + addItem( tr("Authority key identifier"), c.toHex( c.authorityKeyIdentifier() ) ); + addItem( tr("Subject key identifier"), c.toHex( c.subjectKeyIdentifier() ) ); + QStringList keyUsage = c.keyUsage().values(); + if( !keyUsage.isEmpty() ) + addItem( tr("Key usage"), keyUsage.join( ", " ), keyUsage.join( "\n" ) ); +} diff -Nru qesteidutil-0.3.1/common/CertificateWidget.h qesteidutil-0.3.1/common/CertificateWidget.h --- qesteidutil-0.3.1/common/CertificateWidget.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/CertificateWidget.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +#include + +class CertificateDialogPrivate; +class QSslCertificate; + +class CertificateDialog: public QDialog +{ + Q_OBJECT +public: + CertificateDialog( QWidget *parent = 0 ); + CertificateDialog( const QSslCertificate &cert, QWidget *parent = 0 ); + ~CertificateDialog(); + + void setCertificate( const QSslCertificate &cert ); + +private Q_SLOTS: + void on_parameters_itemSelectionChanged(); + void save(); + +private: + void addItem( const QString &variable, const QString &value, const QVariant &valueext = QVariant() ); + QByteArray addHexSeparators( const QByteArray &data ) const; + + CertificateDialogPrivate *d; +}; diff -Nru qesteidutil-0.3.1/common/CheckConnection.cpp qesteidutil-0.3.1/common/CheckConnection.cpp --- qesteidutil-0.3.1/common/CheckConnection.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/CheckConnection.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "CheckConnection.h" + +#include "Settings.h" + +#include +#include +#include +#include + +CheckConnection::CheckConnection( QObject *parent ) +: QNetworkAccessManager( parent ) +{ + connect( this, SIGNAL(finished(QNetworkReply*)), SLOT(stop(QNetworkReply*)) ); + Settings s; + s.beginGroup( "Client" ); + if( !s.value( "proxyHost" ).toString().isEmpty() ) + { + setProxy( QNetworkProxy( + QNetworkProxy::HttpProxy, + s.value( "proxyHost" ).toString(), + s.value( "proxyPort" ).toInt(), + s.value( "proxyUser" ).toString(), + s.value( "proxyPass" ).toString() ) ); + } +} + +bool CheckConnection::check( const QString &url ) +{ + running = true; + QNetworkReply *reply = get( QNetworkRequest( QUrl( url ) ) ); + + while( running ) + qApp->processEvents(); + + switch( reply->error() ) + { + case QNetworkReply::NoError: + return true; + case QNetworkReply::ProxyConnectionRefusedError: + case QNetworkReply::ProxyConnectionClosedError: + case QNetworkReply::ProxyNotFoundError: + case QNetworkReply::ProxyTimeoutError: + m_error = tr("Check proxy settings"); + return false; + case QNetworkReply::ProxyAuthenticationRequiredError: + m_error = tr("Check proxy username and password"); + return false; + default: + m_error = tr("Check internet connection"); + return false; + } +} + +QString CheckConnection::error() const { return m_error; } + +void CheckConnection::stop( QNetworkReply * ) { running = false; } diff -Nru qesteidutil-0.3.1/common/CheckConnection.h qesteidutil-0.3.1/common/CheckConnection.h --- qesteidutil-0.3.1/common/CheckConnection.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/CheckConnection.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class QNetworkReply; + +class CheckConnection: public QNetworkAccessManager +{ + Q_OBJECT + +public: + CheckConnection( QObject *parent = 0 ); + + bool check( const QString &url ); + QString error() const; + +private Q_SLOTS: + void stop( QNetworkReply *reply ); + +private: + QString m_error; + bool running; +}; diff -Nru qesteidutil-0.3.1/common/CMakeLists.txt qesteidutil-0.3.1/common/CMakeLists.txt --- qesteidutil-0.3.1/common/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/CMakeLists.txt 2010-01-05 10:58:30.000000000 +0000 @@ -0,0 +1,50 @@ +set( MOC_HEADERS + CheckConnection.h + CertificateWidget.h + ComboBox.h + Common.h + IKValidator.h + PinDialog.h + Settings.h + sslConnect.h + sslConnect_p.h + ) +QT4_WRAP_UI( UI_HEADERS + ui/CertificateWidget.ui + ) +set( HEADERS + ${MOC_HEADERS} + ${UI_HEADERS} + SslCertificate.h + ) +QT4_WRAP_CPP( MOC_SOURCES ${MOC_HEADERS} ) +set( SOURCES + ${HEADERS} + ${MOC_SOURCES} + CheckConnection.cpp + CertificateWidget.cpp + ComboBox.cpp + Common.cpp + IKValidator.cpp + PinDialog.cpp + SslCertificate.cpp + sslConnect.cpp + ) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${OPENSSL_INCLUDE_DIR} + ${LIBP11_INCLUDE_DIR} + ) + +if(APPLE) + # xCode hacks + include_directories(/usr/local/include/../include) +endif(APPLE) + +ADD_LIBRARY( + qdigidoccommon + STATIC + ${SOURCES} + ) diff -Nru qesteidutil-0.3.1/common/ComboBox.cpp qesteidutil-0.3.1/common/ComboBox.cpp --- qesteidutil-0.3.1/common/ComboBox.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/ComboBox.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * QDigiDocClient + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "ComboBox.h" + +#include + +ComboBox::ComboBox( QWidget *parent ) +: QComboBox( parent ) +{} + +void ComboBox::hack() +{ + QListView *v = new QListView( this ); + v->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + v->setMinimumHeight( 50 ); + v->setModel( model() ); + setView( v ); +} diff -Nru qesteidutil-0.3.1/common/ComboBox.h qesteidutil-0.3.1/common/ComboBox.h --- qesteidutil-0.3.1/common/ComboBox.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/ComboBox.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * QDigiDocClient + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class ComboBox: public QComboBox +{ + Q_OBJECT +public: + ComboBox( QWidget *parent = 0 ); + + void hack(); +}; diff -Nru qesteidutil-0.3.1/common/Common.cpp qesteidutil-0.3.1/common/Common.cpp --- qesteidutil-0.3.1/common/Common.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/Common.cpp 2010-09-29 21:18:24.000000000 +0000 @@ -0,0 +1,318 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "Common.h" + +#include +#include +#include +#include +#include +#include + +#ifdef Q_OS_WIN32 +#include +#include +#include + +#include +#include +#endif + +#ifdef Q_OS_MAC +#include +#endif + +#include "SslCertificate.h" + +Common::Common( QObject *parent ): QObject( parent ) {} + +bool Common::canWrite( const QString &filename ) +{ +#ifdef Q_OS_WIN32 + return QTemporaryFile( QFileInfo( filename ).absolutePath().append( "/XXXXXX" ) ).open(); +#else + QFileInfo file( filename ); + return file.isFile() ? file.isWritable() : QFileInfo( file.absolutePath() ).isWritable(); +#endif +} + +void Common::browse( const QUrl &url ) +{ + QUrl u = url; + u.setScheme( "file" ); + bool started = false; +#if defined(Q_OS_WIN32) + started = QProcess::startDetached( "explorer", QStringList() << "/select," << + QDir::toNativeSeparators( u.toLocalFile() ) ); +#elif defined(Q_OS_MAC) + started = QProcess::startDetached("/usr/bin/osascript", QStringList() << + "-e" << "on run argv" << + "-e" << "set vfile to POSIX file (item 1 of argv)" << + "-e" << "tell application \"Finder\"" << + "-e" << "select vfile" << + "-e" << "activate" << + "-e" << "end tell" << + "-e" << "end run" << + // Commandline arguments + u.toLocalFile()); +#endif + if( started ) + return; + QDesktopServices::openUrl( QUrl::fromLocalFile( QFileInfo( u.toLocalFile() ).absolutePath() ) ); +} + +QString Common::fileSize( quint64 bytes ) +{ + const quint64 kb = 1024; + const quint64 mb = 1024 * kb; + const quint64 gb = 1024 * mb; + const quint64 tb = 1024 * gb; + if( bytes >= tb ) + return QString( "%1 TB" ).arg( qreal(bytes) / tb, 0, 'f', 3 ); + if( bytes >= gb ) + return QString( "%1 GB" ).arg( qreal(bytes) / gb, 0, 'f', 2 ); + if( bytes >= mb ) + return QString( "%1 MB" ).arg( qreal(bytes) / mb, 0, 'f', 1 ); + if( bytes >= kb ) + return QString( "%1 KB" ).arg( bytes / kb ); + return QString( "%1 B" ).arg( bytes ); +} + +void Common::mailTo( const QUrl &url ) +{ +#if defined(Q_OS_WIN32) + QString file = url.queryItemValue( "attachment" ); + QByteArray filePath = QDir::toNativeSeparators( file ).toLatin1(); + QByteArray fileName = QFileInfo( file ).fileName().toLatin1(); + QByteArray subject = url.queryItemValue( "subject" ).toLatin1(); + + MapiFileDesc doc[1]; + doc[0].ulReserved = 0; + doc[0].flFlags = 0; + doc[0].nPosition = -1; + doc[0].lpszPathName = const_cast(filePath.constData()); + doc[0].lpszFileName = const_cast(fileName.constData()); + doc[0].lpFileType = NULL; + + // Create message + MapiMessage message; + message.ulReserved = 0; + message.lpszSubject = const_cast(subject.constData()); + message.lpszNoteText = ""; + message.lpszMessageType = NULL; + message.lpszDateReceived = NULL; + message.lpszConversationID = NULL; + message.flFlags = 0; + message.lpOriginator = NULL; + message.nRecipCount = 0; + message.lpRecips = NULL; + message.nFileCount = 1; + message.lpFiles = (lpMapiFileDesc)&doc; + + QLibrary lib("mapi32"); + typedef ULONG (PASCAL *SendMail)(ULONG,ULONG,MapiMessage*,FLAGS,ULONG); + SendMail mapi = (SendMail)lib.resolve("MAPISendMail"); + if( mapi ) + { + mapi( NULL, 0, &message, MAPI_LOGON_UI|MAPI_DIALOG, 0 ); + return; + } +#elif defined(Q_OS_MAC) + CFURLRef emailUrl = CFURLCreateWithString(kCFAllocatorDefault, CFSTR("mailto:info@example.com"), NULL), appUrl = NULL; + bool started = false; + if(LSGetApplicationForURL(emailUrl, kLSRolesEditor, NULL, &appUrl) == noErr) + { + CFStringRef appPath = CFURLCopyFileSystemPath(appUrl, kCFURLPOSIXPathStyle); + if(appPath != NULL) + { + if(CFStringCompare(appPath, CFSTR("/Applications/Mail.app"), 0) == kCFCompareEqualTo) + { + started = QProcess::startDetached("/usr/bin/osascript", QStringList() << + "-e" << "on run argv" << + "-e" << "set vattachment to (item 1 of argv)" << + "-e" << "set vsubject to (item 2 of argv)" << + "-e" << "tell application \"Mail\"" << + "-e" << "set composeMessage to make new outgoing message at beginning with properties {visible:true}" << + "-e" << "tell composeMessage" << + "-e" << "set subject to vsubject" << + "-e" << "set content to \" \"" << + "-e" << "tell content" << + "-e" << "make new attachment with properties {file name: vattachment} at after the last word of the last paragraph" << + "-e" << "end tell" << + "-e" << "end tell" << + "-e" << "activate" << + "-e" << "end tell" << + "-e" << "end run" << + // Commandline arguments + url.queryItemValue("attachment") << + url.queryItemValue("subject")); + } + else if(CFStringFind(appPath, CFSTR("Entourage"), 0).location != kCFNotFound) + { + started = QProcess::startDetached("/usr/bin/osascript", QStringList() << + "-e" << "on run argv" << + "-e" << "set vattachment to (item 1 of argv)" << + "-e" << "set vsubject to (item 2 of argv)" << + "-e" << "tell application \"Microsoft Entourage\"" << + "-e" << "set vmessage to make new outgoing message with properties" << + "-e" << "{subject:vsubject, attachments:vattachment}" << + "-e" << "open vmessage" << + "-e" << "activate" << + "-e" << "end tell" << + "-e" << "end run" << + // Commandline arguments + url.queryItemValue("attachment") << + url.queryItemValue("subject")); + } + else if(CFStringCompare(appPath, CFSTR("/Applications/Thunderbird.app"), 0) == kCFCompareEqualTo) + { + // TODO: Handle Thunderbird here? Impossible? + } + CFRelease(appPath); + } + CFRelease(appUrl); + } + CFRelease(emailUrl); + if( started ) + return; +#elif defined(Q_OS_LINUX) + QByteArray thunderbird; + QProcess p; + QStringList env = QProcess::systemEnvironment(); + if( env.indexOf( QRegExp("KDE_FULL_SESSION.*") ) != -1 ) + { + p.start( "kreadconfig", QStringList() + << "--file" << "emaildefaults" + << "--group" << "PROFILE_Default" + << "--key" << "EmailClient" ); + p.waitForFinished(); + QByteArray data = p.readAllStandardOutput().trimmed(); + if( data.contains("thunderbird") ) + thunderbird = data; + } + else if( env.indexOf( QRegExp("GNOME_DESKTOP_SESSION_ID.*") ) != -1 ) + { + p.start( "gconftool-2", QStringList() + << "--get" << "/desktop/gnome/url-handlers/mailto/command" ); + p.waitForFinished(); + QByteArray data = p.readAllStandardOutput(); + if( data.contains("thunderbird") ) + thunderbird = data.split(' ').value(0); + } + /* + else + { + p.start( "xprop", QStringList() << "-root" << "_DT_SAVE_MODE" ); + p.waitForFinished(); + if( p.readAllStandardOutput().contains("xfce4") ) + {} + }*/ + + if( !thunderbird.isEmpty() ) + { + if( p.startDetached( thunderbird, QStringList() << "-compose" + << QString( "subject='%1',attachment='%2,'" ) + .arg( url.queryItemValue( "subject" ) ) + .arg( QUrl::fromLocalFile( url.queryItemValue( "attachment" ) ).toString() ) ) ); + return; + } + else + { + if( p.startDetached( "xdg-email", QStringList() + << "--subject" << url.queryItemValue( "subject" ) + << "--attach" << url.queryItemValue( "attachment" ) ) ) + return; + } +#endif + QDesktopServices::openUrl( url ); +} + +void Common::showHelp( const QString &msg ) +{ + QUrl u( "http://code.google.com/p/esteid/" ); + u.addQueryItem( "searchquery", msg ); + u.addQueryItem( "searchtype", "all" ); + u.addQueryItem( "_m", "core" ); + u.addQueryItem( "_a", "searchclient" ); + QDesktopServices::openUrl( u ); +} + +bool Common::startDetached( const QString &program ) +{ return startDetached( program, QStringList() ); } + +bool Common::startDetached( const QString &program, const QStringList &arguments ) +{ +#ifdef Q_OS_MAC + return QProcess::startDetached( "/usr/bin/open", QStringList() << "-a" << program << arguments ); +#else + return QProcess::startDetached( program, arguments ); +#endif +} + +QString Common::tokenInfo( CertType type, const QString &card, const QSslCertificate &cert ) +{ + QString content; + QTextStream s( &content ); + SslCertificate c( cert ); + + s << "
"; + if( c.isTempel() ) + { + s << tr("Company") << ": " + << c.toString( "CN" ) << "
"; + s << tr("Register code") << ": " + << c.subjectInfo( "serialNumber" ) << "
"; + } + else + { + s << tr("Name") << ": " + << c.toString( "GN SN" ) << "
"; + s << tr("Personal code") << ": " + << c.subjectInfo( "serialNumber" ) << "
"; + } + s << tr("Card in reader") << ": " << card << "
"; + + bool willExpire = c.expiryDate().toLocalTime() <= QDateTime::currentDateTime().addDays( 105 ); + s << (type == AuthCert ? tr("Auth certificate is") : tr("Sign certificate is") ) << " "; + if( c.isValid() ) + { + s << "" << tr("valid") << ""; + if( willExpire ) + s << "
" << tr("Your certificates will expire soon") << ""; + } + else + s << "" << tr("expired") << ""; + + s << "
"; + if( !c.isValid() || willExpire ) + { + s << "
" + "" << tr("Open utility") << "
"; + } + else if( c.isTempel() ) + s << ""; + else + s << ""; + s << "
"; + + return content; +} diff -Nru qesteidutil-0.3.1/common/Common.h qesteidutil-0.3.1/common/Common.h --- qesteidutil-0.3.1/common/Common.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/Common.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class QSslCertificate; +class QStringList; +class QUrl; + +class Common: public QObject +{ + Q_OBJECT +public: + enum CertType + { + AuthCert, + SignCert, + }; + Common( QObject *parent = 0 ); + + static bool canWrite( const QString &filename ); + static QString fileSize( quint64 bytes ); + static void showHelp( const QString &msg ); + static bool startDetached( const QString &program ); + static bool startDetached( const QString &program, const QStringList &arguments ); + static QString tokenInfo( CertType type, const QString &card, const QSslCertificate &cert ); + +public Q_SLOTS: + void browse( const QUrl &url ); + void mailTo( const QUrl &url ); +}; diff -Nru qesteidutil-0.3.1/common/IKValidator.cpp qesteidutil-0.3.1/common/IKValidator.cpp --- qesteidutil-0.3.1/common/IKValidator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/IKValidator.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "IKValidator.h" + +#include + +IKValidator::IKValidator( QObject *parent ) +: QValidator( parent ) +{} + +bool IKValidator::isValid( const QString &ik ) +{ + if( ik.size() != 11 ) return false; + + // Validate date + int year = 0; + switch( ik.left( 1 ).toUInt() ) + { + case 1: case 2: year = 1800; break; + case 3: case 4: year = 1900; break; + case 5: case 6: year = 2000; break; + case 7: case 8: year = 2100; break; + default: return false; + } + + if( !QDate::isValid( + ik.mid( 1, 2 ).toUInt() + year, + ik.mid( 3, 2 ).toUInt(), + ik.mid( 5, 2 ).toUInt() ) ) + return false; + + // Validate checksum + int sum1 = 0, sum2 = 0, pos1 = 1, pos2 = 3; + for( int i = 0; i < 10; ++i ) + { + sum1 += ik.mid( i, 1 ).toUInt() * pos1; + sum2 += ik.mid( i, 1 ).toUInt() * pos2; + pos1 = pos1 == 9 ? 1 : pos1 + 1; + pos2 = pos2 == 9 ? 1 : pos2 + 1; + } + + int result; + if( (result = sum1 % 11) >= 10 && + (result = sum2 % 11) >= 10 ) + result = 0; + + return ik.right( 1 ).toInt() == result; +} + +QValidator::State IKValidator::validate( QString &input, int &pos ) const +{ + if( input.size() > 11 || !QRegExp( "\\d{0,11}" ).exactMatch( input ) ) + return Invalid; + else if( input.size() == 11 ) + return isValid( input ) ? Acceptable : Invalid; + else + return Intermediate; +} diff -Nru qesteidutil-0.3.1/common/IKValidator.h qesteidutil-0.3.1/common/IKValidator.h --- qesteidutil-0.3.1/common/IKValidator.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/IKValidator.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class IKValidator: public QValidator +{ + Q_OBJECT + +public: + IKValidator( QObject *parent ); + + static bool isValid( const QString &ik ); + State validate( QString &input, int &pos ) const; +}; diff -Nru qesteidutil-0.3.1/common/images/common_images.qrc qesteidutil-0.3.1/common/images/common_images.qrc --- qesteidutil-0.3.1/common/images/common_images.qrc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/images/common_images.qrc 2009-07-03 15:39:47.000000000 +0000 @@ -0,0 +1,12 @@ + + + ico_delete.png + ico_person_blue_16.png + ico_person_blue_75.png + ico_save.png + ico_stamp_blue_16.png + ico_stamp_blue_75.png + languages_button.png + warning.png + + Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_delete.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_delete.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_person_blue_16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_person_blue_16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_person_blue_75.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_person_blue_75.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_save.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_save.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_stamp_blue_16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_stamp_blue_16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/ico_stamp_blue_75.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/ico_stamp_blue_75.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/languages_button.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/languages_button.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/common/images/warning.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/common/images/warning.png differ diff -Nru qesteidutil-0.3.1/common/PinDialog.cpp qesteidutil-0.3.1/common/PinDialog.cpp --- qesteidutil-0.3.1/common/PinDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/PinDialog.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,114 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "PinDialog.h" + +#include "SslCertificate.h" + +#include +#include +#include +#include +#include +#include + +PinDialog::PinDialog( QWidget *parent ) +: QDialog( parent ) +{} + +PinDialog::PinDialog( PinType type, const QSslCertificate &cert, QWidget *parent ) +: QDialog( parent ) +{ + SslCertificate c = cert; + init( type, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); +} + +PinDialog::PinDialog( PinType type, const QString &title, QWidget *parent ) +: QDialog( parent ) +{ init( type, title ); } + +void PinDialog::init( PinType type, const QString &title ) +{ + setWindowModality( Qt::ApplicationModal ); + setWindowTitle( title ); + + QLabel *label = new QLabel( this ); + QVBoxLayout *l = new QVBoxLayout( this ); + l->addWidget( label ); + + switch( type ) + { + case Pin1Type: + label->setText( QString( "%1
%2
%3" ) + .arg( title ) + .arg( tr("Selected action requires auth certificate.") ) + .arg( tr("For using auth certificate enter PIN1") ) ); + regexp.setPattern( "\\d{4,12}" ); + break; + case Pin2Type: + label->setText( QString( "%1
%2
%3" ) + .arg( title ) + .arg( tr("Selected action requires sign certificate.") ) + .arg( tr("For using sign certificate enter PIN2") ) ); + regexp.setPattern( "\\d{5,12}" ); + break; + case Pin1PinpadType: +#if QT_VERSION >= 0x040500 + setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint ); +#endif + label->setText( QString( "%1
%2
%3" ) + .arg( title ) + .arg( tr("Selected action requires auth certificate.") ) + .arg( tr("For using auth certificate enter PIN1 with pinpad") ) ); + return; + case Pin2PinpadType: +#if QT_VERSION >= 0x040500 + setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint ); +#endif + label->setText( QString( "%1
%2
%3" ) + .arg( title ) + .arg( tr("Selected action requires sign certificate.") ) + .arg( tr("For using sign certificate enter PIN2 with pinpad") ) ); + return; + } + + m_text = new QLineEdit( this ); + m_text->setEchoMode( QLineEdit::Password ); + m_text->setFocus(); + m_text->setValidator( new QRegExpValidator( regexp, m_text ) ); + connect( m_text, SIGNAL(textEdited(QString)), SLOT(textEdited(QString)) ); + l->addWidget( m_text ); + + QDialogButtonBox *buttons = new QDialogButtonBox( + QDialogButtonBox::Ok|QDialogButtonBox::Cancel, Qt::Horizontal, this ); + ok = buttons->button( QDialogButtonBox::Ok ); + ok->setAutoDefault( true ); + connect( buttons, SIGNAL(accepted()), SLOT(accept()) ); + connect( buttons, SIGNAL(rejected()), SLOT(reject()) ); + l->addWidget( buttons ); + + textEdited( QString() ); +} + +QString PinDialog::text() const { return m_text->text(); } + +void PinDialog::textEdited( const QString &text ) +{ ok->setEnabled( regexp.exactMatch( text ) ); } diff -Nru qesteidutil-0.3.1/common/PinDialog.h qesteidutil-0.3.1/common/PinDialog.h --- qesteidutil-0.3.1/common/PinDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/PinDialog.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +#include + +class QLineEdit; +class QSslCertificate; + +class PinDialog: public QDialog +{ + Q_OBJECT +public: + enum PinType + { + Pin1Type, + Pin2Type, + Pin1PinpadType, + Pin2PinpadType, + }; + PinDialog( QWidget *parent = 0 ); + PinDialog( PinType type, const QSslCertificate &cert, QWidget *parent = 0 ); + PinDialog( PinType type, const QString &title, QWidget *parent = 0 ); + void init( PinType type, const QString &title ); + + QString text() const; + +private Q_SLOTS: + void textEdited( const QString &text ); + +private: + + QLineEdit *m_text; + QPushButton *ok; + QRegExp regexp; +}; diff -Nru qesteidutil-0.3.1/common/Settings.h qesteidutil-0.3.1/common/Settings.h --- qesteidutil-0.3.1/common/Settings.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/Settings.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class Settings : public QSettings +{ + Q_OBJECT + +public: + Settings( QObject *parent = 0 ) + : QSettings( "Estonian ID Card", QString(), parent ) {} +}; diff -Nru qesteidutil-0.3.1/common/SslCertificate.cpp qesteidutil-0.3.1/common/SslCertificate.cpp --- qesteidutil-0.3.1/common/SslCertificate.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/SslCertificate.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,436 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "SslCertificate.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static QByteArray ASN_STRING_to_QByteArray( ASN1_OCTET_STRING *str ) +{ return QByteArray( (const char *)ASN1_STRING_data(str), ASN1_STRING_length(str) ); } + + + +SslCertificate::SslCertificate( const QSslCertificate &cert ) +: QSslCertificate( cert ) {} + +QByteArray SslCertificate::authorityKeyIdentifier() const +{ + AUTHORITY_KEYID *id = (AUTHORITY_KEYID *)getExtension( NID_authority_key_identifier ); + QByteArray out; + if( id && id->keyid ) + out = ASN_STRING_to_QByteArray( id->keyid ); + AUTHORITY_KEYID_free( id ); + return out; +} + +QStringList SslCertificate::enhancedKeyUsage() const +{ + EXTENDED_KEY_USAGE *usage = (EXTENDED_KEY_USAGE*)getExtension( NID_ext_key_usage ); + if( !usage ) + return QStringList() << QCoreApplication::translate("SslCertificate", "All application policies"); + + QStringList list; + for( int i = 0; i < sk_ASN1_OBJECT_num( usage ); ++i ) + { + ASN1_OBJECT *obj = sk_ASN1_OBJECT_value( usage, i ); + switch( OBJ_obj2nid( obj ) ) + { + case NID_client_auth: + list << QCoreApplication::translate("SslCertificate", "Proves your identity to a remote computer"); break; + case NID_email_protect: + list << QCoreApplication::translate("SslCertificate", "Protects e-mail messages"); break; + case NID_OCSP_sign: + list << QCoreApplication::translate("SslCertificate", "OCSP signing"); break; + default: break; + } + } + sk_ASN1_OBJECT_pop_free( usage, ASN1_OBJECT_free ); + return list; +} + +QString SslCertificate::formatDate( const QDateTime &date, const QString &format ) +{ + int pos = format.indexOf( "MMMM" ); + if( pos == -1 ) + return date.toString( format ); + QString d = date.toString( QString( format ).remove( pos, 4 ) ); + return d.insert( pos, QLocale().monthName( date.date().month() ) ); +} + +QString SslCertificate::formatName( const QString &name ) +{ + QString ret = name.toLower(); + bool firstChar = true; + for( QString::iterator i = ret.begin(); i != ret.end(); ++i ) + { + if( !firstChar && !i->isLetter() ) + firstChar = true; + + if( firstChar && i->isLetter() ) + { + *i = i->toUpper(); + firstChar = false; + } + } + return ret; +} + +QSslCertificate SslCertificate::fromX509( Qt::HANDLE x509 ) +{ + unsigned char *cert = NULL; + int len = i2d_X509( (X509*)x509, &cert ); + QByteArray der; + if( len >= 0 ) + der = QByteArray( (char*)cert, len ); + OPENSSL_free( cert ); + return QSslCertificate( der, QSsl::Der ); +} + +QSslKey SslCertificate::keyFromEVP( Qt::HANDLE evp ) +{ + EVP_PKEY *key = (EVP_PKEY*)evp; + unsigned char *data = NULL; + int len = 0; + QSsl::KeyAlgorithm alg; + QSsl::KeyType type; + + switch( EVP_PKEY_type( key->type ) ) + { + case EVP_PKEY_RSA: + { + RSA *rsa = EVP_PKEY_get1_RSA( key ); + alg = QSsl::Rsa; + type = rsa->d ? QSsl::PrivateKey : QSsl::PublicKey; + len = rsa->d ? i2d_RSAPrivateKey( rsa, &data ) : i2d_RSAPublicKey( rsa, &data ); + RSA_free( rsa ); + break; + } + case EVP_PKEY_DSA: + { + DSA *dsa = EVP_PKEY_get1_DSA( key ); + alg = QSsl::Dsa; + type = dsa->priv_key ? QSsl::PrivateKey : QSsl::PublicKey; + len = dsa->priv_key ? i2d_DSAPrivateKey( dsa, &data ) : i2d_DSAPublicKey( dsa, &data ); + DSA_free( dsa ); + break; + } + default: break; + } + + QSslKey k; + if( len > 0 ) + k = QSslKey( QByteArray( (char*)data, len ), alg, QSsl::Der, type ); + OPENSSL_free( data ); + + return k; +} + +void* SslCertificate::getExtension( int nid ) const +{ + if( !handle() ) + return NULL; + return X509_get_ext_d2i( (X509*)handle(), nid, NULL, NULL ); +} + +QString SslCertificate::issuerInfo( SubjectInfo subject ) const +{ return issuerInfo( subjectInfoToString( subject ) ); } + +QString SslCertificate::issuerInfo( const QByteArray &tag ) const +{ + if( !handle() ) + return QString(); + + BIO *bio = BIO_new( BIO_s_mem() ); + X509_NAME_print_ex( bio, X509_get_issuer_name((X509*)handle()), 0, + ASN1_STRFLGS_UTF8_CONVERT | + ASN1_STRFLGS_DUMP_UNKNOWN | + ASN1_STRFLGS_DUMP_DER | + XN_FLAG_SEP_MULTILINE | + XN_FLAG_DUMP_UNKNOWN_FIELDS | + XN_FLAG_FN_SN ); + + char *data = NULL; + long len = BIO_get_mem_data( bio, &data ); + QString string = QString::fromUtf8( data, len ); + BIO_free( bio ); + return mapFromOnlineName( string ).value( tag ); +} + +bool SslCertificate::isTempel() const +{ + Q_FOREACH( const QString &p, policies() ) + if( p.left( 19 ) == "1.3.6.1.4.1.10015.7" ) + return true; + return false; +} + +bool SslCertificate::isTest() const +{ + Q_FOREACH( const QString &p, policies() ) + if( p.left( 19 ) == "1.3.6.1.4.1.10015.3" ) + return true; + return false; +} + +QHash SslCertificate::keyUsage() const +{ + ASN1_BIT_STRING *keyusage = (ASN1_BIT_STRING*)getExtension( NID_key_usage ); + if( !keyusage ) + return QHash(); + + QHash list; + for( int n = 0; n < 9; ++n ) + { + if( ASN1_BIT_STRING_get_bit( keyusage, n ) ) + { + switch( n ) + { + case DigitalSignature: list[n] = QCoreApplication::translate("SslCertificate", "Digital signature"); break; + case NonRepudiation: list[n] = QCoreApplication::translate("SslCertificate", "Non repudiation"); break; + case KeyEncipherment: list[n] = QCoreApplication::translate("SslCertificate", "Key encipherment"); break; + case DataEncipherment: list[n] = QCoreApplication::translate("SslCertificate", "Data encipherment"); break; + case KeyAgreement: list[n] = QCoreApplication::translate("SslCertificate", "Key agreement"); break; + case KeyCertificateSign: list[n] = QCoreApplication::translate("SslCertificate", "Key certificate sign"); break; + case CRLSign: list[n] = QCoreApplication::translate("SslCertificate", "CRL sign"); break; + case EncipherOnly: list[n] = QCoreApplication::translate("SslCertificate", "Encipher only"); break; + case DecipherOnly: list[n] = QCoreApplication::translate("SslCertificate", "Decipher only"); break; + default: break; + } + } + } + ASN1_BIT_STRING_free( keyusage ); + return list; +} + +QMap SslCertificate::mapFromOnlineName( const QString &name ) const +{ + QMap info; + Q_FOREACH( const QString item, name.split( "\n" ) ) + { + QStringList split = item.split( "=" ); + info[split.value(0)] = split.value(1); + } + return info; +} + +QStringList SslCertificate::policies() const +{ + CERTIFICATEPOLICIES *cp = (CERTIFICATEPOLICIES*)getExtension( NID_certificate_policies ); + if( !cp ) + return QStringList(); + + QStringList list; + for( int i = 0; i < sk_POLICYINFO_num( cp ); ++i ) + { + POLICYINFO *pi = sk_POLICYINFO_value( cp, i ); + char buf[50]; + memset( buf, 0, 50 ); + int len = OBJ_obj2txt( buf, 50, pi->policyid, 1 ); + if( len != NID_undef ) + list << buf; + } + sk_POLICYINFO_pop_free( cp, POLICYINFO_free ); + return list; +} + +QString SslCertificate::policyInfo( const QString &index ) const +{ +#if 0 + for( int j = 0; j < sk_POLICYQUALINFO_num( pi->qualifiers ); ++j ) + { + POLICYQUALINFO *pqi = sk_POLICYQUALINFO_value( pi->qualifiers, j ); + + memset( buf, 0, 50 ); + int len = OBJ_obj2txt( buf, 50, pqi->pqualid, 1 ); + qDebug() << buf; + } +#endif + return QString(); +} + +QString SslCertificate::subjectInfo( SubjectInfo subject ) const +{ return subjectInfo( subjectInfoToString( subject ) ); } + +QString SslCertificate::subjectInfo( const QByteArray &tag ) const +{ + if( !handle() ) + return QString(); + + BIO *bio = BIO_new( BIO_s_mem() ); + X509_NAME_print_ex( bio, X509_get_subject_name((X509*)handle()), 0, + ASN1_STRFLGS_UTF8_CONVERT | + ASN1_STRFLGS_DUMP_UNKNOWN | + ASN1_STRFLGS_DUMP_DER | + XN_FLAG_SEP_MULTILINE | + XN_FLAG_DUMP_UNKNOWN_FIELDS | + XN_FLAG_FN_SN ); + + char *data = NULL; + long len = BIO_get_mem_data( bio, &data ); + QString string = QString::fromUtf8( data, len ); + BIO_free( bio ); + return mapFromOnlineName( string ).value( tag ); +} + +QByteArray SslCertificate::subjectInfoToString( SubjectInfo info ) const +{ + switch( info ) + { + case QSslCertificate::Organization: return "O"; + case QSslCertificate::CommonName: return "CN"; + case QSslCertificate::LocalityName: return "L"; + case QSslCertificate::OrganizationalUnitName: return "OU"; + case QSslCertificate::CountryName: return "C"; + case QSslCertificate::StateOrProvinceName: return "ST"; + default: return ""; + } +} + +QByteArray SslCertificate::subjectKeyIdentifier() const +{ + ASN1_OCTET_STRING *id = (ASN1_OCTET_STRING *)getExtension( NID_subject_key_identifier ); + if( !id ) + return QByteArray(); + QByteArray out = ASN_STRING_to_QByteArray( id ); + ASN1_OCTET_STRING_free( id ); + return out; +} + +QByteArray SslCertificate::toHex( const QByteArray &in, QChar separator ) +{ + QByteArray ret = in.toHex().toUpper(); + for( int i = 2; i < ret.size(); i += 3 ) + ret.insert( i, separator ); + return ret; +} + +QString SslCertificate::toString( const QString &format ) const +{ + QRegExp r( "[a-zA-Z]+" ); + QString ret = format; + int pos = 0; + while( (pos = r.indexIn( format, pos )) != -1 ) + { + ret.replace( r.cap(0), subjectInfo( r.cap(0).toLatin1() ) ); + pos += r.matchedLength(); + } + return formatName( ret ); +} + +#if QT_VERSION < 0x040600 +// Workaround qt bugs < 4.6 +QByteArray SslCertificate::serialNumber() const +{ + if( !handle() ) + return QByteArray(); + return QByteArray::number( qlonglong(ASN1_INTEGER_get( ((X509*)handle())->cert_info->serialNumber )) ); +} + +QByteArray SslCertificate::version() const +{ + if( !handle() ) + return QByteArray(); + return QByteArray::number( qlonglong(ASN1_INTEGER_get( ((X509*)handle())->cert_info->version )) + 1 ); +} + +#endif + + + +class PKCS12CertificatePrivate +{ +public: + PKCS12CertificatePrivate(): error(PKCS12Certificate::Unknown) {} + void init( const QByteArray &data, const QByteArray &pin ); + void setLastError(); + + QSslCertificate cert; + QSslKey key; + PKCS12Certificate::ErrorType error; + QString errorString; +}; + +void PKCS12CertificatePrivate::init( const QByteArray &data, const QByteArray &pin ) +{ + BIO *bio = BIO_new_mem_buf( const_cast(data.constData()), data.size() ); + if( !bio ) + return setLastError(); + + PKCS12 *p12 = d2i_PKCS12_bio( bio, NULL ); + BIO_free( bio ); + if( !p12 ) + return setLastError(); + + X509 *c = NULL; + EVP_PKEY *k = NULL; + int ret = PKCS12_parse( p12, pin.constData(), &k, &c, NULL ); + PKCS12_free( p12 ); + if( !ret ) + return setLastError(); + + cert = SslCertificate::fromX509( Qt::HANDLE(c) ); + key = SslCertificate::keyFromEVP( Qt::HANDLE(k) ); + + X509_free( c ); + EVP_PKEY_free( k ); +} + +void PKCS12CertificatePrivate::setLastError() +{ + unsigned long err = ERR_get_error(); + if( ERR_GET_LIB(err) == ERR_LIB_PKCS12 ) + { + switch( ERR_GET_REASON(err) ) + { + case PKCS12_R_MAC_VERIFY_FAILURE: error = PKCS12Certificate::InvalidPassword; break; + default: error = PKCS12Certificate::Unknown; break; + } + } + else + error = PKCS12Certificate::Unknown; + errorString = ERR_error_string( err, NULL ); +} + + + +PKCS12Certificate::PKCS12Certificate( QIODevice *device, const QByteArray &pin ) +: d(new PKCS12CertificatePrivate) +{ if( device ) d->init( device->readAll(), pin ); } + +PKCS12Certificate::PKCS12Certificate( const QByteArray &data, const QByteArray &pin ) +: d(new PKCS12CertificatePrivate) +{ d->init( data, pin ); } + +PKCS12Certificate::~PKCS12Certificate() { delete d; } +QSslCertificate PKCS12Certificate::certificate() const { return d->cert; } +PKCS12Certificate::ErrorType PKCS12Certificate::error() const { return d->error; } +QString PKCS12Certificate::errorString() const { return d->errorString; } +bool PKCS12Certificate::isNull() const { return d->cert.isNull() && d->key.isNull(); } +QSslKey PKCS12Certificate::key() const { return d->key; } diff -Nru qesteidutil-0.3.1/common/SslCertificate.h qesteidutil-0.3.1/common/SslCertificate.h --- qesteidutil-0.3.1/common/SslCertificate.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/SslCertificate.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +#include + +class SslCertificate: public QSslCertificate +{ +public: + enum KeyUsage + { + DigitalSignature = 0, + NonRepudiation, + KeyEncipherment, + DataEncipherment, + KeyAgreement, + KeyCertificateSign, + CRLSign, + EncipherOnly, + DecipherOnly, + }; + + SslCertificate( const QSslCertificate &cert ); + + QByteArray authorityKeyIdentifier() const; + QStringList enhancedKeyUsage() const; + static QString formatDate( const QDateTime &date, const QString &format ); + static QString formatName( const QString &name ); + static QSslCertificate fromX509( Qt::HANDLE x509 ); + static QSslKey keyFromEVP( Qt::HANDLE evp ); + QString issuerInfo( SubjectInfo info ) const; + QString issuerInfo( const QByteArray &tag ) const; + bool isTempel() const; + bool isTest() const; + QHash keyUsage() const; + QStringList policies() const; + QString policyInfo( const QString &oid ) const; + QString subjectInfo( SubjectInfo subject ) const; + QString subjectInfo( const QByteArray &tag ) const; + QByteArray subjectKeyIdentifier() const; + static QByteArray toHex( const QByteArray &in, QChar separator = ' ' ); + QString toString( const QString &format ) const; + +#if QT_VERSION < 0x040600 + QByteArray serialNumber() const; + QByteArray version() const; +#endif + +private: + void* getExtension( int nid ) const; + QByteArray subjectInfoToString( SubjectInfo info ) const; + QMap mapFromOnlineName( const QString &name ) const; +}; + +class PKCS12CertificatePrivate; +class PKCS12Certificate +{ +public: + enum ErrorType + { + InvalidPassword = 1, + Unknown = -1, + }; + PKCS12Certificate( QIODevice *device, const QByteArray &pin ); + PKCS12Certificate( const QByteArray &data, const QByteArray &pin ); + ~PKCS12Certificate(); + + QSslCertificate certificate() const; + ErrorType error() const; + QString errorString() const; + bool isNull() const; + QSslKey key() const; + +private: + PKCS12CertificatePrivate *d; +}; diff -Nru qesteidutil-0.3.1/common/sslConnect.cpp qesteidutil-0.3.1/common/sslConnect.cpp --- qesteidutil-0.3.1/common/sslConnect.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/sslConnect.cpp 2010-09-30 15:15:55.000000000 +0000 @@ -0,0 +1,420 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "sslConnect_p.h" + +#include "PinDialog.h" +#include "Settings.h" +#include "SslCertificate.h" + +#include +#include +#include +#include +#include + +#ifndef PKCS11_MODULE +# if defined(_WIN32) +# define PKCS11_MODULE "opensc-pkcs11.dll" +# elif defined(__APPLE__) +# define PKCS11_MODULE "/Library/OpenSC/lib/opensc-pkcs11.so" +# else +# define PKCS11_MODULE "opensc-pkcs11.so" +# endif +#endif + +// PKCS#11 +#define CKR_OK (0) +#define CKR_CANCEL (1) +#define CKR_FUNCTION_CANCELED (0x50) +#define CKR_PIN_INCORRECT (0xa0) +#define CKR_PIN_LOCKED (0xa4) + + + +class sslError: public std::runtime_error +{ +public: + sslError() : std::runtime_error("openssl error") + { + unsigned long err = ERR_get_error(); + std::ostringstream buf; + buf << ERR_func_error_string( err ) << " (" << ERR_reason_error_string( err ) << ")"; + desc = buf.str(); + } + ~sslError() throw () {} + + virtual const char *what() const throw() { return desc.c_str(); } + void static check( bool result ) { if( !result ) throw sslError(); } + + std::string desc; +}; + + + +SSLThread::SSLThread( PKCS11_SLOT *slot, QObject *parent ) +: QThread(parent), loginResult(CKR_OK), m_slot(slot) {} + +SSLThread::~SSLThread() { wait(); } + +void SSLThread::run() +{ + if( PKCS11_login( m_slot, 0, NULL ) < 0 ) + loginResult = ERR_GET_REASON( ERR_get_error() ); +} + + + +SSLConnectPrivate::SSLConnectPrivate() +: unload( true ) +, p11( PKCS11_CTX_new() ) +, p11loaded( false ) +, sctx( NULL ) +, ssl( NULL ) +, reader( -1 ) +, nslots( 0 ) +, error( SSLConnect::UnknownError ) +{} + +SSLConnectPrivate::~SSLConnectPrivate() +{ + if( ssl ) + { + SSL_shutdown( ssl ); + SSL_free( ssl ); + } + SSL_CTX_free( sctx ); + if( nslots ) + PKCS11_release_all_slots( p11, pslots, nslots ); + if( unload ) + PKCS11_CTX_unload( p11 ); + PKCS11_CTX_free( p11 ); + + ERR_remove_state(0); +} + +bool SSLConnectPrivate::connectToHost( SSLConnect::RequestType type ) +{ + if( !p11loaded ) + throw std::runtime_error( errorString.toStdString() ); + + if( PKCS11_enumerate_slots( p11, &pslots, &nslots ) || !nslots ) + throw std::runtime_error( SSLConnect::tr( "failed to list slots" ).toStdString() ); + + // Find token + PKCS11_SLOT *slot = 0; + if( reader >= 0 ) + { + if ( (unsigned int)reader*4 > nslots ) + throw std::runtime_error( SSLConnect::tr( "token failed" ).toStdString() ); + slot = &pslots[reader*4]; + } + else + { + for( unsigned int i = 0; i < nslots; ++i ) + { + if( (&pslots[i])->token && + card.contains( (&pslots[i])->token->serialnr ) ) + { + slot = &pslots[i]; + break; + } + } + } + if( !slot || !slot->token ) + throw std::runtime_error( SSLConnect::tr("no token available").toStdString() ); + + // Find token cert + PKCS11_CERT *certs; + unsigned int ncerts; + if( PKCS11_enumerate_certs(slot->token, &certs, &ncerts) || !ncerts ) + throw std::runtime_error( SSLConnect::tr("no certificate available").toStdString() ); + PKCS11_CERT *authcert = &certs[0]; + if( !SslCertificate::fromX509( Qt::HANDLE(authcert->x509) ).isValid() ) + throw std::runtime_error( SSLConnect::tr("Certificate is not valid").toStdString() ); + + // Login token + if( slot->token->loginRequired ) + { + PinDialog *p = new PinDialog( + slot->token->secureLogin ? PinDialog::Pin1PinpadType : PinDialog::Pin1Type, + SslCertificate::fromX509( Qt::HANDLE(authcert->x509) ), qApp->activeWindow() ); + p->setWindowModality( Qt::ApplicationModal ); + unsigned long err = CKR_OK; + if( !slot->token->secureLogin ) + { + QString validatePin; + if( pin.isNull() ) + { + if( !p->exec() ) + { + p->deleteLater(); + throw std::runtime_error( "" ); + } + validatePin = p->text(); + p->deleteLater(); + QCoreApplication::processEvents(); + } + else + validatePin = pin; + if( PKCS11_login(slot, 0, validatePin.toUtf8()) < 0 ) + { + pin = QString(); + err = ERR_GET_REASON( ERR_get_error() ); + } + else + pin = validatePin; + } + else + { + pin.clear(); + p->show(); + SSLThread *t = new SSLThread( slot ); + t->start(); + do + { + QCoreApplication::processEvents(); + t->wait( 1 ); + } + while( t->isRunning() ); + delete p; + err = t->loginResult; + delete t; + } + switch( err ) + { + case CKR_OK: break; + case CKR_CANCEL: + case CKR_FUNCTION_CANCELED: + throw std::runtime_error( "" ); break; + case CKR_PIN_INCORRECT: + throw std::runtime_error( "PIN1Invalid" ); break; + case CKR_PIN_LOCKED: + throw std::runtime_error( "PINLocked" ); break; + default: + throw std::runtime_error( "PIN1Invalid" ); break; + } + } + + // Find token key + PKCS11_KEY *authkey = PKCS11_find_key( authcert ); + if ( !authkey ) + throw std::runtime_error( SSLConnect::tr("no key matching certificate available").toStdString() ); + EVP_PKEY *pkey = PKCS11_get_private_key( authkey ); + + sctx = SSL_CTX_new( SSLv23_client_method() ); + sslError::check( SSL_CTX_use_certificate(sctx, authcert->x509 ) ); + sslError::check( SSL_CTX_use_PrivateKey(sctx,pkey) ); + sslError::check( SSL_CTX_check_private_key(sctx) ); + sslError::check( SSL_CTX_set_mode( sctx, SSL_MODE_AUTO_RETRY ) ); + +#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION + SSL_CTX_set_options(sctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION); +#endif + + ssl = SSL_new( sctx ); + + BIO *sock; + switch( type ) + { + case SSLConnect::AccessCert: + case SSLConnect::MobileInfo: sock = BIO_new_connect( const_cast(SK) ); break; + default: sock = BIO_new_connect( const_cast(EESTI) ); break; + } + + BIO_set_conn_port( sock, "https" ); + if( BIO_do_connect( sock ) <= 0 ) + throw std::runtime_error( SSLConnect::tr( "Failed to connect to host. Are you connected to the internet?" ).toStdString() ); + + SSL_set_bio( ssl, sock, sock ); + sslError::check( SSL_connect( ssl ) ); + +#if defined(Q_OS_MAC) && OPENSSL_VERSION_NUMBER <= 0x009080cfL +#ifndef SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION +#define SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x0010 +#endif + ssl->s3->flags |= SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; +#endif + + return true; +} + +QByteArray SSLConnectPrivate::getRequest( const QString &request ) const +{ + QByteArray data = request.toUtf8(); + sslError::check( SSL_write( ssl, data.constData(), data.length() ) ); + + int bytesRead = 0; + char readBuffer[4096]; + QByteArray buffer; + do + { + bytesRead = SSL_read( ssl, &readBuffer, 4096 ); + + if( bytesRead <= 0 ) + { + switch( SSL_get_error( ssl, bytesRead ) ) + { + case SSL_ERROR_NONE: + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_WRITE: + case SSL_ERROR_ZERO_RETURN: // Disconnect + break; + default: + sslError::check( 0 ); + break; + } + } + + if( bytesRead > 0 ) + buffer += QByteArray( (const char*)&readBuffer, bytesRead ); + } while( bytesRead > 0 ); + + int pos = buffer.indexOf( "\r\n\r\n" ); + return pos ? buffer.mid( pos + 4 ) : buffer; +} + + + +SSLConnect::SSLConnect( QObject *parent ) +: QObject( parent ) +, d( new SSLConnectPrivate() ) +{ + setPKCS11( PKCS11_MODULE ); +} + +SSLConnect::~SSLConnect() { delete d; } + +QByteArray SSLConnect::getUrl( RequestType type, const QString &value ) +{ + if( !d->connectToHost( type ) ) + return QByteArray(); + + QString header; + switch( type ) + { + case AccessCert: + { + QString lang; + switch( QLocale().language() ) + { + case QLocale::English: lang = "en"; break; + case QLocale::Russian: lang = "ru"; break; + case QLocale::Estonian: + default: lang = "et"; break; + } + + QString request = QString( + "" + "" + "" + "%1" + "" + "DigiDoc3" + "" + "" + "" + "" ) + .arg( lang.toUpper() ); + header = QString( + "POST /id/GetAccessTokenWSProxy/ HTTP/1.1\r\n" + "Host: %1\r\n" + "Content-Type: text/xml\r\n" + "Content-Length: %2\r\n" + "SOAPAction: \"\"\r\n" + "Connection: close\r\n\r\n" + "%3" ) + .arg( SK ).arg( request.size() ).arg( request ); + break; + } + case EmailInfo: + header = "GET /idportaal/postisysteem.naita_suunamised HTTP/1.0\r\n\r\n"; + break; + case ActivateEmails: + header = QString( "GET /idportaal/postisysteem.lisa_suunamine?%1 HTTP/1.0\r\n\r\n" ).arg( value ); + break; + case MobileInfo: + header = value; + break; + case PictureInfo: + header = "GET /idportaal/portaal.idpilt HTTP/1.0\r\n\r\n"; + break; + default: return QByteArray(); + } + return d->getRequest( header ); +} + +SSLConnect::ErrorType SSLConnect::error() const { return d->error; } +QString SSLConnect::errorString() const { return d->errorString; } +QString SSLConnect::pin() const { return d->pin; } +QByteArray SSLConnect::result() const { return d->result; } +void SSLConnect::setCard( const QString &card ) { d->card = card; } +void SSLConnect::setPin( const QString &pin ) { d->pin = pin; } +void SSLConnect::setPKCS11( const QString &pkcs11, bool unload ) +{ + if( d->p11loaded && d->unload ) + PKCS11_CTX_unload( d->p11 ); + d->unload = unload; + d->p11loaded = PKCS11_CTX_load( d->p11, pkcs11.toUtf8() ) == 0; + if( !d->p11loaded ) + { + d->error = UnknownError; + d->errorString = tr("failed to load pkcs11 module '%1'").arg( pkcs11 ); + } +} +void SSLConnect::setReader( int reader ) { d->reader = reader; } + +void SSLConnect::waitForFinished( RequestType type, const QString &value ) +{ + try { d->result = getUrl( type, value ); } + catch( const std::runtime_error &e ) + { + if( qstrcmp( e.what(), "" ) == 0 ) + { + d->error = SSLConnect::PinCanceledError; + d->errorString = tr("PIN canceled"); + } + else if( qstrcmp( e.what(), "PIN1Invalid" ) == 0 ) + { + d->error = SSLConnect::PinInvalidError; + d->errorString = tr("Invalid PIN"); + } + else if( qstrcmp( e.what(), "PINLocked" ) == 0 ) + { + d->error = SSLConnect::PinLocked; + d->errorString = tr("Pin locked"); + } + else + { + d->error = SSLConnect::UnknownError; + d->errorString = e.what(); + } + return; + } + d->error = SSLConnect::UnknownError; + d->errorString.clear(); +} diff -Nru qesteidutil-0.3.1/common/sslConnect.h qesteidutil-0.3.1/common/sslConnect.h --- qesteidutil-0.3.1/common/sslConnect.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/sslConnect.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +#define EESTI "sisene.www.eesti.ee" +#define SK "www.openxades.org" + +class SSLConnectPrivate; +class SSLConnect: public QObject +{ + Q_OBJECT + +public: + enum RequestType { + EmailInfo, + ActivateEmails, + MobileInfo, + PictureInfo, + AccessCert + }; + enum ErrorType { + PinCanceledError = 1, + PinInvalidError = 2, + PinLocked = 3, + UnknownError = -1, + }; + + SSLConnect( QObject *parent = 0 ); + ~SSLConnect(); + + ErrorType error() const; + QString errorString() const; + QByteArray getUrl( RequestType type, const QString &value = "" ); + QString pin() const; + QByteArray result() const; + void setCard( const QString &card ); + void setPin( const QString &pin ); + void setPKCS11( const QString &pkcs11, bool unload = true ); + void setReader( int reader ); + void waitForFinished( RequestType type, const QString &value = "" ); + +private: + SSLConnectPrivate *d; +}; diff -Nru qesteidutil-0.3.1/common/sslConnect_p.h qesteidutil-0.3.1/common/sslConnect_p.h --- qesteidutil-0.3.1/common/sslConnect_p.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/sslConnect_p.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,71 @@ +/* + * QEstEidCommon + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "sslConnect.h" + +#include + +#include + +#include + +class SSLConnectPrivate +{ +public: + SSLConnectPrivate(); + ~SSLConnectPrivate(); + + bool connectToHost( SSLConnect::RequestType type ); + QByteArray getRequest( const QString &request ) const; + + bool unload; + PKCS11_CTX *p11; + bool p11loaded; + SSL_CTX *sctx; + SSL *ssl; + + QString card; + QString pin; + int reader; + + unsigned int nslots; + PKCS11_SLOT *pslots; + + SSLConnect::ErrorType error; + QString errorString; + QByteArray result; +}; + +class SSLThread: public QThread +{ + Q_OBJECT +public: + SSLThread( PKCS11_SLOT *slot, QObject *parent = 0 ); + ~SSLThread(); + unsigned long loginResult; + +private: + void run(); + + PKCS11_SLOT *m_slot; +}; diff -Nru qesteidutil-0.3.1/common/translations/common_en.ts qesteidutil-0.3.1/common/translations/common_en.ts --- qesteidutil-0.3.1/common/translations/common_en.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/common_en.ts 2010-01-21 15:07:37.000000000 +0000 @@ -0,0 +1,310 @@ + + + + + CertificateDialog + + Save certificate + Save certificate + + + Failed to save file + Failed to save file + + + Certificate Information + Certificate Information + + + This certificate is intended for following purpose(s): + This certificate is intended for following purpose(s): + + + Issued to: + Issued to: + + + Issued by: + Issued by: + + + Valid from + Valid from + + + to + to + + + Version + Version + + + Serial number + Serial number + + + Signature algorithm + Signature algorithm + + + Issuer + Issuer + + + Vaild to + Vaild to + + + Subject + Subject + + + Public key + Public key + + + Certificate policies + Certificate policies + + + Certificate + Certificate + + + General + General + + + Details + Details + + + Field + Field + + + Value + Value + + + Certification Path + Certification Path + + + Certificate status: + Certificate status: + + + Certificates (*.cer *.crt *.pem) + Certificates (*.cer *.crt *.pem) + + + Enhanched key usage + Enhanched key usage + + + Key usage + Key usage + + + Authority key identifier + Authority key identifier + + + Subject key identifier + Subject key identifier + + + + CheckConnection + + Check proxy settings + Check proxy settings + + + Check proxy username and password + Check proxy username and password + + + Check internet connection + Check internet connection + + + + Common + + Company + Company + + + Register code + Register code + + + Name + Name + + + Personal code + Personal code + + + Card in reader + Card number + + + Auth certificate is + Auth certificate is + + + Sign certificate is + Sign certificate is + + + valid + valid + + + expired + expired + + + Open utility + Open utility + + + Your certificates will expire soon + Your certificates will expire soon + + + + PinDialog + + Selected action requires auth certificate. + Selected action requires auth certificate. + + + For using auth certificate enter PIN1 + For using auth certificate enter PIN1 + + + Selected action requires sign certificate. + Selected action requires sign certificate. + + + For using sign certificate enter PIN2 + For using sign certificate enter PIN2 + + + For using auth certificate enter PIN1 with pinpad + For using auth certificate enter PIN1 with pinpad + + + For using sign certificate enter PIN2 with pinpad + For using sign certificate enter PIN2 with pinpad + + + + SSLConnect + + PIN canceled + PIN canceled + + + Invalid PIN + Invalid PIN + + + failed to list slots + failed to list slots + + + token failed + token failed + + + no token available + no token available + + + no certificate available + no certificate available + + + no key matching certificate available + no key matching certificate available + + + Failed to connect to host. Are you connected to the internet? + Failed to connect to host. Are you connected to the internet? + + + Pin locked + Pin locked + + + failed to load pkcs11 module '%1' + failed to load pkcs11 module '%1' + + + Certificate is not valid + Certificate is not valid + + + + SslCertificate + + All application policies + All application policies + + + Proves your identity to a remote computer + Proves your identity to a remote computer + + + Protects e-mail messages + Protects e-mail messages + + + OCSP signing + OCSP signing + + + Digital signature + Digital signature + + + Non repudiation + Non repudiation + + + Key encipherment + Key encipherment + + + Data encipherment + Data encipherment + + + Key agreement + Key agreement + + + Key certificate sign + Key certificate sign + + + CRL sign + CRL sign + + + Encipher only + Encipher only + + + Decipher only + Decipher only + + + diff -Nru qesteidutil-0.3.1/common/translations/common_et.ts qesteidutil-0.3.1/common/translations/common_et.ts --- qesteidutil-0.3.1/common/translations/common_et.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/common_et.ts 2010-01-21 15:07:37.000000000 +0000 @@ -0,0 +1,310 @@ + + + + + CertificateDialog + + Save certificate + Salvesta sertifikaat + + + Failed to save file + Salvestamine ebaõnnestus + + + Certificate Information + Sertifikaadi info + + + This certificate is intended for following purpose(s): + Selle sertifikaadi otstarve on: + + + Issued to: + Kellele väljastatud: + + + Issued by: + Väljastaja: + + + Valid from + Kehtiv alates + + + to + kuni + + + Version + Versioon + + + Serial number + Seeria number + + + Signature algorithm + Signatuuri algoritm + + + Issuer + Väljaandja + + + Vaild to + Kehtiv kuni + + + Subject + Subjekt + + + Public key + Avalik võti + + + Certificate policies + Sertifikaadi reeglid + + + Certificate + Sertifikaat + + + General + Üldine + + + Details + Detailid + + + Field + Väli + + + Value + Väärtus + + + Certification Path + Sertifitseermisahel + + + Certificate status: + Sertifikaadi staatus: + + + Certificates (*.cer *.crt *.pem) + Sertifikaadid (*.cer *.crt *.pem) + + + Enhanched key usage + Täiendatud võtme kasutus + + + Key usage + Võtme kasutus + + + Authority key identifier + Juurdepääsutõendi identifikaator + + + Subject key identifier + Objektivõtme identifikaator + + + + CheckConnection + + Check proxy settings + Kontrolli proxy seadeid + + + Check proxy username and password + Kontrolli proxy kasutajanime ja parooli + + + Check internet connection + Kontrolli Interneti ühendust + + + + Common + + Company + Asutus + + + Register code + Registrikood + + + Name + Nimi + + + Personal code + Isikukood + + + Card in reader + Lugejas on kaart + + + Auth certificate is + Isikutuvastuse sertifikaat on + + + Sign certificate is + Allkirjastamise sertifikaat on + + + valid + kehtiv + + + expired + aegunud + + + Open utility + Ava haldusvahend + + + Your certificates will expire soon + Sertifikaadid hakkavad aeguma + + + + PinDialog + + Selected action requires auth certificate. + Valitud tegevuse jaoks on vaja kasutada isikutuvastuse sertifikaati. + + + For using auth certificate enter PIN1 + Sertifikaadi kasutamiseks sisesta PIN1 + + + Selected action requires sign certificate. + Valitud tegevuse jaoks on vaja kasutada allkirjastamise sertifikaati. + + + For using sign certificate enter PIN2 + Sertifikaadi kasutamiseks sisesta PIN2 + + + For using auth certificate enter PIN1 with pinpad + Sertifikaadi kasutamiseks sisesta PIN1 kaardilugeja sõrmistikult + + + For using sign certificate enter PIN2 with pinpad + Sertifikaadi kasutamiseks sisesta PIN2 kaardilugeja sõrmistikult + + + + SSLConnect + + PIN canceled + PIN sisestamine katkestati + + + Invalid PIN + Vale PIN + + + failed to list slots + viga pkcs11 slottide lugemisel + + + token failed + viga "tokeni" laadimisel + + + no token available + ei leitud ühtegi "tokenit" + + + no certificate available + Ei ole kättesaadavaid sertifikaate + + + no key matching certificate available + ei leitud ühtegi sobivat sertifikaati + + + Failed to connect to host. Are you connected to the internet? + Puudub internetiühendus! + + + Pin locked + PIN on lukus + + + failed to load pkcs11 module '%1' + viga pkcs11 mooduli laadimisel '%1' + + + Certificate is not valid + Sertifikaat ei ole kehtiv + + + + SslCertificate + + All application policies + Kõik tarkvara poliisid + + + Proves your identity to a remote computer + Tuvastab sinu isiksust arvuti kaugopereerimisel + + + Protects e-mail messages + Kaitseb e-posti sõnumeid + + + OCSP signing + OCSP allkirjastamine + + + Digital signature + Digitaalne allkiri + + + Non repudiation + Salgamise vääramine + + + Key encipherment + Võtme krüptimine + + + Data encipherment + Andmete krüptimine + + + Key agreement + Aktsepteeritud võti + + + Key certificate sign + Võtme sertifikaadi allkiri + + + CRL sign + CRL allkiri + + + Encipher only + Ainult krüptimine + + + Decipher only + Ainult dekrüptimine + + + diff -Nru qesteidutil-0.3.1/common/translations/common_ru.ts qesteidutil-0.3.1/common/translations/common_ru.ts --- qesteidutil-0.3.1/common/translations/common_ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/common_ru.ts 2010-01-18 12:13:18.000000000 +0000 @@ -0,0 +1,310 @@ + + + + + CertificateDialog + + Save certificate + Сохранить сертификат + + + Certificates (*.cer *.crt *.pem) + Сертификаты (*.pem *.crt *.cer) + + + Failed to save file + Файл не был сохранён + + + Certificate Information + Информация о сертификате + + + This certificate is intended for following purpose(s): + Предназначение сертификата: + + + Issued to: + Выдан: + + + Issued by: + Выдано: + + + Valid from + Действительно с + + + to + до + + + Version + Версия + + + Serial number + Серийный номер + + + Signature algorithm + Алгоритм подписи + + + Issuer + Выдавший + + + Vaild to + Действительно до + + + Subject + Субъект + + + Public key + Открытый ключ + + + Enhanched key usage + Дополнительное использование ключа + + + Certificate policies + Правила сертификатов + + + Key usage + Использование ключа + + + Certificate + Сертификат + + + General + Общее + + + Details + Детали + + + Field + Поле + + + Value + Значение + + + Certification Path + Путь сертификата + + + Certificate status: + Статус сертификата: + + + Authority key identifier + Идентификатор личного ключа + + + Subject key identifier + Идентификатор ключа заглавия + + + + CheckConnection + + Check proxy settings + Проверте настройки прокси + + + Check proxy username and password + Проверьте имя пользователя и пароль прокси + + + Check internet connection + Проверьте подключение к Интернету + + + + Common + + Company + Учереждение + + + Register code + Код регистра + + + Name + Имя + + + Personal code + Личный код + + + Card in reader + Карта в считывателе + + + Auth certificate is + Сертификаты подписи + + + Sign certificate is + Сертификаты подписи + + + valid + действительны + + + expired + устарели + + + Open utility + Открыть средство управления + + + Your certificates will expire soon + Сертификаты скоро будут недействительны + + + + PinDialog + + Selected action requires auth certificate. + Даннаяй опперация требует личный сертификат. + + + For using auth certificate enter PIN1 + Для использования сертификата введите PIN1 + + + Selected action requires sign certificate. + Для данной опперации необходим сертификат подписи. + + + For using sign certificate enter PIN2 + Для использования сертификата подписи введите PIN2 + + + For using auth certificate enter PIN1 with pinpad + Для использования личного сертификата введите PIN1 с клавиатуры считывателя + + + For using sign certificate enter PIN2 with pinpad + Для использования сертификата подписи введите PIN2 с клавиатуры считывателя + + + + SSLConnect + + PIN canceled + Введение PIN отменено + + + Invalid PIN + Неверный PIN + + + failed to list slots + ошибка при чтении слотов pkcs11 + + + token failed + ошибка при загрузке "token"-а + + + no token available + не найдено ни одного "token"-а + + + no certificate available + Нет доступного сертификата + + + no key matching certificate available + не найдено подходящего сертификата + + + Failed to connect to host. Are you connected to the internet? + Отсутствует подключение к интернету! + + + Pin locked + PIN заблокирован + + + failed to load pkcs11 module '%1' + ошибка при загрузке модуля pkcs11 '%1' + + + Certificate is not valid + Сертификат не действителен + + + + SslCertificate + + All application policies + Все полисы приложений + + + Proves your identity to a remote computer + Подтверждает Вашу личность на отдалённом компьютере + + + Protects e-mail messages + Защищает сообщения электронной почты + + + OCSP signing + OCSP подписывание + + + Digital signature + Дигитальная подпись + + + Non repudiation + Невозможность отказа + + + Key encipherment + Зашифровка ключа + + + Data encipherment + Зашифровка данных + + + Key agreement + Подтверждение ключа + + + Key certificate sign + Подпись ключа сертификата + + + CRL sign + CRL подпись + + + Encipher only + Только зашифровка + + + Decipher only + Только разшифровка + + + diff -Nru qesteidutil-0.3.1/common/translations/common_tr.qrc.cmake qesteidutil-0.3.1/common/translations/common_tr.qrc.cmake --- qesteidutil-0.3.1/common/translations/common_tr.qrc.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/common_tr.qrc.cmake 2010-01-21 13:14:31.000000000 +0000 @@ -0,0 +1,9 @@ + + + @QM_DIR@/common_en.qm + @QM_DIR@/common_et.qm + @QM_DIR@/common_ru.qm + @QM_DIR@/qt_et.qm + @QM_DIR@/qt_ru.qm + + diff -Nru qesteidutil-0.3.1/common/translations/qt_et.ts qesteidutil-0.3.1/common/translations/qt_et.ts --- qesteidutil-0.3.1/common/translations/qt_et.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/qt_et.ts 2009-12-17 06:02:32.000000000 +0000 @@ -0,0 +1,6288 @@ + + + + + AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + + + + Revert back to device '%1' + + + + + CloseButton + + + Close Tab + Sulge kaart + + + + Phonon:: + + + Notifications + Hoiatused + + + Music + Muusika + + + Video + Video + + + Communication + + + + Games + Mängud + + + Accessibility + + + + + Phonon::Gstreamer::Backend + + + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled. + + + + Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled + + + + + Phonon::Gstreamer::MediaObject + + + Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed. + + + + A required codec is missing. You need to install the following codec(s) to play this content: %0 + + + + Could not open media source. + + + + Invalid source type. + + + + Could not locate media source. + + + + Could not open audio device. The device is already in use. + + + + Could not decode media source. + + + + + Phonon::VolumeSlider + + Volume: %1% + + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% + + + + + Q3Accel + + + %1, %2 not defined + + + + Ambiguous %1 not handled + + + + + Q3DataTable + + + True + + + + False + + + + Insert + + + + Update + + + + Delete + + + + + Q3FileDialog + + + Copy or Move a File + + + + Read: %1 + + + + Write: %1 + + + + Cancel + + + + + All Files (*) + + + + Name + + + + Size + + + + Type + + + + Date + + + + Attributes + + + + &OK + + + + Look &in: + + + + File &name: + + + + File &type: + + + + Back + + + + One directory up + + + + Create New Folder + + + + List View + + + + Detail View + + + + Preview File Info + + + + Preview File Contents + + + + Read-write + + + + Read-only + + + + Write-only + + + + Inaccessible + + + + Symlink to File + + + + Symlink to Directory + + + + Symlink to Special + + + + File + + + + Dir + + + + Special + + + + + Open + + + + + Save As + + + + &Open + + + + &Save + + + + &Rename + + + + &Delete + + + + R&eload + + + + Sort by &Name + + + + Sort by &Size + + + + Sort by &Date + + + + &Unsorted + + + + Sort + + + + Show &hidden files + + + + the file + + + + the directory + + + + the symlink + + + + Delete %1 + + + + <qt>Are you sure you wish to delete %1 "%2"?</qt> + + + + &Yes + + + + &No + + + + New Folder 1 + + + + New Folder + + + + New Folder %1 + + + + Find Directory + + + + Directories + + + + Directory: + + + + Error + + + + %1 +File not found. +Check path and filename. + + + + All Files (*.*) + + + + Open + + + + Select a Directory + + + + + Q3LocalFs + + Could not read directory +%1 + + + + Could not create directory +%1 + + + + Could not remove file or directory +%1 + + + + Could not rename +%1 +to +%2 + + + + Could not open +%1 + + + + Could not write +%1 + + + + + Q3MainWindow + + + Line up + + + + Customize... + + + + + Q3NetworkProtocol + + + Operation stopped by the user + + + + + Q3ProgressDialog + + Cancel + + + + + Q3TabDialog + + OK + + + + Apply + + + + Help + + + + Defaults + + + + Cancel + + + + + Q3TextEdit + + + &Undo + + + + &Redo + + + + Cu&t + + + + &Copy + + + + &Paste + + + + Clear + + + + Select All + + + + + Q3TitleBar + + + System + + + + Restore up + + + + Minimize + + + + Restore down + + + + Maximize + + + + Close + + + + Contains commands to manipulate the window + + + + Puts a minimized back to normal + + + + Moves the window out of the way + + + + Puts a maximized window back to normal + + + + Makes the window full screen + + + + Closes the window + + + + Displays the name of the window and contains controls to manipulate it + + + + + Q3ToolBar + + + More... + + + + + Q3UrlOperator + + The protocol `%1' is not supported + + + + The protocol `%1' does not support listing directories + + + + The protocol `%1' does not support creating new directories + + + + The protocol `%1' does not support removing files or directories + + + + The protocol `%1' does not support renaming files or directories + + + + The protocol `%1' does not support getting files + + + + The protocol `%1' does not support putting files + + + + The protocol `%1' does not support copying or moving files or directories + + + + (unknown) + + + + + Q3Wizard + + + &Cancel + + + + < &Back + + + + &Next > + + + + &Finish + + + + &Help + + + + + QAbstractSocket + + Host not found + Masinat ei leitud + + + + Connection refused + Ühendusest keelduti + + + Connection timed out + Ühendus aegus + + + Operation on socket is not supported + Sokli toiming ei ole toetatud + + + Socket operation timed out + Soklitoiming aegus + + + Socket is not connected + Sokkel pole ühendatud + + + Network unreachable + Võrk ei ole kättesaadav + + + + QAbstractSpinBox + + + &Step up + &Samm üles + + + Step &down + S&amm alla + + + &Select All + &Vali kõik + + + + QApplication + + + Activate + Aktiveeri + + + + Executable '%1' requires Qt %2, found Qt %3. + + + + Incompatible Qt Library Error + + + + + QT_LAYOUT_DIRECTION + Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. + LTR + + + + Activates the program's main window + Aktiveerib programmi peaakna + + + + QAxSelect + + Select ActiveX Control + + + + OK + + + + &Cancel + + + + COM &Object: + + + + + QCheckBox + + + Uncheck + Eemalda märge + + + Check + Märgi + + + Toggle + Lülita + + + + QColorDialog + + + Hu&e: + + + + &Sat: + + + + &Val: + + + + &Red: + + + + &Green: + + + + Bl&ue: + + + + A&lpha channel: + + + + Select Color + + + + &Basic colors + + + + &Custom colors + + + + &Add to Custom Colors + + + + + QComboBox + + Open + Ava + + + + False + Väär + + + True + Tõene + + + + Close + Sulge + + + + QCoreApplication + + + %1: key is empty + QSystemSemaphore + %1: võti on tühi + + + %1: unable to make key + QSystemSemaphore + %1: võtme loomine nurjus + + + %1: ftok failed + QSystemSemaphore + %1: ftok nurjus" + + + + QDB2Driver + + + Unable to connect + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + Unable to set autocommit + + + + + QDB2Result + + Unable to execute statement + + + + Unable to prepare statement + + + + Unable to bind variable + + + + Unable to fetch record %1 + + + + Unable to fetch next + + + + Unable to fetch first + + + + + QDateTimeEdit + + + AM + AM + + + am + am + + + PM + PM + + + pm + pm + + + + QDial + + + QDial + + + + SpeedoMeter + + + + SliderHandle + + + + + QDialog + + + What's This? + Mis see on? + + + Done + Tehtud + + + + QDialogButtonBox + + + OK + OK + + + + &OK + &OK + + + &Save + &Salvesta + + + Save + Salvesta + + + Open + Ava + + + &Cancel + &Loobu + + + Cancel + Loobu + + + &Close + S&ulge + + + Close + Sulge + + + Apply + Rakenda + + + Reset + Lähtesta + + + Help + Abi + + + Don't Save + Ära salvesta + + + Discard + Unusta + + + &Yes + &Jah + + + Yes to &All + J&ah kõigile + + + &No + &Ei + + + N&o to All + E&i kõigile + + + Save All + Salvesta kõik + + + Abort + Katkesta + + + Retry + Proovi uuesti + + + Ignore + Eira + + + Restore Defaults + Vaikeväärtused + + + Close without Saving + Sulge salvestamata + + + + QDirModel + + + Name + Nimi + + + Size + Suurus + + + Kind + Match OS X Finder + Laad + + + Type + All other platforms + Tüüp + + + Date Modified + Muutmise kuupäev + + + + QDockWidget + + + Close + Sulge + + + Dock + Doki + + + Float + Ujuvaks + + + + QDoubleSpinBox + + More + Rohkem + + + Less + Vähem + + + + QErrorMessage + + + Debug Message: + + + + Warning: + + + + Fatal Error: + + + + &Show this message again + + + + &OK + + + + + QFile + + Destination file exists + Sihtfail on olemas + + + Cannot open %1 for input + %1 avamine sisendiks nurjus + + + Cannot open for output + Avamine väljundiks nurjus + + + Failure to write block + Ploki kirjutamine nurjus + + + Cannot create %1 for output + %1 loomine väljundiks nurjus + + + + QFileDialog + + All Files (*) + + + + Directories + + + + &Open + + + + &Save + + + + Open + Ava + + + %1 already exists. +Do you want to replace it? + %1 on juba olemas. +Kas kirjutada see üle? + + + %1 +File not found. +Please verify the correct file name was given. + + + + + My Computer + Minu arvuti + + + &Rename + + + + &Delete + + + + Show &hidden files + + + + Back + Tagasi + + + Parent Directory + + + + List View + + + + Detail View + + + + Files of type: + + + + Directory: + + + + %1 +Directory not found. +Please verify the correct directory name was given. + + + + '%1' is write protected. +Do you want to delete it anyway? + + + + Are sure you want to delete '%1'? + + + + Could not delete directory. + + + + Recent Places + + + + + All Files (*.*) + + + + Save As + + + + + Drive + Ketas + + + File + Fail + + + Unknown + Tundmatu + + + Find Directory + + + + Show + Näita + + + Forward + + + + + New Folder + + + + &New Folder + + + + &Choose + + + + + Remove + Eemalda + + + File &name: + + + + Look in: + + + + Create New Folder + + + + + QFileSystemModel + + + Invalid filename + Vigane failinimi + + + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. + <b>Nime \"%1\" ei saa kasutada.</b><p>Proovi mõnda muud nime, milles oleks vähem tähti või puuduksid kirjavahemärgid. + + + Name + Nimi + + + Size + Suurus + + + Kind + Match OS X Finder + Laad + + + Type + All other platforms + Tüüp + + + Date Modified + Muutmise kuupäev + + + + My Computer + Minu arvuti + + + Computer + Arvuti + + + %1 TB + %1 TB + + + %1 GB + %1 GB + + + %1 MB + %1 MB + + + %1 KB + %1 KB + + + %1 bytes + %1 bytes + + + + QFontDatabase + + Normal + + + + Bold + + + + Demi Bold + + + + Black + + + + Demi + + + + Light + + + + Italic + + + + Oblique + + + + Any + + + + Latin + + + + Greek + + + + Cyrillic + + + + Armenian + + + + Hebrew + + + + Arabic + + + + Syriac + + + + Thaana + + + + Devanagari + + + + Bengali + + + + Gurmukhi + + + + Gujarati + + + + Oriya + + + + Tamil + + + + Telugu + + + + Kannada + + + + Malayalam + + + + Sinhala + + + + Thai + + + + Lao + + + + Tibetan + + + + Myanmar + + + + Georgian + + + + Khmer + + + + Simplified Chinese + + + + Traditional Chinese + + + + Japanese + + + + Korean + + + + Vietnamese + + + + Symbol + + + + Ogham + + + + Runic + + + + + QFontDialog + + + &Font + + + + Font st&yle + + + + &Size + + + + Effects + + + + Stri&keout + + + + &Underline + + + + Sample + + + + Wr&iting System + + + + Select Font + + + + + QFtp + + + Not connected + + + + + Host %1 not found + + + + + Connection refused to host %1 + + + + Connection timed out to host %1 + + + + Connected to host %1 + + + + Connection refused for data connection + + + + Unknown error + + + + + Connecting to host failed: +%1 + + + + + Login failed: +%1 + + + + + Listing directory failed: +%1 + + + + + Changing directory failed: +%1 + + + + + Downloading file failed: +%1 + + + + + Uploading file failed: +%1 + + + + + Removing file failed: +%1 + + + + + Creating directory failed: +%1 + + + + + Removing directory failed: +%1 + + + + Connection closed + + + + Host %1 found + + + + Connection to %1 closed + + + + Host found + + + + Connected to host + + + + + QHostInfo + + + Unknown error + Tundmatu viga + + + + QHostInfoAgent + + Host not found + + + + Unknown address type + + + + Unknown error + + + + + QHttp + + Unknown error + + + + Request aborted + + + + + No server set to connect to + + + + + Wrong content length + + + + + Server closed connection unexpectedly + + + + Error writing response to device + + + + + Connection refused + + + + + Host %1 not found + + + + + HTTP request failed + + + + + Invalid HTTP response header + + + + Invalid HTTP chunked body + + + + + Host %1 found + + + + Connected to host %1 + + + + Connection to %1 closed + + + + Host found + + + + Connected to host + + + + + Connection closed + + + + Proxy authentication required + + + + Authentication required + + + + Connection refused (or timed out) + + + + + Proxy requires authentication + Proksi server vajab autentimist + + + Host requires authentication + + + + Data corrupted + + + + Unknown protocol specified + + + + SSL handshake failed + + + + HTTPS connection requested but SSL support not compiled in + + + + + QHttpSocketEngine + + Did not receive HTTP response from proxy + + + + Error parsing authentication request from proxy + + + + Authentication required + + + + Proxy denied connection + + + + Error communicating with HTTP proxy + + + + Proxy server not found + + + + Proxy connection refused + + + + Proxy server connection timed out + + + + Proxy connection closed prematurely + + + + + QIBaseDriver + + + Error opening database + + + + Could not start transaction + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + + QIBaseResult + + Unable to create BLOB + + + + Unable to write BLOB + + + + Unable to open BLOB + + + + Unable to read BLOB + + + + Could not find array + + + + Could not get array data + + + + Could not get query info + + + + Could not start transaction + + + + Unable to commit transaction + + + + Could not allocate statement + + + + Could not prepare statement + + + + Could not describe input statement + + + + Could not describe statement + + + + Unable to close statement + + + + Unable to execute query + + + + Could not fetch next item + + + + Could not get statement info + + + + + QIODevice + + + Permission denied + Õigustest ei piisa + + + Too many open files + Liiga palju avatud faile + + + No such file or directory + Sellist faili või kataloogi ei ole + + + No space left on device + Seadmel pole enam vaba ruumi + + + + Unknown error + Tundmatu viga + + + + QInputContext + + + XIM + + + + XIM input method + + + + Windows input method + + + + Mac OS X input method + + + + + QInputDialog + + + Enter a value: + Sisesta väärtus: + + + + QLibrary + + + Could not mmap '%1': %2 + Nurjus mmap '%1': %2 + + + Plugin verification data mismatch in '%1' + Plugin kontrollimisandmed ei klapi asukohas '%1' + + + Could not unmap '%1': %2 + Nurjus unmap '%1': %2 + + + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] + Plugin '%1' kasutab ühildumatut Qt teeki. (%2.%3.%4) [%5] + + + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" + Plugin '%1' kasutab ühildumatut Qt teeki. Oodati ehitamisvõtit \"%2\", aga saadi \"%3\" + + + Unknown error + Tundmatu viga + + + + The shared library was not found. + Jagatud teeki ei leitud. + + + The file '%1' is not a valid Qt plugin. + Fail '%1' ei ole korrektne Qt plugin. + + + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) + Plugin '%1' kasutab ühildumatut Qt teeki. (Ei tohi segada silumis- ja väljalasteteeke.) + + + + Cannot load library %1: %2 + Teegi %1 laadimine nurjus: %2 + + + + Cannot unload library %1: %2 + Teegi %1 töö lõpetamine nurjus: %2 + + + + Cannot resolve symbol "%1" in %2: %3 + Sümboli \"%1\" lahendamine asukohas %2 nurjus: %3 + + + + QLineEdit + + + &Undo + &Võta tagasi + + + &Redo + &Tee uuesti + + + Cu&t + L&õika + + + &Copy + &Kopeeri + + + &Paste + &Aseta + + + Delete + Kustuta + + + Select All + Vali kõik + + + + QLocalServer + + + %1: Name error + + + + %1: Permission denied + + + + %1: Address in use + + + + + %1: Unknown error %2 + + + + + QLocalSocket + + + %1: Connection refused + + + + + %1: Remote closed + + + + %1: Invalid name + + + + + %1: Socket access error + + + + + %1: Socket resource error + + + + + %1: Socket operation timed out + + + + + %1: Datagram too large + + + + %1: Connection error + + + + + %1: The socket operation is not supported + + + + %1: Unknown error + + + + + %1: Unknown error %2 + + + + + QMYSQLDriver + + + Unable to open database ' + + + + Unable to connect + + + + Unable to begin transaction + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + + QMYSQLResult + + Unable to fetch data + + + + Unable to execute query + + + + Unable to store result + + + + Unable to prepare statement + + + + Unable to reset statement + + + + Unable to bind value + + + + Unable to execute statement + + + + Unable to bind outvalues + + + + Unable to store statement results + + + + Unable to execute next query + + + + Unable to store next result + + + + + QMdiArea + + + (Untitled) + + + + + QMdiSubWindow + + + %1 - [%2] + + + + Close + + + + Minimize + + + + Restore Down + + + + &Restore + + + + &Move + + + + &Size + + + + Mi&nimize + + + + Ma&ximize + + + + Stay on &Top + + + + &Close + + + + - [%1] + + + + Maximize + + + + Unshade + + + + Shade + + + + Restore + + + + Help + + + + Menu + + + + + QMenu + + Close + Sulge + + + Open + Ava + + + Execute + Käivita + + + + QMessageBox + + Help + Abi + + + OK + OK + + + About Qt + Qt info + + + <p>This program uses Qt version %1.</p> + <p>Käesolev programm kasutab Qt versiooni %1.</p> + + + Show Details... + Näita üksikasju... + + + Hide Details... + Peida üksikasjad... + + + <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p> + + + + <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p> + + + + + QMultiInputContext + + + Select IM + Sisestusviisi valik + + + + QMultiInputContextPlugin + + + Multiple input method switcher + + + + Multiple input method switcher that uses the context menu of the text widgets + + + + + QNativeSocketEngine + + + The remote host closed the connection + + + + Network operation timed out + + + + Out of resources + + + + Unsupported socket operation + + + + Protocol type not supported + + + + Invalid socket descriptor + + + + Network unreachable + + + + Permission denied + + + + Connection timed out + + + + Connection refused + + + + The bound address is already in use + + + + The address is not available + + + + The address is protected + + + + Unable to send a message + + + + Unable to receive a message + + + + Unable to write + + + + Network error + + + + Another socket is already listening on the same port + + + + Unable to initialize non-blocking socket + + + + Unable to initialize broadcast socket + + + + Attempt to use IPv6 socket on a platform with no IPv6 support + + + + Host unreachable + + + + Datagram was too large to send + + + + Operation on non-socket + + + + Unknown error + + + + The proxy type is invalid for this operation + + + + + QNetworkAccessCacheBackend + + + Error opening %1 + + + + + QNetworkAccessFileBackend + + + Request for opening non-local file %1 + + + + Error opening %1: %2 + + + + Write error writing to %1: %2 + + + + Cannot open %1: Path is a directory + + + + Read error reading from %1: %2 + + + + + QNetworkAccessFtpBackend + + + No suitable proxy found + + + + Cannot open %1: is a directory + + + + Logging in to %1 failed: authentication required + + + + Error while downloading %1: %2 + + + + Error while uploading %1: %2 + + + + + QNetworkAccessHttpBackend + + + No suitable proxy found + + + + + QNetworkReply + + Error downloading %1 - server replied: %2 + + + + + Protocol "%1" is unknown + + + + + QNetworkReplyImpl + + Operation canceled + + + + + QOCIDriver + + + Unable to logon + + + + Unable to initialize + QOCIDriver + + + + Unable to begin transaction + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + + QOCIResult + + Unable to bind column for batch execute + + + + Unable to execute batch statement + + + + Unable to goto next + + + + Unable to alloc statement + + + + Unable to prepare statement + + + + Unable to bind value + + + + Unable to execute select statement + + + + Unable to execute statement + + + + + QODBCDriver + + + Unable to connect + + + + Unable to connect - Driver doesn't support all needed functionality + + + + Unable to disable autocommit + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + Unable to enable autocommit + + + + + QODBCResult + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + + + + Unable to execute statement + + + + Unable to fetch next + + + + Unable to prepare statement + + + + Unable to bind variable + + + + Unable to fetch last + + + + Unable to fetch + + + + Unable to fetch first + + + + Unable to fetch previous + + + + + QObject + + + Home + Kodu + + + + Operation not supported on %1 + Operation not supported on %1 + + + Invalid URI: %1 + Vigane URI: %1 + + + + Write error writing to %1: %2 + Kirjutamisviga %1 kirjutamisel: %2 + + + Read error reading from %1: %2 + Lugemisviga %1 lugemisel: %2 + + + Socket error on %1: %2 + Sokli viga masinas %1: %2 + + + Remote host closed the connection prematurely on %1 + Võrgumasin sulges ühenduse enneaegselt masinas %1 + + + Protocol error: packet of size 0 received + Protokolli viga: saadi pakett suurusega 0 + + + No host name given + Masina nime ei ole antud + + + + QPPDOptionsModel + + + Name + Nimi + + + Value + Väärtus + + + + QPSQLDriver + + + Unable to connect + + + + Could not begin transaction + + + + Could not commit transaction + + + + Could not rollback transaction + + + + Unable to subscribe + + + + Unable to unsubscribe + + + + + QPSQLResult + + Unable to create query + + + + Unable to prepare statement + + + + + QPageSetupWidget + + + Centimeters (cm) + Sentimeetrid (cm) + + + Millimeters (mm) + Millimeetrid (mm) + + + Inches (in) + Tollid (in) + + + Points (pt) + Punktid (pt) + + + Form + Vorm + + + Paper + Paber + + + Page size: + Lehekülje suurus: + + + Width: + Laius: + + + Height: + Kõrgus: + + + Paper source: + Paberi allikas: + + + Orientation + Suund + + + Portrait + Püstpaigutus + + + Landscape + Rõhtpaigutus + + + Reverse landscape + Tagurpidi rõhtpaigutus + + + Reverse portrait + Tagurpidi püstpaigutus + + + Margins + Veerised + + + top margin + ülaveeris + + + left margin + vasakveeris + + + right margin + paremveeris + + + bottom margin + alaveeris + + + + QPluginLoader + + + Unknown error + Tundmatu viga + + + The plugin was not loaded. + Plugin ei olnud laaditud. + + + + QPrintDialog + + + locally connected + kohalikult ühendatud + + + Aliases: %1 + Aliased: %1 + + + unknown + tundmatu + + + + A0 (841 x 1189 mm) + A0 (841 x 1189 mm) + + + A1 (594 x 841 mm) + A1 (594 x 841 mm) + + + A2 (420 x 594 mm) + A2 (420 x 594 mm) + + + A3 (297 x 420 mm) + A3 (297 x 420 mm) + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297 mm, 8.26 x 11,7 tolli) + + + A5 (148 x 210 mm) + A5 (148 x 210 mm) + + + A6 (105 x 148 mm) + A6 (105 x 148 mm) + + + A7 (74 x 105 mm) + A7 (74 x 105 mm) + + + A8 (52 x 74 mm) + A8 (52 x 74 mm) + + + A9 (37 x 52 mm) + A9 (37 x 52 mm) + + + B0 (1000 x 1414 mm) + B0 (1000 x 1414 mm) + + + B1 (707 x 1000 mm) + B1 (707 x 1000 mm) + + + B2 (500 x 707 mm) + B2 (500 x 707 mm) + + + B3 (353 x 500 mm) + B3 (353 x 500 mm) + + + B4 (250 x 353 mm) + B4 (250 x 353 mm) + + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250 mm, 6,93 x 9,84 tolli) + + + B6 (125 x 176 mm) + B6 (125 x 176 mm) + + + B7 (88 x 125 mm) + B7 (88 x 125 mm) + + + B8 (62 x 88 mm) + B8 (62 x 88 mm) + + + B9 (44 x 62 mm) + B9 (44 x 62 mm) + + + B10 (31 x 44 mm) + B10 (31 x 44 mm) + + + C5E (163 x 229 mm) + C5E (163 x 229 mm) + + + DLE (110 x 220 mm) + DLE (110 x 220 mm) + + + Executive (7.5 x 10 inches, 191 x 254 mm) + Executive (7,5 x 10 tolli, 191 x 254 mm) + + + Folio (210 x 330 mm) + Foolio (210 x 330 mm) + + + Ledger (432 x 279 mm) + Ledger (432 x 279 mm) + + + Legal (8.5 x 14 inches, 216 x 356 mm) + Legal (8,5 x 14 tolli, 216 x 356 mm) + + + Letter (8.5 x 11 inches, 216 x 279 mm) + Letter (8,5 x 11 tolli, 216 x 279 mm) + + + Tabloid (279 x 432 mm) + Tabloid (279 x 432 mm) + + + US Common #10 Envelope (105 x 241 mm) + US Common #10 ümbrik (105 x 241 mm) + + + + OK + OK + + + Print + Trükkimine + + + Print To File ... + Trükkimine faili... + + + + Print range + Trükivahemik + + + Print all + Kõige trükkimine + + + + File %1 is not writable. +Please choose a different file name. + Fail %1 ei ole kirjutatav. +Palun vali mõni muu failinimi. + + + %1 already exists. +Do you want to overwrite it? + %1 already exists. +Do you want to overwrite it? + + + File exists + Fail on olemas + + + <qt>Do you want to overwrite it?</qt> + <qt>Kas kirjutada see üle?</qt> + + + Print selection + Trüki valik + + + %1 is a directory. +Please choose a different file name. + %1 on kataloog. +Palun vali mõni muu failinimi. + + + A0 + A0 + + + A1 + A1 + + + A2 + A2 + + + A3 + A3 + + + A4 + A4 + + + A5 + A5 + + + A6 + A6 + + + A7 + A7 + + + A8 + A8 + + + A9 + A9 + + + B0 + B0 + + + B1 + B1 + + + B2 + B2 + + + B3 + B3 + + + B4 + B4 + + + B5 + B5 + + + B6 + B6 + + + B7 + B7 + + + B8 + B8 + + + B9 + B9 + + + B10 + B10 + + + C5E + C5E + + + DLE + DLE + + + Executive + Executive + + + Folio + Foolio + + + Ledger + Ledger + + + Legal + Legal + + + Letter + Letter + + + Tabloid + Tabloid + + + US Common #10 Envelope + US Common #10 ümbrik + + + Custom + Kohandatud + + + &Options >> + &Valikud >> + + + &Print + &Trüki + + + &Options << + &Valikud << + + + Print to File (PDF) + Trükkimine faili (PDF) + + + Print to File (Postscript) + Trükkimine faili (PostScript) + + + Local file + Kohalik fail + + + Write %1 file + %1-faili kirjutamine + + + + The 'From' value cannot be greater than the 'To' value. + Alguse väärtus ei saa olla suurem kui lõpu väärtus. + + + + QPrintPreviewDialog + + Page Setup + Lehekülje seadistused + + + + %1% + %1% + + + Print Preview + Trükkimise eelvaatlus + + + Next page + Järgmine lehekülg + + + Previous page + Eelmine lehekülg + + + First page + Esimene lehekülg + + + Last page + Viimane lehekülg + + + Fit width + Mahuta laiusele + + + Fit page + Mahuta leheküljele + + + Zoom in + Suurenda + + + Zoom out + Vähenda + + + Portrait + Püstpaigutus + + + Landscape + Rõhtpaigutus + + + Show single page + Üks lehekülg + + + Show facing pages + Kõrvutised leheküljed + + + Show overview of all pages + Kõigi lehekülgede ülevaade + + + Print + Trükkimine + + + Page setup + Lehekülje seadistused + + + Close + Sulge + + + Export to PDF + Ekspordi PDF-ina + + + Export to PostScript + Ekspordi PostScriptina + + + + QPrintPropertiesWidget + + Form + Vorm + + + Page + Lehekülg + + + Advanced + Muu + + + + QPrintSettingsOutput + + Form + Vorm + + + Copies + Koopiad + + + Print range + Trükivahemik + + + Print all + Kõige trükkimine + + + Pages from + Leheküljed alates + + + to + kuni + + + Selection + Valik + + + Output Settings + Väljundi seadistused + + + Copies: + Koopiad: + + + Collate + Eksemplarhaaval + + + Reverse + Vastupidi + + + Options + Valikud + + + Color Mode + Värvirežiim + + + Color + Värv + + + Grayscale + Halltoon + + + Duplex Printing + Duplekstrükk + + + None + Puudub + + + Long side + Pikem külg + + + Short side + Lühem külg + + + + QPrintWidget + + Form + Vorm + + + Printer + Printer + + + &Name: + &Nimi: + + + P&roperties + O&madused + + + Location: + Asukoht: + + + Preview + Eelvaatlus + + + Type: + Tüüp: + + + Output &file: + Väljund&fail: + + + ... + ... + + + + QProcess + + + Could not open input redirection for reading + Sisendi ümbersuunamise avamine lugemiseks nurjus. + + + + Could not open output redirection for writing + Väljundi ümbersuunamise avamine lugemiseks nurjus. + + + Resource error (fork failure): %1 + Ressursi viga (hargmiku viga): %1 + + + Process operation timed out + Protsessi toiming aegus + + + Error reading from process + Viga protsessist lugemisel + + + + Error writing to process + Viga protsessi kirjutamisel + + + Process crashed + Protsessi tabas krahh + + + Process failed to start + Protsess ei käivitunud + + + + QProgressDialog + + + Cancel + Loobu + + + + QPushButton + + Open + Ava + + + + QRadioButton + + Check + Märgi + + + + QRegExp + + + no error occurred + + + + disabled feature used + + + + bad char class syntax + + + + bad lookahead syntax + + + + bad repetition syntax + + + + invalid octal value + + + + missing left delim + + + + unexpected end + + + + met internal limit + + + + + QSQLite2Driver + + + Error to open database + + + + Unable to begin transaction + + + + Unable to commit transaction + + + + Unable to rollback Transaction + + + + + QSQLite2Result + + Unable to fetch results + + + + Unable to execute statement + + + + + QSQLiteDriver + + + Error opening database + + + + Error closing database + + + + Unable to begin transaction + + + + Unable to commit transaction + + + + Unable to rollback transaction + + + + + QSQLiteResult + + Unable to fetch row + + + + Unable to execute statement + + + + Unable to reset statement + + + + Unable to bind parameters + + + + Parameter count mismatch + + + + No query + + + + + QScrollBar + + + Scroll here + Keri siia + + + Left edge + Vasakus servas + + + Top + Ülal + + + Right edge + Paremas servas + + + Bottom + All + + + Page left + Lehekülg vasakule + + + + Page up + Lehekülg üles + + + Page right + Lehekülg paremale + + + + Page down + Lehekülg alla + + + Scroll left + Keri vasakule + + + Scroll up + Keri üles + + + Scroll right + Keri paremale + + + Scroll down + Keri alla + + + Line up + + + + Position + Asukoht + + + Line down + + + + + QSharedMemory + + + %1: unable to set key on lock + + + + %1: create size is less then 0 + + + + + %1: unable to lock + + + + %1: unable to unlock + + + + + %1: permission denied + + + + %1: already exists + + + + + %1: doesn't exists + + + + + %1: out of resources + + + + + %1: unknown error %2 + + + + %1: key is empty + + + + %1: unix key file doesn't exists + + + + %1: ftok failed + + + + + %1: unable to make key + + + + %1: system-imposed size restrictions + + + + %1: not attached + + + + %1: invalid size + + + + %1: key error + + + + %1: size query failed + + + + + QShortcut + + + Space + + + + Esc + + + + Tab + + + + Backtab + + + + Backspace + + + + Return + + + + Enter + + + + Ins + + + + Del + + + + Pause + + + + Print + + + + SysReq + + + + Home + + + + End + + + + Left + + + + Up + + + + Right + + + + Down + + + + PgUp + + + + PgDown + + + + CapsLock + + + + NumLock + + + + ScrollLock + + + + Menu + + + + Help + + + + Back + + + + Forward + + + + Stop + + + + Refresh + + + + Volume Down + + + + Volume Mute + + + + Volume Up + + + + Bass Boost + + + + Bass Up + + + + Bass Down + + + + Treble Up + + + + Treble Down + + + + Media Play + + + + Media Stop + + + + Media Previous + + + + Media Next + + + + Media Record + + + + Favorites + + + + Search + + + + Standby + + + + Open URL + + + + Launch Mail + + + + Launch Media + + + + Launch (0) + + + + Launch (1) + + + + Launch (2) + + + + Launch (3) + + + + Launch (4) + + + + Launch (5) + + + + Launch (6) + + + + Launch (7) + + + + Launch (8) + + + + Launch (9) + + + + Launch (A) + + + + Launch (B) + + + + Launch (C) + + + + Launch (D) + + + + Launch (E) + + + + Launch (F) + + + + Print Screen + + + + Page Up + + + + Page Down + + + + Caps Lock + + + + Num Lock + + + + Number Lock + + + + Scroll Lock + + + + Insert + + + + Delete + + + + Escape + + + + System Request + + + + Select + + + + Yes + + + + No + + + + Context1 + + + + Context2 + + + + Context3 + + + + Context4 + + + + Call + + + + Hangup + + + + Flip + + + + Ctrl + + + + Shift + + + + Alt + + + + Meta + + + + + + + + + F%1 + + + + Home Page + + + + + QSlider + + + Page left + Lehekülg vasakule + + + Page up + Lehekülg üles + + + Position + Asukoht + + + Page right + Lehekülg paremale + + + Page down + Lehekülg alla + + + + QSocks5SocketEngine + + Connection to proxy refused + + + + Connection to proxy closed prematurely + + + + Proxy host not found + + + + Connection to proxy timed out + + + + Proxy authentication failed + + + + Proxy authentication failed: %1 + + + + SOCKS version 5 protocol error + + + + General SOCKSv5 server failure + + + + Connection not allowed by SOCKSv5 server + + + + TTL expired + + + + SOCKSv5 command not supported + + + + Address type not supported + + + + Unknown SOCKSv5 proxy error code 0x%1 + + + + Network operation timed out + + + + + QSpinBox + + More + Rohkem + + + Less + Vähem + + + + QSql + + + Delete + + + + Delete this record? + + + + Yes + + + + No + + + + Insert + + + + Update + + + + Save edits? + + + + Cancel + + + + Confirm + + + + Cancel your edits? + + + + + QSslSocket + + + Unable to write data: %1 + + + + Error while reading: %1 + + + + Error during SSL handshake: %1 + + + + Error creating SSL context (%1) + + + + Invalid or empty cipher list (%1) + + + + Error creating SSL session, %1 + + + + Error creating SSL session: %1 + + + + Cannot provide a certificate with no key, %1 + + + + Error loading local certificate, %1 + + + + Error loading private key, %1 + + + + Private key does not certificate public key, %1 + + + + + QSystemSemaphore + + + %1: out of resources + + + + + %1: permission denied + + + + %1: already exists + + + + %1: does not exist + + + + + %1: unknown error %2 + + + + + QTDSDriver + + + Unable to open connection + + + + Unable to use database + + + + + QTabBar + + Scroll Left + Keri vasakule + + + Scroll Right + Keri paremale + + + + QTcpServer + + + Operation on socket is not supported + Sokli toiming ei ole toetatud + + + + QTextControl + + + &Undo + &Võta tagasi + + + &Redo + &Tee uuesti + + + Cu&t + L&õika + + + &Copy + &Kopeeri + + + Copy &Link Location + Kopeeri &viida asukoht + + + &Paste + &Aseta + + + Delete + Kustuta + + + Select All + Vali kõik + + + + QToolButton + + Press + Vajuta + + + Open + Ava + + + + QUdpSocket + + + This platform does not support IPv6 + See platvorm ei toeta IPv6 + + + + QUndoGroup + + + Undo + Võta tagasi + + + Redo + Tee uuesti + + + + QUndoModel + + + <empty> + <tühi> + + + + QUndoStack + + + Undo + Võta tagasi + + + Redo + Tee uuesti + + + + QUnicodeControlCharacterMenu + + + LRM Left-to-right mark + LRM vasakult paremale märk + + + RLM Right-to-left mark + RLM paremalt vasakule märk + + + ZWJ Zero width joiner + ZWJ null-laiusega ühendaja + + + ZWNJ Zero width non-joiner + ZWNJ null-laiusega lahutaja + + + ZWSP Zero width space + ZWSP null-laiusega tühik + + + LRE Start of left-to-right embedding + LRE vasakult paremale lisamise algus + + + RLE Start of right-to-left embedding + RLE paremalt vasakule lisamise algus + + + LRO Start of left-to-right override + LRO vasakult paremale ülekirjutamise algus + + + RLO Start of right-to-left override + RLO paremalt vasakule ülekirjutamise algus + + + PDF Pop directional formatting + PDF Suunavorminduse lõpp + + + Insert Unicode control character + Unicode juhtmärgi lisamine + + + + QWebFrame + + + Request cancelled + + + + Request blocked + + + + Cannot show URL + + + + Frame load interruped by policy change + + + + Cannot show mimetype + + + + File does not exist + + + + + QWebPage + + + Bad HTTP request + + + + + Submit + default label for Submit buttons in forms on web pages + + + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + + + + Reset + default label for Reset buttons in forms on web pages + + + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + + + + Choose File + title for file button used in HTML forms + + + + No file selected + text to display in file button used in HTML forms when no file is selected + + + + Open in New Window + Open in New Window context menu item + + + + Save Link... + Download Linked File context menu item + + + + Copy Link + Copy Link context menu item + + + + Open Image + Open Image in New Window context menu item + + + + Save Image + Download Image context menu item + + + + Copy Image + Copy Link context menu item + + + + Open Frame + Open Frame in New Window context menu item + + + + Copy + Copy context menu item + + + + Go Back + Back context menu item + + + + Go Forward + Forward context menu item + + + + Stop + Stop context menu item + + + + Reload + Reload context menu item + + + + Cut + Cut context menu item + + + + Paste + Paste context menu item + + + + No Guesses Found + No Guesses Found context menu item + + + + Ignore + Ignore Spelling context menu item + + + + Add To Dictionary + Learn Spelling context menu item + + + + Search The Web + Search The Web context menu item + + + + Look Up In Dictionary + Look Up in Dictionary context menu item + + + + Open Link + Open Link context menu item + + + + Ignore + Ignore Grammar context menu item + + + + Spelling + Spelling and Grammar context sub-menu item + + + + Show Spelling and Grammar + menu item title + + + + Hide Spelling and Grammar + menu item title + + + + Check Spelling + Check spelling context menu item + + + + Check Spelling While Typing + Check spelling while typing context menu item + + + + Check Grammar With Spelling + Check grammar with spelling context menu item + + + + Fonts + Font context sub-menu item + + + + Bold + Bold context menu item + + + + Italic + Italic context menu item + + + + Underline + Underline context menu item + + + + Outline + Outline context menu item + + + + Direction + Writing direction context sub-menu item + + + + Text Direction + Text direction context sub-menu item + + + + Default + Default writing direction context menu item + + + + LTR + Left to Right context menu item + + + + RTL + Right to Left context menu item + + + + Inspect + Inspect Element context menu item + + + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + + + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + + + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + + + + Unknown + Unknown filesize FTP directory listing item + + + + %1 (%2x%3 pixels) + Title string for images + + + + + Web Inspector - %2 + + + + + Scroll here + + + + Left edge + + + + Top + + + + Right edge + + + + Bottom + + + + Page left + + + + Page up + + + + Page right + + + + Page down + + + + Scroll left + + + + Scroll up + + + + Scroll right + + + + Scroll down + + + + + %n file(s) + number of chosen file + + + + + + + + JavaScript Alert - %1 + + + + JavaScript Confirm - %1 + + + + JavaScript Prompt - %1 + + + + Move the cursor to the next character + + + + Move the cursor to the previous character + + + + Move the cursor to the next word + + + + Move the cursor to the previous word + + + + Move the cursor to the next line + + + + Move the cursor to the previous line + + + + Move the cursor to the start of the line + + + + Move the cursor to the end of the line + + + + Move the cursor to the start of the block + + + + Move the cursor to the end of the block + + + + Move the cursor to the start of the document + + + + Move the cursor to the end of the document + + + + Select to the next character + + + + Select to the previous character + + + + Select to the next word + + + + Select to the previous word + + + + Select to the next line + + + + Select to the previous line + + + + Select to the start of the line + + + + Select to the end of the line + + + + Select to the start of the block + + + + Select to the end of the block + + + + Select to the start of the document + + + + Select to the end of the document + + + + Delete to the start of the word + + + + Delete to the end of the word + + + + + QWhatsThisAction + + + What's This? + Mis see on? + + + + QWidget + + + * + * + + + + QWizard + + + Go Back + + + + Continue + + + + Commit + + + + Done + + + + Help + + + + < &Back + + + + &Finish + + + + Cancel + + + + &Help + + + + &Next + + + + &Next > + + + + + QWorkspace + + + &Restore + + + + &Move + + + + &Size + + + + Mi&nimize + + + + Ma&ximize + + + + &Close + + + + Stay on &Top + + + + Sh&ade + + + + %1 - [%2] + + + + Minimize + + + + Restore Down + + + + Close + + + + &Unshade + + + + + QXml + + + no error occurred + + + + error triggered by consumer + + + + unexpected end of file + + + + more than one document type definition + + + + error occurred while parsing element + + + + tag mismatch + + + + error occurred while parsing content + + + + unexpected character + + + + invalid name for processing instruction + + + + version expected while reading the XML declaration + + + + wrong value for standalone declaration + + + + encoding declaration or standalone declaration expected while reading the XML declaration + + + + standalone declaration expected while reading the XML declaration + + + + error occurred while parsing document type definition + + + + letter is expected + + + + error occurred while parsing comment + + + + error occurred while parsing reference + + + + internal general entity reference not allowed in DTD + + + + external parsed general entity reference not allowed in attribute value + + + + external parsed general entity reference not allowed in DTD + + + + unparsed entity reference in wrong context + + + + recursive entities + + + + error in the text declaration of an external entity + + + + + QXmlStream + + + Extra content at end of document. + + + + Invalid entity value. + + + + Invalid XML character. + + + + Sequence ']]>' not allowed in content. + + + + Namespace prefix '%1' not declared + + + + Attribute redefined. + + + + Unexpected character '%1' in public id literal. + + + + Invalid XML version string. + + + + Unsupported XML version. + + + + %1 is an invalid encoding name. + + + + Encoding %1 is unsupported + + + + Standalone accepts only yes or no. + + + + Invalid attribute in XML declaration. + + + + Premature end of document. + + + + Invalid document. + + + + Expected + + + + , but got ' + + + + Unexpected ' + + + + Expected character data. + + + + Recursive entity detected. + + + + Start tag expected. + + + + XML declaration not at start of document. + + + + NDATA in parameter entity declaration. + + + + %1 is an invalid processing instruction name. + + + + Invalid processing instruction name. + + + + Illegal namespace declaration. + + + + + Invalid XML name. + + + + Opening and ending tag mismatch. + + + + Reference to unparsed entity '%1'. + + + + Entity '%1' not declared. + + + + Reference to external entity '%1' in attribute value. + + + + Invalid character reference. + + + + Encountered incorrectly encoded content. + + + + The standalone pseudo attribute must appear after the encoding. + + + + + %1 is an invalid PUBLIC identifier. + + + + + QtXmlPatterns + + + An %1-attribute with value %2 has already been declared. + + + + An %1-attribute must have a valid %2 as value, which %3 isn't. + + + + + Network timeout. + + + + + Element %1 can't be serialized because it appears outside the document element. + + + + + Year %1 is invalid because it begins with %2. + + + + Day %1 is outside the range %2..%3. + + + + Month %1 is outside the range %2..%3. + + + + Overflow: Can't represent date %1. + + + + Day %1 is invalid for month %2. + + + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + + + + Time %1:%2:%3.%4 is invalid. + + + + Overflow: Date can't be represented. + + + + At least one component must be present. + + + + At least one time component must appear after the %1-delimiter. + + + + + No operand in an integer division, %1, can be %2. + + + + The first operand in an integer division, %1, cannot be infinity (%2). + + + + The second operand in a division, %1, cannot be zero (%2). + + + + + %1 is not a valid value of type %2. + + + + + When casting to %1 from %2, the source value cannot be %3. + + + + + Integer division (%1) by zero (%2) is undefined. + + + + Division (%1) by zero (%2) is undefined. + + + + Modulus division (%1) by zero (%2) is undefined. + + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + + + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + + + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + + + + + A value of type %1 cannot have an Effective Boolean Value. + + + + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + + + + + Value %1 of type %2 exceeds maximum (%3). + + + + Value %1 of type %2 is below minimum (%3). + + + + + A value of type %1 must contain an even number of digits. The value %2 does not. + + + + %1 is not valid as a value of type %2. + + + + + Operator %1 cannot be used on type %2. + + + + Operator %1 cannot be used on atomic values of type %2 and %3. + + + + + The namespace URI in the name for a computed attribute cannot be %1. + + + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + + + + + Type error in cast, expected %1, received %2. + + + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + + + + + No casting is possible with %1 as the target type. + + + + It is not possible to cast from %1 to %2. + + + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + + + + It's not possible to cast the value %1 of type %2 to %3 + + + + Failure when casting from %1 to %2: %3 + + + + + A comment cannot contain %1 + + + + A comment cannot end with a %1. + + + + + No comparisons can be done involving the type %1. + + + + Operator %1 is not available between atomic values of type %2 and %3. + + + + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + + + + + A library module cannot be evaluated directly. It must be imported from a main module. + + + + No template by name %1 exists. + + + + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + + + + A positional predicate must evaluate to a single numeric value. + + + + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + + + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + + + + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + + + + + The data of a processing instruction cannot contain the string %1 + + + + + No namespace binding exists for the prefix %1 + + + + + No namespace binding exists for the prefix %1 in %2 + + + + + %1 is an invalid %2 + + + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + + + + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + + + + + + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + + + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + + + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + + + + + %1 is not a valid XML 1.0 character. + + + + + The first argument to %1 cannot be of type %2. + + + + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + + + + + %1 was called. + + + + + %1 must be followed by %2 or %3, not at the end of the replacement string. + + + + In the replacement string, %1 must be followed by at least one digit when not escaped. + + + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + + + + + %1 matches newline characters + + + + %1 and %2 match the start and end of a line. + + + + Matches are case insensitive + + + + Whitespace characters are removed, except when they appear in character classes + + + + %1 is an invalid regular expression pattern: %2 + + + + %1 is an invalid flag for regular expressions. Valid flags are: + + + + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + + + + + It will not be possible to retrieve %1. + + + + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + + + + + The default collection is undefined + + + + %1 cannot be retrieved + + + + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + + + + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + + + + %1 is not a whole number of minutes. + + + + + Required cardinality is %1; got cardinality %2. + + + + + The item %1 did not match the required type %2. + + + + %1 is an unknown schema type. + + + + Only one %1 declaration can occur in the query prolog. + + + + The initialization of variable %1 depends on itself + + + + No variable by name %1 exists + + + + + The variable %1 is unused + + + + + Version %1 is not supported. The supported XQuery version is 1.0. + + + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + + + + No function with signature %1 is available + + + + A default namespace declaration must occur before function, variable, and option declarations. + + + + Namespace declarations must occur before function, variable, and option declarations. + + + + Module imports must occur before function, variable, and option declarations. + + + + It is not possible to redeclare prefix %1. + + + + Prefix %1 is already declared in the prolog. + + + + The name of an option must have a prefix. There is no default namespace for options. + + + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + + + + The target namespace of a %1 cannot be empty. + + + + The module import feature is not supported + + + + No value is available for the external variable by name %1. + + + + A construct was encountered which only is allowed in XQuery. + + + + A template by name %1 has already been declared. + + + + The keyword %1 cannot occur with any other mode name. + + + + The value of attribute %1 must of type %2, which %3 isn't. + + + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + + + + A variable by name %1 has already been declared. + + + + A stylesheet function must have a prefixed name. + + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + + + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + + + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + + + + A function already exists with the signature %1. + + + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + + + + An argument by name %1 has already been declared. Every argument name must be unique. + + + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + + + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + + + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + + + + In an XSL-T pattern, function %1 cannot have a third argument. + + + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + + + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + + + + %1 is an invalid template mode name. + + + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + + + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + + + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + + + + Each name of a template parameter must be unique; %1 is duplicated. + + + + The %1-axis is unsupported in XQuery + + + + %1 is not a valid name for a processing-instruction. + + + + %1 is not a valid numeric literal. + + + + No function by name %1 is available. + + + + The namespace URI cannot be the empty string when binding to a prefix, %1. + + + + %1 is an invalid namespace URI. + + + + It is not possible to bind to the prefix %1 + + + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + + + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + + + + Two namespace declaration attributes have the same name: %1. + + + + The namespace URI must be a constant and cannot use enclosed expressions. + + + + An attribute by name %1 has already appeared on this element. + + + + A direct element constructor is not well-formed. %1 is ended with %2. + + + + The name %1 does not refer to any schema type. + + + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + + + + %1 is not an atomic type. Casting is only possible to atomic types. + + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + + + + The name of an extension expression must be in a namespace. + + + + + empty + + + + zero or one + + + + exactly one + + + + one or more + + + + zero or more + + + + + Required type is %1, but %2 was found. + + + + Promoting %1 to %2 may cause loss of precision. + + + + The focus is undefined. + + + + + It's not possible to add attributes after any other kind of node. + + + + An attribute by name %1 has already been created. + + + + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + + + + + Attribute %1 can't be serialized because it appears at the top level. + + + + + %1 is an unsupported encoding. + + + + %1 contains octets which are disallowed in the requested encoding %2. + + + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + + + + + Ambiguous rule match. + + + + + In a namespace constructor, the value for a namespace value cannot be an empty string. + + + + The prefix must be a valid %1, which %2 is not. + + + + The prefix %1 cannot be bound. + + + + Only the prefix %1 can be bound to %2 and vice versa. + + + + + Circularity detected + + + + + The parameter %1 is required, but no corresponding %2 is supplied. + + + + The parameter %1 is passed, but no corresponding %2 exists. + + + + + The URI cannot have a fragment + + + + + Element %1 is not allowed at this location. + + + + Text nodes are not allowed at this location. + + + + Parse error: %1 + + + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + + + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + + + + Unknown XSL-T attribute %1. + + + + Attribute %1 and %2 are mutually exclusive. + + + + In a simplified stylesheet module, attribute %1 must be present. + + + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + + + + Element %1 must have at least one of the attributes %2 or %3. + + + + At least one mode must be specified in the %1-attribute on element %2. + + + + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + + + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + + + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + + + + The attribute %1 must appear on element %2. + + + + The element with local name %1 does not exist in XSL-T. + + + + + Element %1 must come last. + + + + At least one %1-element must occur before %2. + + + + Only one %1-element can appear. + + + + At least one %1-element must occur inside %2. + + + + When attribute %1 is present on %2, a sequence constructor cannot be used. + + + + Element %1 must have either a %2-attribute or a sequence constructor. + + + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + + + + Element %1 cannot have children. + + + + Element %1 cannot have a sequence constructor. + + + + The attribute %1 cannot appear on %2, when it is a child of %3. + + + + A parameter in a function cannot be declared to be a tunnel. + + + + This processor is not Schema-aware and therefore %1 cannot be used. + + + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + + + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + + + + Attribute %1 cannot have the value %2. + + + + The attribute %1 can only appear on the first %2 element. + + + + At least one %1 element must appear as child of %2. + + + + + VolumeSlider + + + Muted + + + + Volume: %1% + + + + diff -Nru qesteidutil-0.3.1/common/translations/qt_ru.ts qesteidutil-0.3.1/common/translations/qt_ru.ts --- qesteidutil-0.3.1/common/translations/qt_ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/translations/qt_ru.ts 2009-12-17 01:25:47.000000000 +0000 @@ -0,0 +1,7747 @@ + + + + + AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>Звуковое устройство <b>%1</b> не работает.<br/>Будет использоваться <b>%2</b>.</html> + + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>Переключение на звуковое устройство <b>%1</b><br/>, которое доступно и имеет высший приоритет.</html> + + + + Revert back to device '%1' + Возвращение к устройству '%1' + + + + CloseButton + + + Close Tab + Закрыть вкладку + + + + Phonon:: + + + Notifications + Уведомления + + + + Music + Музыка + + + + Video + Видео + + + + Communication + Общение + + + + Games + Игры + + + + Accessibility + Средства для людей с ограниченными возможностями + + + + Phonon::Gstreamer::Backend + + + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled. + Внимание: Похоже, пакет gstreamer0.10-plugins-good не установлен. + Некоторые возможности воспроизведения видео недоступны. + + + + Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled + Внимание: Похоже, основной модуль GStreamer не установлен. + Поддержка видео и аудио отключена + + + + Phonon::Gstreamer::MediaObject + + + Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed. + Невозможно начать воспроизведение. + +Проверьте установку Gstreamer и убедитесь, +что пакет libgstreamer-plugins-base установлен. + + + + A required codec is missing. You need to install the following codec(s) to play this content: %0 + Отсутствует необходимый кодек. Вам нужно установить следующие кодеки для воспроизведения данного содержимого: %0 + + + + + + + + + + + Could not open media source. + Не удалось открыть источник медиа-данных. + + + + Invalid source type. + Неверный тип источника медиа-данных. + + + + Could not locate media source. + Не удалось найти источник медиа-данных. + + + + Could not open audio device. The device is already in use. + Не удалось открыть звуковое устройство. Устройство уже используется. + + + + Could not decode media source. + Не удалось декодировать источник медиа-данных. + + + + Phonon::VolumeSlider + + + + Volume: %1% + Громкость: %1% + + + + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% + Используйте данный ползунок для настройки громкости. Крайнее левое положение соответствует 0%, крайнее правое - %1% + + + + Q3Accel + + + %1, %2 not defined + %1, %2 не определен + + + + Ambiguous %1 not handled + Неоднозначный %1 не обрабатывается + + + + Q3DataTable + + + True + Да + + + + False + Нет + + + + Insert + Вставить + + + + Update + Обновить + + + + Delete + Удалить + + + + Q3FileDialog + + + Copy or Move a File + Копировать или переместить файл + + + + Read: %1 + Чтение: %1 + + + + + Write: %1 + Запись: %1 + + + + + Cancel + Отмена + + + + + + + All Files (*) + Все файлы (*) + + + + Name + Имя + + + + Size + Размер + + + + Type + Тип + + + + Date + Дата + + + + Attributes + Атрибуты + + + + + &OK + &Готово + + + + Look &in: + &Папка: + + + + + + File &name: + &Имя файла: + + + + File &type: + &Тип файла: + + + + Back + Назад + + + + One directory up + На один уровень вверх + + + + Create New Folder + Создать папку + + + + List View + Список + + + + Detail View + Подробный вид + + + + Preview File Info + Предпросмотр информации о файле + + + + Preview File Contents + Предпросмотр содержимого файла + + + + Read-write + Чтение и запись + + + + Read-only + Только чтение + + + + Write-only + Только запись + + + + Inaccessible + Нет доступа + + + + Symlink to File + Ссылка на файл + + + + Symlink to Directory + Ссылка на каталог + + + + Symlink to Special + Ссылка на спецфайл + + + + File + Файл + + + + Dir + Каталог + + + + Special + Спецфайл + + + + + + Open + Открыть + + + + + Save As + Сохранить как + + + + + + &Open + &Открыть + + + + + &Save + &Сохранить + + + + &Rename + &Переименовать + + + + &Delete + &Удалить + + + + R&eload + О&бновить + + + + Sort by &Name + По &имени + + + + Sort by &Size + По &размеру + + + + Sort by &Date + По &дате + + + + &Unsorted + &Не упорядочивать + + + + Sort + Упорядочить + + + + Show &hidden files + Показать скр&ытые файлы + + + + the file + файл + + + + the directory + каталог + + + + the symlink + ссылку + + + + Delete %1 + Удалить %1 + + + + <qt>Are you sure you wish to delete %1 "%2"?</qt> + <qt>Вы действительно хотите удалить %1 "%2"?</qt> + + + + &Yes + &Да + + + + &No + &Нет + + + + New Folder 1 + Новая папка 1 + + + + New Folder + Новая папка + + + + New Folder %1 + Новая папка %1 + + + + Find Directory + Найти каталог + + + + + Directories + Каталоги + + + + Directory: + Каталог: + + + + + Error + Ошибка + + + + %1 +File not found. +Check path and filename. + %1 +Файл не найден. +Проверьте правильность пути и имени файла. + + + + All Files (*.*) + Все файлы (*.*) + + + + Open + Открыть + + + + Select a Directory + Выбрать каталог + + + + Q3LocalFs + + + + Could not read directory +%1 + Не удалось прочитать каталог +%1 + + + + Could not create directory +%1 + Не удалось создать каталог +%1 + + + + Could not remove file or directory +%1 + Не удалось удалить файл или каталог +%1 + + + + Could not rename +%1 +to +%2 + Не удалось переименовать +%1 +в +%2 + + + + Could not open +%1 + Не удалось открыть +%1 + + + + Could not write +%1 + Не удалось записать +%1 + + + + Q3MainWindow + + + Line up + Выровнять + + + + Customize... + Настроить... + + + + Q3NetworkProtocol + + + Operation stopped by the user + Операция остановлена пользователем + + + + Q3ProgressDialog + + + + Cancel + Отмена + + + + Q3TabDialog + + + + OK + Готово + + + + Apply + Применить + + + + Help + Справка + + + + Defaults + По умолчанию + + + + Cancel + Отмена + + + + Q3TextEdit + + + &Undo + &Отменить действие + + + + &Redo + &Повторить действие + + + + Cu&t + &Вырезать + + + + &Copy + &Копировать + + + + &Paste + В&ставить + + + + Clear + Очистить + + + + + Select All + Выделить всё + + + + Q3TitleBar + + + System + Системное меню + + + + Restore up + Восстановить + + + + Minimize + Свернуть + + + + Restore down + Восстановить + + + + Maximize + Распахнуть + + + + Close + Закрыть + + + + Contains commands to manipulate the window + Содержит команды управления окном + + + + Puts a minimized back to normal + Возвращает свёрнутое окно в нормальное состояние + + + + Moves the window out of the way + Сворачивает окно + + + + Puts a maximized window back to normal + Возвращает распахнутое окно в нормальное состояние + + + + Makes the window full screen + Разворачивает окно на весь экран + + + + Closes the window + Зыкрывает окно + + + + Displays the name of the window and contains controls to manipulate it + Отображает название окна и содержит команды управления им + + + + Q3ToolBar + + + More... + Больше... + + + + Q3UrlOperator + + + + + The protocol `%1' is not supported + Протокол '%1' не поддерживается + + + + The protocol `%1' does not support listing directories + Протокол '%1' не поддерживает просмотр каталогов + + + + The protocol `%1' does not support creating new directories + Протокол '%1' не поддерживает создание каталогов + + + + The protocol `%1' does not support removing files or directories + Протокол '%1' не поддерживает удаление файлов или каталогов + + + + The protocol `%1' does not support renaming files or directories + Протокол '%1' не поддерживает переименование файлов или каталогов + + + + The protocol `%1' does not support getting files + Протокол '%1' не поддерживает доставку файлов + + + + The protocol `%1' does not support putting files + Протокол '%1' не поддерживает отправку файлов + + + + + The protocol `%1' does not support copying or moving files or directories + Протокол '%1' не поддерживает копирование или перемещение файлов или каталогов + + + + + (unknown) + (неизвестно) + + + + Q3Wizard + + + &Cancel + &Отмена + + + + < &Back + < &Назад + + + + &Next > + &Далее > + + + + &Finish + &Завершить + + + + &Help + &Справка + + + + QAbstractSocket + + + + + + Host not found + Узел не найден + + + + + + Connection refused + Отказано в соединении + + + + Connection timed out + Время на соединение истекло + + + + + + Operation on socket is not supported + Операция с сокетом не поддерживается + + + + Socket operation timed out + Время на операцию с сокетом истекло + + + + Socket is not connected + Сокет не подключён + + + + Network unreachable + Сеть недоступна + + + + QAbstractSpinBox + + + &Step up + Шаг вв&ерх + + + + Step &down + Шаг вн&из + + + + &Select All + &Выделить всё + + + + QApplication + + + Activate + Активировать + + + + Executable '%1' requires Qt %2, found Qt %3. + Программный модуль '%1' требует Qt %2, найдена версия %3. + + + + Incompatible Qt Library Error + Ошибка совместимости библиотеки Qt + + + + QT_LAYOUT_DIRECTION + Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. + LTR + + + + Activates the program's main window + Активирует главное окно программы + + + + QAxSelect + + + Select ActiveX Control + Выбор компоненты ActiveX + + + + OK + Выбрать + + + + &Cancel + &Отмена + + + + COM &Object: + COM &Объект: + + + + QCheckBox + + + Uncheck + Снять отметку + + + + Check + Отметить + + + + Toggle + Переключить + + + + QColorDialog + + + Hu&e: + &Тон: + + + + &Sat: + &Нас: + + + + &Val: + &Ярк: + + + + &Red: + &Красный: + + + + &Green: + &Зелёный: + + + + Bl&ue: + С&иний: + + + + A&lpha channel: + &Альфа-канал: + + + + Select Color + Выбор цвета + + + + &Basic colors + &Основные цвета + + + + &Custom colors + &Произвольные цвета + + + + &Add to Custom Colors + &Добавить к произвольным цветам + + + + QComboBox + + + + Open + Открыть + + + + False + Нет + + + + True + Да + + + + Close + Закрыть + + + + QCoreApplication + + + %1: key is empty + QSystemSemaphore + %1: пустой ключ + + + + %1: unable to make key + QSystemSemaphore + %1: невозможно создать ключ + + + + %1: ftok failed + QSystemSemaphore + %1: ошибка ftok + + + + QDB2Driver + + + Unable to connect + Невозможно соединиться + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + Unable to set autocommit + Невозможно установить автовыполнение транзакции + + + + QDB2Result + + + + Unable to execute statement + Невозможно выполнить выражение + + + + Unable to prepare statement + Невозможно подготовить выражение + + + + Unable to bind variable + Невозможно привязать значение + + + + Unable to fetch record %1 + Невозможно получить запись %1 + + + + Unable to fetch next + Невозможно получить следующую строку + + + + Unable to fetch first + Невозможно получить первую строку + + + + QDateTimeEdit + + + AM + + + + + am + + + + + PM + + + + + pm + + + + + QDial + + + QDial + + + + + SpeedoMeter + + + + + SliderHandle + + + + + QDialog + + + What's This? + Что это? + + + + Done + Готово + + + + QDialogButtonBox + + + + + OK + Готово + + + + &OK + &Готово + + + + &Save + &Сохранить + + + + Save + Сохранить + + + + Open + Открыть + + + + &Cancel + &Отмена + + + + Cancel + Отмена + + + + &Close + &Закрыть + + + + Close + Закрыть + + + + Apply + Применить + + + + Reset + Сбросить + + + + Help + Справка + + + + Don't Save + Не сохранять + + + + Discard + Отклонить + + + + &Yes + &Да + + + + Yes to &All + Да для &всех + + + + &No + &Нет + + + + N&o to All + Н&ет для всех + + + + Save All + Сохранить все + + + + Abort + Прервать + + + + Retry + Повторить + + + + Ignore + Пропустить + + + + Restore Defaults + Восстановить значения по умолчанию + + + + Close without Saving + Закрыть без сохранения + + + + QDirModel + + + Name + Имя + + + + Size + Размер + + + + Kind + Match OS X Finder + Вид + + + + Type + All other platforms + Тип + + + + Date Modified + Дата изменения + + + + QDockWidget + + + Close + Закрыть + + + + Dock + + + + + Float + + + + + QDoubleSpinBox + + + More + Больше + + + + Less + Меньше + + + + QErrorMessage + + + Debug Message: + Отладочное сообщение: + + + + Warning: + Предупреждение: + + + + Fatal Error: + Критическая ошибка: + + + + &Show this message again + &Показывать это сообщение в дальнейшем + + + + &OK + &Закрыть + + + + QFile + + + + Destination file exists + Файл существует + + + + Will not rename sequential file using block copy + Последовательный файл не будет переименовываться с использованием поблочного копирования + + + + Cannot remove source file + Невозможно удалить исходный файл + + + + Cannot open %1 for input + Невозможно открыть %1 для ввода + + + + Cannot open for output + Невозможно открыть для вывода + + + + Failure to write block + Сбой записи блока + + + + Cannot create %1 for output + Невозможно создать %1 для вывода + + + + QFileDialog + + + + All Files (*) + Все файлы (*) + + + + Directories + Каталоги + + + + + + + &Open + &Открыть + + + + + &Save + &Сохранить + + + + Open + Открыть + + + + %1 already exists. +Do you want to replace it? + %1 уже существует. +Хотите заменить его? + + + + %1 +File not found. +Please verify the correct file name was given. + %1 +Файл не найден. +Проверьте правильность указанного имени файла. + + + + My Computer + Мой компьютер + + + + &Rename + &Переименовать + + + + &Delete + &Удалить + + + + Show &hidden files + Показать скр&ытые файлы + + + + + Back + Назад + + + + + Parent Directory + Родительский каталог + + + + + List View + Список + + + + + Detail View + Подробный вид + + + + + Files of type: + Типы файлов: + + + + + Directory: + Каталог: + + + + + %1 +Directory not found. +Please verify the correct directory name was given. + %1 +Каталог не найден. +Проверьте правильность указанного имени каталога. + + + + '%1' is write protected. +Do you want to delete it anyway? + '%1' защищён от записи. +Всё-равно хотите удалить? + + + + Are sure you want to delete '%1'? + Вы уверены, что хотите удалить '%1'? + + + + Could not delete directory. + Не удалось удалить каталог. + + + + Recent Places + Недавние документы + + + + All Files (*.*) + Все файлы (*.*) + + + + Save As + Сохранить как + + + + Drive + Диск + + + + + File + Файл + + + + Unknown + Неизвестный + + + + Find Directory + Найти каталог + + + + Show + Показать + + + + + Forward + Вперёд + + + + New Folder + Новая папка + + + + &New Folder + &Новая папка + + + + + &Choose + &Выбрать + + + + Remove + Удалить + + + + + File &name: + &Имя файла: + + + + + Look in: + Перейти к: + + + + + Create New Folder + Создать папку + + + + QFileSystemModel + + + Invalid filename + Некорректное имя файла + + + + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. + <b>Имя "%1" не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации. + + + + Name + Имя + + + + Size + Размер + + + + Kind + Match OS X Finder + Вид + + + + Type + All other platforms + Тип + + + + Date Modified + Дата изменения + + + + My Computer + Мой компьютер + + + + Computer + Компьютер + + + + %1 TB + %1 Тб + + + + %1 GB + %1 Гб + + + + %1 MB + %1 Мб + + + + %1 KB + %1 Кб + + + + %1 bytes + %1 байт + + + + QFontDatabase + + + + Normal + Обычный + + + + + + Bold + Жирный + + + + + Demi Bold + Полужирный + + + + + + Black + Чёрный + + + + Demi + Средний + + + + + Light + Светлый + + + + + Italic + Курсив + + + + + Oblique + Наклонный + + + + Any + Любая + + + + Latin + Латиница + + + + Greek + Греческая + + + + Cyrillic + Кириллица + + + + Armenian + Армянская + + + + Hebrew + Иврит + + + + Arabic + + + + + Syriac + Сирийская + + + + Thaana + + + + + Devanagari + + + + + Bengali + + + + + Gurmukhi + + + + + Gujarati + + + + + Oriya + + + + + Tamil + + + + + Telugu + + + + + Kannada + + + + + Malayalam + + + + + Sinhala + + + + + Thai + Тайская + + + + Lao + + + + + Tibetan + Тибетская + + + + Myanmar + + + + + Georgian + Грузинская + + + + Khmer + Кхмерская + + + + Simplified Chinese + Китайская упрощенная + + + + Traditional Chinese + Китайская традиционная + + + + Japanese + Японская + + + + Korean + Корейская + + + + Vietnamese + Вьетнамская + + + + Symbol + Символьная + + + + Ogham + + + + + Runic + Руническая + + + + QFontDialog + + + &Font + &Шрифт + + + + Font st&yle + Ст&иль шрифта + + + + &Size + &Размер + + + + Effects + Эффекты + + + + Stri&keout + Зачёр&кнутый + + + + &Underline + П&одчёркнутый + + + + Sample + Пример + + + + Wr&iting System + &Система письма + + + + + Select Font + Выбор шрифта + + + + QFtp + + + + Not connected + Соединение не установлено + + + + + Host %1 not found + Узел %1 не найден + + + + + Connection refused to host %1 + В соединении с узлом %1 отказано + + + + Connection timed out to host %1 + Время на соединение с узлом %1 истекло + + + + + + Connected to host %1 + Установлено соединение с узлом %1 + + + + + Connection refused for data connection + Отказ в соединении для передачи данных + + + + + + + Unknown error + Неизвестная ошибка + + + + + Connecting to host failed: +%1 + Не удалось соединиться с узлом: +%1 + + + + + Login failed: +%1 + Не удалось авторизоваться: +%1 + + + + + Listing directory failed: +%1 + Не удалось прочитать каталог: +%1 + + + + + Changing directory failed: +%1 + Не удалось сменить каталог: +%1 + + + + + Downloading file failed: +%1 + Не удалось загрузить файл: +%1 + + + + + Uploading file failed: +%1 + Не удалось отгрузить файл: +%1 + + + + + Removing file failed: +%1 + Не удалось удалить файл: +%1 + + + + + Creating directory failed: +%1 + Не удалось создать каталог: +%1 + + + + + Removing directory failed: +%1 + Не удалось удалить каталог: +%1 + + + + + + Connection closed + Соединение закрыто + + + + Host %1 found + Узел %1 найден + + + + Connection to %1 closed + Соединение с %1 закрыто + + + + Host found + Узел найден + + + + Connected to host + Соединение с узлом установлено + + + + QHostInfo + + + Unknown error + Неизвестная ошибка + + + + QHostInfoAgent + + + + + + + + + + Host not found + Узел не найден + + + + + + + Unknown address type + Неизвестный тип адреса + + + + + + Unknown error + Неизвестная ошибка + + + + QHttp + + + + + + Unknown error + Неизвестная ошибка + + + + + Request aborted + Запрос прерван + + + + + No server set to connect to + Не указан сервер для подключения + + + + + Wrong content length + Неверная длина содержимого + + + + + Server closed connection unexpectedly + Сервер неожиданно разорвал соединение + + + + Unknown authentication method + Неизвестный метод авторизации + + + + Error writing response to device + Ошибка записи ответа на устройство + + + + + Connection refused + Отказано в соединении + + + + + + Host %1 not found + Узел %1 не найден + + + + + + + HTTP request failed + HTTP-запрос не удался + + + + + Invalid HTTP response header + Некорректный HTTP-заголовок ответа + + + + + + + Invalid HTTP chunked body + Некорректное HTTP-фрагментирование данных + + + + Host %1 found + Узел %1 найден + + + + Connected to host %1 + Установлено соединение с узлом %1 + + + + Connection to %1 closed + Соединение с узлом %1 закрыто + + + + Host found + Узел найден + + + + Connected to host + Соединение с узлом установлено + + + + + Connection closed + Соединение закрыто + + + + Proxy authentication required + Требуется авторизация на прокси-сервере + + + + Authentication required + Требуется авторизация + + + + Connection refused (or timed out) + В соединении отказано (или время ожидания истекло) + + + + Proxy requires authentication + Прокси сервер требует авторизацию + + + + Host requires authentication + Узел требует авторизацию + + + + Data corrupted + Данные повреждены + + + + Unknown protocol specified + Указан неизвестный протокол + + + + SSL handshake failed + Квитирование SSL не удалось + + + + HTTPS connection requested but SSL support not compiled in + Запрошено соединение по протоколу HTTPS, но поддержка SSL не скомпилирована + + + + QHttpSocketEngine + + + Did not receive HTTP response from proxy + Не получен HTTP-ответ от прокси-сервера + + + + Error parsing authentication request from proxy + Ошибка разбора запроса авторизации от прокси-сервера + + + + Authentication required + Требуется авторизация + + + + Proxy denied connection + Прокси-сервер запретил соединение + + + + Error communicating with HTTP proxy + Ошибка обмена данными с прокси-сервером HTTP + + + + Proxy server not found + Прокси-сервер не найден + + + + Proxy connection refused + В соединении прокси-сервером отказано + + + + Proxy server connection timed out + Время на соединение с прокси-сервером истекло + + + + Proxy connection closed prematurely + Соединение с прокси-сервером неожиданно закрыто + + + + QIBaseDriver + + + Error opening database + Ошибка открытия базы данных + + + + Could not start transaction + Не удалось начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + QIBaseResult + + + Unable to create BLOB + Невозможно создать BLOB + + + + Unable to write BLOB + Невозможно записать BLOB + + + + Unable to open BLOB + Невозможно открыть BLOB + + + + Unable to read BLOB + Невозможно прочитать BLOB + + + + + Could not find array + Не удалось найти массив + + + + Could not get array data + Не удалось найти данные массива + + + + Could not get query info + Не удалось найти информацию о запросе + + + + Could not start transaction + Не удалось начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Could not allocate statement + Не удалось получить ресурсы для создания выражения + + + + Could not prepare statement + Не удалось подготовить выражение + + + + + Could not describe input statement + Не удалось описать входящее выражение + + + + Could not describe statement + Не удалось описать выражение + + + + Unable to close statement + Невозможно закрыть выражение + + + + Unable to execute query + Невозможно выполнить запрос + + + + Could not fetch next item + Не удалось получить следующий элемент + + + + Could not get statement info + Не удалось найти информацию о выражении + + + + QIODevice + + + Permission denied + Доступ запрещён + + + + Too many open files + Слишком много открытых файлов + + + + No such file or directory + Файл или каталог не существует + + + + No space left on device + Нет свободного места на устройстве + + + + Unknown error + Неизвестная ошибка + + + + QInputContext + + + XIM + Метод ввода X-сервера + + + + XIM input method + Метод ввода X-сервера + + + + Windows input method + Метод ввода Windows + + + + Mac OS X input method + Метод ввода Mac OS X + + + + QInputDialog + + + Enter a value: + Укажите значение: + + + + QLibrary + + + Could not mmap '%1': %2 + Не удалось выполнить mmap '%1': %2 + + + + Plugin verification data mismatch in '%1' + Проверочная информация для модуля '%1' не совпадает + + + + Could not unmap '%1': %2 + Не удалось выполнить unmap '%1': %2 + + + + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] + Модуль '%1' использует несоместимую библиотеку Qt. (%2.%3.%4) [%5] + + + + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" + Модуль '%1' использует несоместимую библиотеку Qt. Ожидается ключ "%2", но получен ключ "%3" + + + + Unknown error + Неизвестная ошибка + + + + + The shared library was not found. + Динамическая библиотека не найдена. + + + + The file '%1' is not a valid Qt plugin. + Файл '%1' - не является корректным модулем Qt. + + + + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) + Модуль '%1' использует несоместимую библиотеку Qt. (Невозможно совместить релизные и отладочные библиотеки.) + + + + + Cannot load library %1: %2 + Невозможно загрузить библиотеку %1: %2 + + + + + Cannot unload library %1: %2 + Невозможно выгрузить библиотеку %1: %2 + + + + + Cannot resolve symbol "%1" in %2: %3 + Невозможно разрешить символ "%1" в %2: %3 + + + + QLineEdit + + + &Undo + &Отменить действие + + + + &Redo + &Повторить действие + + + + Cu&t + &Вырезать + + + + &Copy + &Копировать + + + + &Paste + В&ставить + + + + Delete + Удалить + + + + Select All + Выделить всё + + + + QLocalServer + + + + %1: Name error + %1: Некорректное имя + + + + %1: Permission denied + %1: Доступ запрещён + + + + %1: Address in use + %1: Адрес используется + + + + + %1: Unknown error %2 + %1: Неизвестная ошибка %2 + + + + QLocalSocket + + + + %1: Connection refused + %1: Отказано в соединении + + + + + %1: Remote closed + %1: Закрыто удаленной стороной + + + + + + + %1: Invalid name + %1: Некорректное имя + + + + + %1: Socket access error + %1: Ошибка обращения к сокету + + + + + %1: Socket resource error + %1: Ошибка выделения ресурсов сокета + + + + + %1: Socket operation timed out + %1: Время на операцию с сокетом истекло + + + + + %1: Datagram too large + %1: Датаграмма слишком большая + + + + + + %1: Connection error + %1: Ошибка соединения + + + + + %1: The socket operation is not supported + %1: Операция с сокетом не поддерживается + + + + %1: Unknown error + %1: Неизвестная ошибка + + + + + %1: Unknown error %2 + %1: Неизвестная ошибка %2 + + + + QMYSQLDriver + + + Unable to open database ' + Невозможно открыть базу данных ' + + + + Unable to connect + Невозможно соединиться + + + + Unable to begin transaction + Невозможно начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + QMYSQLResult + + + Unable to fetch data + Невозможно получить данные + + + + Unable to execute query + Невозможно выполнить запрос + + + + Unable to store result + Невозможно сохранить результат + + + + + Unable to prepare statement + Невозможно подготовить выражение + + + + Unable to reset statement + Невозможно сбросить выражение + + + + Unable to bind value + Невозможно привязать значение + + + + Unable to execute statement + Невозможно выполнить выражение + + + + + Unable to bind outvalues + Невозможно привязать результирующие значения + + + + Unable to store statement results + Невозможно сохранить результаты выполнения выражения + + + + Unable to execute next query + Невозможно выполнить следующий запрос + + + + Unable to store next result + Невозможно сохранить следующий результат + + + + QMdiArea + + + (Untitled) + (Неозаглавлено) + + + + QMdiSubWindow + + + %1 - [%2] + %1 - [%2] + + + + Close + Закрыть + + + + Minimize + Свернуть + + + + Restore Down + Восстановить + + + + &Restore + &Восстановить + + + + &Move + &Переместить + + + + &Size + &Размер + + + + Mi&nimize + &Свернуть + + + + Ma&ximize + Р&аспахнуть + + + + Stay on &Top + Оставаться &сверху + + + + &Close + &Закрыть + + + + - [%1] + - [%1] + + + + Maximize + Распахнуть + + + + Unshade + Восстановить из заголовка + + + + Shade + Свернуть в заголовок + + + + Restore + Восстановить + + + + Help + Справка + + + + Menu + Меню + + + + QMenu + + + + Close + Закрыть + + + + + Open + Открыть + + + + + + Execute + Выполнить + + + + QMessageBox + + + Help + Справка + + + + + + + OK + Закрыть + + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> + <h3>О Qt</h3><p>Данная программа использует Qt версии %1.</p><p>Qt - это инструментарий для разработки кроссплатформенных приложений на C++.</p><p>Qt предоставляет совместимость на уровне исходных текстов между MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux и всеми популярными коммерческими вариантами Unix. Также Qt доступна для встраиваемых устройств в виде Qt для Embedded Linux и Qt для Windows CE.</p><p>Qt доступна под тремя различными лицензиями, разработанными для удовлетворения требований различных пользователей.</p>Qt под нашей коммерческой лицензией предназначена для развития проприетарного/коммерческого программного обеспечения, когда Вы не желаете предоставлять исходные коды третьим сторонам, или в случае невозможности принятия условий лицензий GNU LGPL версии 2.1 или GNU GPL версии 3.0.</p><p>Qt под лицензией GNU LGPL версии 2.1 предназначена для разработки программного обеспечения с открытым исходным кодом или коммерческого программного обеспечения при соблюдении постановлений и условий лицензии GNU LGPL версии 2.1.</p><p>Qt под лицензией GNU General Public License версии 3.0 предназначена для разработки программных приложений в тех случаях, когда Вы хотели бы использовать такие приложения в сочетании с программным обеспечением на условиях лицензии GNU GPL с версии 3.0 или если Вы готовы соблюдать условия лицензии GNU GPL версии 3.0.</p><p>Обратитесь к <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> для обзора лицензий Qt.</p><p>Copyright (C) 2009 Корпорация Nokia и/или её дочерние подразделения.</p><p>Qt - продукт компании Nokia. Обратитесь к <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> для получения дополнительной информации.</p> + + + + About Qt + О Qt + + + + Show Details... + Показать подробности... + + + + Hide Details... + Скрыть подробности... + + + + QMultiInputContext + + + Select IM + Выбор режима ввода + + + + QMultiInputContextPlugin + + + Multiple input method switcher + + + + + Multiple input method switcher that uses the context menu of the text widgets + + + + + QNativeSocketEngine + + + The remote host closed the connection + Удалённый узел закрыл соединение + + + + Network operation timed out + Время на сетевую операцию истекло + + + + Out of resources + Недостаточно ресурсов + + + + Unsupported socket operation + Операция с сокетом не поддерживается + + + + Protocol type not supported + Протокол не поддерживается + + + + Invalid socket descriptor + Некорректный дескриптор сокета + + + + Network unreachable + Сеть недоступна + + + + Permission denied + Доступ запрещён + + + + Connection timed out + Время на соединение истекло + + + + Connection refused + Отказано в соединении + + + + The bound address is already in use + Адрес уже используется + + + + The address is not available + Адрес недоступен + + + + The address is protected + Адрес защищён + + + + Unable to send a message + Невозможно отправить сообщение + + + + Unable to receive a message + Невозможно получить сообщение + + + + Unable to write + Невозможно записать + + + + Network error + Ошибка сети + + + + Another socket is already listening on the same port + Другой сокет уже прослушивает этот порт + + + + Unable to initialize non-blocking socket + Невозможно инициализировать не-блочный сокет + + + + Unable to initialize broadcast socket + Невозможно инициализировать широковещательный сокет + + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Попытка использовать IPv6 на платформе, не поддерживающей IPv6 + + + + Host unreachable + Узел недоступен + + + + Datagram was too large to send + Датаграмма слишком большая для отправки + + + + Operation on non-socket + Операция с не-сокетом + + + + Unknown error + Неизвестная ошибка + + + + The proxy type is invalid for this operation + Некорректный тип прокси-сервера для данной операции + + + + QNetworkAccessCacheBackend + + + Error opening %1 + Ошибка открытия %1 + + + + QNetworkAccessFileBackend + + + Request for opening non-local file %1 + Запрос на открытие файла вне файловой системы %1 + + + + Error opening %1: %2 + Ошибка открытия %1: %2 + + + + Write error writing to %1: %2 + Ошибка записи в %1: %2 + + + + Cannot open %1: Path is a directory + Невозможно открыть %1: Указан путь к каталогу + + + + Read error reading from %1: %2 + Ошибка чтения из %1: %2 + + + + QNetworkAccessFtpBackend + + + No suitable proxy found + Подходящий прокси-сервер не найден + + + + Cannot open %1: is a directory + Невозможно открыть %1: Указан путь к каталогу + + + + Logging in to %1 failed: authentication required + Соединение с %1 не удалось: требуется авторизация + + + + Error while downloading %1: %2 + Ошибка в процессе загрузки %1: %2 + + + + Error while uploading %1: %2 + Ошибка в процессе отгрузки %1: %2 + + + + QNetworkAccessHttpBackend + + + No suitable proxy found + Подходящий прокси-сервер не найден + + + + QNetworkReply + + + Error downloading %1 - server replied: %2 + Ошибка загрузки %1 - ответ сервера: %2 + + + + Protocol "%1" is unknown + Неизвестный протокол "%1" + + + + QNetworkReplyImpl + + + + Operation canceled + Операция отменена + + + + QOCIDriver + + + Unable to logon + Невозможно авторизоваться + + + + Unable to initialize + QOCIDriver + Невозможно инициализировать + + + + Unable to begin transaction + Невозможно начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + QOCIResult + + + + + Unable to bind column for batch execute + Невозможно привязать столбец для пакетного выполнения + + + + Unable to execute batch statement + Невозможно выполнить пакетное выражение + + + + Unable to goto next + Невозможно перейти к следующей строке + + + + Unable to alloc statement + Невозможно создать выражение + + + + Unable to prepare statement + Невозможно подготовить выражение + + + + Unable to get statement type + Невозможно определить тип выражения + + + + Unable to bind value + Невозможно привязать результирующие значения + + + + Unable to execute statement + Невозможно выполнить выражение + + + + QODBCDriver + + + Unable to connect + Невозможно соединиться + + + + Unable to connect - Driver doesn't support all needed functionality + Невозможно соединиться - Драйвер не поддерживает требуемый функционал + + + + Unable to disable autocommit + Невозможно отключить автовыполнение транзакции + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + Unable to enable autocommit + Невозможно установить автовыполнение транзакции + + + + QODBCResult + + + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + QODBCResult::reset: Невозможно установить 'SQL_CURSOR_STATIC' атрибутом выражение. Проверьте настройки драйвера ODBC + + + + + Unable to execute statement + Невозможно выполнить выражение + + + + Unable to fetch next + Невозможно получить следующую строку + + + + Unable to prepare statement + Невозможно подготовить выражение + + + + Unable to bind variable + Невозможно привязать значение + + + + + + Unable to fetch last + Невозможно получить последнюю строку + + + + Unable to fetch + Невозможно получить данные + + + + Unable to fetch first + Невозможно получить первую строку + + + + Unable to fetch previous + Невозможно получить предыдущую строку + + + + QObject + + + Home + Домой + + + + Operation not supported on %1 + Операция не поддерживается для %1 + + + + Invalid URI: %1 + Некорректный URI: %1 + + + + Write error writing to %1: %2 + Ошибка записи в %1: %2 + + + + Read error reading from %1: %2 + Ошибка чтения из %1: %2 + + + + Socket error on %1: %2 + Ошика сокета для %1: %2 + + + + Remote host closed the connection prematurely on %1 + Удалённый узел неожиданно прервал соединение для %1 + + + + Protocol error: packet of size 0 received + Ошибка протокола: получен пакет нулевого размера + + + + + No host name given + Имя узла не задано + + + + QPPDOptionsModel + + + Name + Имя + + + + Value + Значение + + + + QPSQLDriver + + + Unable to connect + Невозможно соединиться + + + + Could not begin transaction + Не удалось начать транзакцию + + + + Could not commit transaction + Не удалось выполнить транзакцию + + + + Could not rollback transaction + Не удалось откатить транзакцию + + + + Unable to subscribe + Невозможно подписаться + + + + Unable to unsubscribe + Невозможно отписаться + + + + QPSQLResult + + + Unable to create query + Невозможно создать запрос + + + + Unable to prepare statement + Невозможно подготовить выражение + + + + QPageSetupWidget + + + Centimeters (cm) + Сантиметры (cm) + + + + Millimeters (mm) + Миллиметры (mm) + + + + Inches (in) + Дюймы (in) + + + + Points (pt) + Точки (pt) + + + + Form + Форма + + + + Paper + Бумага + + + + Page size: + Размер страницы: + + + + Width: + Ширина: + + + + Height: + Высота: + + + + Paper source: + Источник бумаги: + + + + Orientation + Ориентация + + + + Portrait + Книжная + + + + Landscape + Альбомная + + + + Reverse landscape + Перевёрнутая альбомная + + + + Reverse portrait + Перевёрнутая книжная + + + + Margins + Поля + + + + + top margin + верхнее поле + + + + + left margin + левое поле + + + + + right margin + правое поле + + + + + bottom margin + нижнее поле + + + + QPluginLoader + + + Unknown error + Неизвестная ошибка + + + + The plugin was not loaded. + Модуль не был загружен. + + + + QPrintDialog + + + locally connected + соединено локально + + + + + Aliases: %1 + Псевдонимы: %1 + + + + + unknown + неизвестно + + + + A0 (841 x 1189 mm) + A0 (841 x 1189 мм) + + + + A1 (594 x 841 mm) + A1 (594 x 841 мм) + + + + A2 (420 x 594 mm) + A2 (420 x 594 мм) + + + + A3 (297 x 420 mm) + A3 (297 x 420 мм) + + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297 мм, 8.26 x 11.7 дюймов) + + + + A5 (148 x 210 mm) + A5 (148 x 210 мм) + + + + A6 (105 x 148 mm) + A6 (105 x 148 мм) + + + + A7 (74 x 105 mm) + A7 (74 x 105 мм) + + + + A8 (52 x 74 mm) + A8 (52 x 74 мм) + + + + A9 (37 x 52 mm) + A9 (37 x 52 мм) + + + + B0 (1000 x 1414 mm) + B0 (1000 x 1414 мм) + + + + B1 (707 x 1000 mm) + B1 (707 x 1000 мм) + + + + B2 (500 x 707 mm) + B2 (500 x 707 мм) + + + + B3 (353 x 500 mm) + B3 (353 x 500 мм) + + + + B4 (250 x 353 mm) + B4 (250 x 353 мм) + + + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250 мм, 6.93 x 9.84 дюймов) + + + + B6 (125 x 176 mm) + B6 (125 x 176 мм) + + + + B7 (88 x 125 mm) + B7 (88 x 125 мм) + + + + B8 (62 x 88 mm) + B8 (62 x 88 мм) + + + + B9 (44 x 62 mm) + B9 (44 x 62 мм) + + + + B10 (31 x 44 mm) + B10 (31 x 44 мм) + + + + C5E (163 x 229 mm) + C5E (163 x 229 мм) + + + + DLE (110 x 220 mm) + DLE (110 x 220 мм) + + + + Executive (7.5 x 10 inches, 191 x 254 mm) + Executive (191 x 254 мм, 7.5 x 10 дюймов) + + + + Folio (210 x 330 mm) + Folio (210 x 330 мм) + + + + Ledger (432 x 279 mm) + Ledger (432 x 279 мм) + + + + Legal (8.5 x 14 inches, 216 x 356 mm) + Legal (216 x 356 мм, 8.5 x 14 дюймов) + + + + Letter (8.5 x 11 inches, 216 x 279 mm) + Letter (216 x 279 мм, 8.5 x 11 дюймов) + + + + Tabloid (279 x 432 mm) + Tabloid (279 x 432 мм) + + + + US Common #10 Envelope (105 x 241 mm) + Конверт US #10 (105x241 мм) + + + + OK + Закрыть + + + + + + Print + Печать + + + + Print To File ... + Печать в файл ... + + + + Print range + Печатать диапазон + + + + Print all + Печатать все + + + + File %1 is not writable. +Please choose a different file name. + %1 недоступен для записи. +Выберите другое имя файла. + + + + %1 already exists. +Do you want to overwrite it? + %1 уже существует. +Хотите заменить его? + + + + File exists + Файл существует + + + + <qt>Do you want to overwrite it?</qt> + <qt>Хотите заменить?</qt> + + + + Print selection + Выделенный фрагмент + + + + %1 is a directory. +Please choose a different file name. + %1 - это каталог. +Выберите другое имя файла. + + + + A0 + + + + + A1 + + + + + A2 + + + + + A3 + + + + + A4 + + + + + A5 + + + + + A6 + + + + + A7 + + + + + A8 + + + + + A9 + + + + + B0 + + + + + B1 + + + + + B2 + + + + + B3 + + + + + B4 + + + + + B5 + + + + + B6 + + + + + B7 + + + + + B8 + + + + + B9 + + + + + B10 + + + + + C5E + + + + + DLE + + + + + Executive + + + + + Folio + + + + + Ledger + + + + + Legal + + + + + Letter + + + + + Tabloid + + + + + US Common #10 Envelope + + + + + Custom + Произвольный + + + + + &Options >> + &Параметры >> + + + + &Print + &Печать + + + + &Options << + &Параметры << + + + + Print to File (PDF) + Печать в файл (PDF) + + + + Print to File (Postscript) + Печать в файл (Postscript) + + + + Local file + Локальный файл + + + + Write %1 file + Запись %1 файла + + + + The 'From' value cannot be greater than the 'To' value. + Значение 'от' не может быть больше значения 'до'. + + + + QPrintPreviewDialog + + + + Page Setup + Параметры страницы + + + + %1% + %1% + + + + Print Preview + Просмотр печати + + + + Next page + Следующая страница + + + + Previous page + Предыдущая страница + + + + First page + Первая страница + + + + Last page + Последняя страница + + + + Fit width + По ширине + + + + Fit page + На всю страницу + + + + Zoom in + Увеличить + + + + Zoom out + Уменьшить + + + + Portrait + Книжная + + + + Landscape + Альбомная + + + + Show single page + Показать одну страницу + + + + Show facing pages + Показать титульные страницы + + + + Show overview of all pages + Показать обзор всех страниц + + + + Print + Печать + + + + Page setup + Параметры страницы + + + + Close + Закрыть + + + + Export to PDF + Экспорт в PDF + + + + Export to PostScript + Экспорт в Postscript + + + + QPrintPropertiesWidget + + + Form + Форма + + + + Page + Страница + + + + Advanced + Дополнительно + + + + QPrintSettingsOutput + + + Form + Форма + + + + Copies + Копии + + + + Print range + Диапазон печати + + + + Print all + Все + + + + Pages from + Страницы от + + + + to + до + + + + Selection + Выделенный фрагмент + + + + Output Settings + Настройки вывода + + + + Copies: + Количество копий: + + + + Collate + Разобрать про копиям + + + + Reverse + Обратный порядок + + + + Options + Параметры + + + + Color Mode + Режим цвета + + + + Color + Цвет + + + + Grayscale + Оттенки серого + + + + Duplex Printing + Двусторонняя печать + + + + None + Нет + + + + Long side + По длинной стороне + + + + Short side + По короткой стороне + + + + QPrintWidget + + + Form + Форма + + + + Printer + Принтер + + + + &Name: + &Название: + + + + P&roperties + С&войства + + + + Location: + Расположение: + + + + Preview + Просмотр + + + + Type: + Тип: + + + + Output &file: + Выходной &файл: + + + + ... + ... + + + + QProcess + + + + Could not open input redirection for reading + Не удалось открыть перенаправление ввода для чтения + + + + + Could not open output redirection for writing + Не удалось открыть перенаправление вывода для записи + + + + Resource error (fork failure): %1 + Ошибка выделения ресурсов (сбой fork): %1 + + + + + + + + + + + + Process operation timed out + Время на операцию с процессом истекло + + + + + + + Error reading from process + Ошибка получения данных от процесса + + + + + + Error writing to process + Ошибка отправки данных процессу + + + + Process crashed + Процесс завершился с ошибкой + + + + No program defined + Программа не указана + + + + Process failed to start + Не удалось запустить процесс + + + + QProgressDialog + + + Cancel + Отмена + + + + QPushButton + + + Open + Открыть + + + + QRadioButton + + + Check + Отметить + + + + QRegExp + + + no error occurred + ошибки отсутствуют + + + + disabled feature used + использование отключённых возможностей + + + + bad char class syntax + неправильный синтаксис класса символов + + + + bad lookahead syntax + неправильный предварительный синтаксис + + + + bad repetition syntax + неправильный синтаксис повторения + + + + invalid octal value + некорректное восьмеричное значение + + + + missing left delim + отсутствует левый разделитель + + + + unexpected end + неожиданный конец + + + + met internal limit + достигнуто внутреннее ограничение + + + + QSQLite2Driver + + + Error to open database + Ошибка открытия базы данных + + + + Unable to begin transaction + Невозможно начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback Transaction + Невозможно откатить транзакцию + + + + QSQLite2Result + + + Unable to fetch results + Невозможно получить результаты + + + + Unable to execute statement + Невозможно выполнить выражение + + + + QSQLiteDriver + + + Error opening database + Ошибка открытия базы данных + + + + Error closing database + Ошибка закрытия базы данных + + + + Unable to begin transaction + Невозможно начать транзакцию + + + + Unable to commit transaction + Невозможно выполнить транзакцию + + + + Unable to rollback transaction + Невозможно откатить транзакцию + + + + QSQLiteResult + + + + + Unable to fetch row + Невозможно получить строку + + + + Unable to execute statement + Невозможно выполнить выражение + + + + Unable to reset statement + Невозможно сбросить выражение + + + + Unable to bind parameters + Невозможно привязать параметр + + + + Parameter count mismatch + Количество параметров не совпадает + + + + No query + Отсутствует запрос + + + + QScrollBar + + + Scroll here + Прокрутить сюда + + + + Left edge + К левой границе + + + + Top + Вверх + + + + Right edge + К правой границе + + + + Bottom + Вниз + + + + Page left + На страницу влево + + + + + Page up + На страницу вверх + + + + Page right + На страницу вправо + + + + + Page down + На страницу вниз + + + + Scroll left + Прокрутить влево + + + + Scroll up + Прокрутить вверх + + + + Scroll right + Прокрутить вправо + + + + Scroll down + Прокрутить вниз + + + + Line up + На строку вверх + + + + Position + Положение + + + + Line down + На строку вниз + + + + QSharedMemory + + + %1: unable to set key on lock + %1: невозможно установить ключ на блокировку + + + + %1: create size is less then 0 + %1: размер меньше нуля + + + + + %1: unable to lock + %1: невозможно заблокировать + + + + %1: unable to unlock + %1: невозможно разблокировать + + + + + %1: permission denied + %1: доступ запрещён + + + + + %1: already exists + %1: уже существует + + + + + %1: doesn't exists + %1: не существует + + + + + %1: out of resources + %1: недостаточно ресурсов + + + + + %1: unknown error %2 + %1: неизвестная ошибка %2 + + + + %1: key is empty + %1: пустой ключ + + + + %1: unix key file doesn't exists + %1: специфический ключ unix не существует + + + + %1: ftok failed + %1: ошибка ftok + + + + + %1: unable to make key + %1: невозможно создать ключ + + + + %1: system-imposed size restrictions + %1: системой наложены ограничения на размер + + + + %1: not attached + %1: не приложенный + + + + %1: invalid size + %1: некорректный размер + + + + %1: key error + %1: некорректный ключ + + + + %1: size query failed + %1: не удалось запросить размер + + + + QShortcut + + + Space + + + + + Esc + + + + + Tab + + + + + Backtab + + + + + Backspace + + + + + Return + + + + + Enter + + + + + Ins + + + + + Del + + + + + Pause + Пауза + + + + Print + Печать + + + + SysReq + + + + + Home + Домой + + + + End + + + + + Left + Влево + + + + Up + Вверх + + + + Right + Вправо + + + + Down + Вниз + + + + PgUp + + + + + PgDown + + + + + CapsLock + + + + + NumLock + + + + + ScrollLock + + + + + Menu + Меню + + + + Help + Справка + + + + Back + Назад + + + + Forward + Вперёд + + + + Stop + Остановить + + + + Refresh + Обновить + + + + Volume Down + + + + + Volume Mute + + + + + Volume Up + + + + + Bass Boost + + + + + Bass Up + + + + + Bass Down + + + + + Treble Up + + + + + Treble Down + + + + + Media Play + + + + + Media Stop + + + + + Media Previous + + + + + Media Next + + + + + Media Record + + + + + Favorites + + + + + Search + Поиск + + + + Standby + + + + + Open URL + + + + + Launch Mail + + + + + Launch Media + + + + + Launch (0) + + + + + Launch (1) + + + + + Launch (2) + + + + + Launch (3) + + + + + Launch (4) + + + + + Launch (5) + + + + + Launch (6) + + + + + Launch (7) + + + + + Launch (8) + + + + + Launch (9) + + + + + Launch (A) + + + + + Launch (B) + + + + + Launch (C) + + + + + Launch (D) + + + + + Launch (E) + + + + + Launch (F) + + + + + Print Screen + + + + + Page Up + + + + + Page Down + + + + + Caps Lock + + + + + Num Lock + + + + + Number Lock + + + + + Scroll Lock + + + + + Insert + Вставить + + + + Delete + Удалить + + + + Escape + + + + + System Request + + + + + Select + + + + + Yes + Да + + + + No + Нет + + + + Context1 + + + + + Context2 + + + + + Context3 + + + + + Context4 + + + + + Call + + + + + Hangup + + + + + Flip + + + + + + Ctrl + + + + + + Shift + + + + + + Alt + + + + + + Meta + + + + + + + + + + + F%1 + + + + + Home Page + + + + + QSlider + + + Page left + Страница влево + + + + Page up + Страница вверх + + + + Position + Положение + + + + Page right + Страница вправо + + + + Page down + Страница вниз + + + + QSocks5SocketEngine + + + Connection to proxy refused + В соединении прокси-сервером отказано + + + + Connection to proxy closed prematurely + Соединение с прокси-сервером неожиданно закрыто + + + + Proxy host not found + Прокси-сервер не найден + + + + Connection to proxy timed out + Время на соединение с прокси-сервером истекло + + + + Proxy authentication failed + Не удалось авторизоваться на прокси-сервере + + + + Proxy authentication failed: %1 + Не удалось авторизоваться на прокси-сервере: %1 + + + + SOCKS version 5 protocol error + Ошибка протокола SOCKSv5 + + + + General SOCKSv5 server failure + Ошибка сервере SOCKSv5 + + + + Connection not allowed by SOCKSv5 server + Соединение не разрешено сервером SOCKSv5 + + + + TTL expired + TTL истекло + + + + SOCKSv5 command not supported + Команда SOCKSv5 не поддерживается + + + + Address type not supported + Тип адреса не поддерживается + + + + Unknown SOCKSv5 proxy error code 0x%1 + Неизвестная ошибка SOCKSv5 прокси (код 0x%1) + + + + Network operation timed out + Время на сетевую операцию истекло + + + + QSpinBox + + + More + Больше + + + + Less + Меньше + + + + QSql + + + Delete + Удалить + + + + Delete this record? + Удалить данную запись? + + + + + + Yes + Да + + + + + + No + Нет + + + + Insert + Вставить + + + + Update + Обновить + + + + Save edits? + Сохранить изменения? + + + + Cancel + Отмена + + + + Confirm + Подтверждение + + + + Cancel your edits? + Отменить изменения? + + + + QSslSocket + + + Unable to write data: %1 + Невозможно записать данные: %1 + + + + Error while reading: %1 + Ошибка чтения: %1 + + + + Error during SSL handshake: %1 + Ошибка квитирования SSL: %1 + + + + Error creating SSL context (%1) + Ошибка создания контекста SSL: (%1) + + + + Invalid or empty cipher list (%1) + Неправильный или пустой список шифров (%1) + + + + Error creating SSL session, %1 + Ошибка создания сессии SSL, %1 + + + + Error creating SSL session: %1 + Ошибка создания сессии SSL: %1 + + + + Cannot provide a certificate with no key, %1 + Невозможно предоставить сертификат без ключа, %1 + + + + Error loading local certificate, %1 + Ошибка загрузки локального сертификата, %1 + + + + Error loading private key, %1 + Ошибка загрузки закрытого ключа, %1 + + + + Private key does not certificate public key, %1 + Закрытый ключ не соответствует открытому ключу, %1 + + + + QSystemSemaphore + + + + %1: out of resources + %1: недостаточно ресурсов + + + + + %1: permission denied + %1: доступ запрещён + + + + %1: already exists + %1: уже существует + + + + %1: does not exist + %1: не существует + + + + + %1: unknown error %2 + %1: неизвестная ошибка %2 + + + + QTDSDriver + + + Unable to open connection + Невозможно открыть соединение + + + + Unable to use database + Невозможно использовать базу данных + + + + QTabBar + + + Scroll Left + Прокрутить влево + + + + Scroll Right + Прокрутить вправо + + + + QTcpServer + + + Operation on socket is not supported + Операция с сокетом не поддерживается + + + + QTextControl + + + &Undo + &Отменить действие + + + + &Redo + &Повторить действие + + + + Cu&t + &Вырезать + + + + &Copy + &Копировать + + + + Copy &Link Location + Скопировать &адрес ссылки + + + + &Paste + В&ставить + + + + Delete + Удалить + + + + Select All + Выделить всё + + + + QToolButton + + + + Press + Нажать + + + + + Open + Открыть + + + + QUdpSocket + + + This platform does not support IPv6 + Данная платформа не поддерживает IPv6 + + + + QUndoGroup + + + Undo + Отменить действие + + + + Redo + Повторить действие + + + + QUndoModel + + + <empty> + <пусто> + + + + QUndoStack + + + Undo + Отменить действие + + + + Redo + Повторить действие + + + + QUnicodeControlCharacterMenu + + + LRM Left-to-right mark + LRM Признак письма слева направо + + + + RLM Right-to-left mark + RLM Признак письма справа налево + + + + ZWJ Zero width joiner + + + + + ZWNJ Zero width non-joiner + + + + + ZWSP Zero width space + + + + + LRE Start of left-to-right embedding + + + + + RLE Start of right-to-left embedding + + + + + LRO Start of left-to-right override + + + + + RLO Start of right-to-left override + + + + + PDF Pop directional formatting + + + + + Insert Unicode control character + Вставить управляющий символ Unicode + + + + QWebFrame + + + Request cancelled + Запрос отменён + + + + Request blocked + Запрос блокирован + + + + Cannot show URL + Невозможно отобразить URL + + + + Frame load interruped by policy change + Загрузка фрейма прервана изменением политики + + + + Cannot show mimetype + Невозможно отобразить тип MIME + + + + File does not exist + Файл не существует + + + + QWebPage + + + Bad HTTP request + Некорректный HTTP-запрос + + + + Submit + default label for Submit buttons in forms on web pages + Отправить + + + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + Отправить + + + + Reset + default label for Reset buttons in forms on web pages + Сбросить + + + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + Индекс поиска. Введите ключевые слова для поиска: + + + + Choose File + title for file button used in HTML forms + Обзор... + + + + No file selected + text to display in file button used in HTML forms when no file is selected + Файл не указан + + + + Open in New Window + Open in New Window context menu item + Открыть в новом окне + + + + Save Link... + Download Linked File context menu item + Сохранить по ссылке как... + + + + Copy Link + Copy Link context menu item + Копировать адрес ссылки + + + + Open Image + Open Image in New Window context menu item + Открыть изображение + + + + Save Image + Download Image context menu item + Сохранить изображение + + + + Copy Image + Copy Link context menu item + Копировать изображение в буффер обмена + + + + Open Frame + Open Frame in New Window context menu item + Открыть фрейм + + + + Copy + Copy context menu item + Копировать + + + + Go Back + Back context menu item + Назад + + + + Go Forward + Forward context menu item + Вперёд + + + + Stop + Stop context menu item + Остановить + + + + Reload + Reload context menu item + Обновить + + + + Cut + Cut context menu item + Вырезать + + + + Paste + Paste context menu item + Вставить + + + + No Guesses Found + No Guesses Found context menu item + + + + + Ignore + Ignore Spelling context menu item + Пропустить + + + + Add To Dictionary + Learn Spelling context menu item + Добавить в словарь + + + + Search The Web + Search The Web context menu item + Найти в Интернет + + + + Look Up In Dictionary + Look Up in Dictionary context menu item + Поиск в словаре + + + + Open Link + Open Link context menu item + Открыть ссылку + + + + Ignore + Ignore Grammar context menu item + Пропустить + + + + Spelling + Spelling and Grammar context sub-menu item + Орфография + + + + Show Spelling and Grammar + menu item title + + + + + Hide Spelling and Grammar + menu item title + + + + + Check Spelling + Check spelling context menu item + Проверка орфографии + + + + Check Spelling While Typing + Check spelling while typing context menu item + Проверять орфографию при наборе + + + + Check Grammar With Spelling + Check grammar with spelling context menu item + + + + + Fonts + Font context sub-menu item + Шрифты + + + + Bold + Bold context menu item + Жирный + + + + Italic + Italic context menu item + Курсив + + + + Underline + Underline context menu item + Подчёркнутый + + + + Outline + Outline context menu item + Перечёркнутый + + + + Direction + Writing direction context sub-menu item + Направление + + + + Text Direction + Text direction context sub-menu item + Направление текста + + + + Default + Default writing direction context menu item + По умолчанию + + + + LTR + Left to Right context menu item + Слева направо + + + + RTL + Right to Left context menu item + Справа налево + + + + Inspect + Inspect Element context menu item + Проверить + + + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + История поиска пуста + + + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + История поиска + + + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + Очистить историю поиска + + + + Unknown + Unknown filesize FTP directory listing item + Неизвестно + + + + %1 (%2x%3 pixels) + Title string for images + %1 (%2x%3 px) + + + + Web Inspector - %2 + + + + + Scroll here + Прокрутить сюда + + + + Left edge + К левой границе + + + + Top + Вверх + + + + Right edge + К правой границе + + + + Bottom + Вниз + + + + Page left + На страницу влево + + + + Page up + На страницу вверх + + + + Page right + На страницу вправо + + + + Page down + На страницу вниз + + + + Scroll left + Прокрутить влево + + + + Scroll up + Прокрутить вверх + + + + Scroll right + Прокрутить вправо + + + + Scroll down + Прокрутить вниз + + + + %n file(s) + number of chosen file + + %n файл(а) + %n файла + %n файлов + + + + + JavaScript Alert - %1 + + + + + JavaScript Confirm - %1 + + + + + JavaScript Prompt - %1 + + + + + Move the cursor to the next character + Переместить указатель к следующему символу + + + + Move the cursor to the previous character + Переместить указатель к предыдущему символу + + + + Move the cursor to the next word + Переместить указатель к следующему слову + + + + Move the cursor to the previous word + Переместить указатель к предыдущему слову + + + + Move the cursor to the next line + Переместить указатель на следующую строку + + + + Move the cursor to the previous line + Переместить указатель на предыдущую строку + + + + Move the cursor to the start of the line + Переместить указатель в начало строки + + + + Move the cursor to the end of the line + Переместить указатель в конец строки + + + + Move the cursor to the start of the block + Переместить указатель в начало блока + + + + Move the cursor to the end of the block + Переместить указатель в конец блока + + + + Move the cursor to the start of the document + Переместить указатель в начало документа + + + + Move the cursor to the end of the document + Переместить указатель в конец документа + + + + Select all + Выделить всё + + + + Select to the next character + Выделить до следующего символа + + + + Select to the previous character + Выделить до предыдущего символа + + + + Select to the next word + Выделить до следующего слова + + + + Select to the previous word + Выделить до предыдущего слова + + + + Select to the next line + Выделить до следующей строки + + + + Select to the previous line + Выделить до предыдущей строки + + + + Select to the start of the line + Выделить до начала строки + + + + Select to the end of the line + Выделить до конца строки + + + + Select to the start of the block + Выделить до начала блока + + + + Select to the end of the block + Выделить до конца блока + + + + Select to the start of the document + Выделить до начала документа + + + + Select to the end of the document + Выделить до конца документа + + + + Delete to the start of the word + Удалить до начала слова + + + + Delete to the end of the word + Удалить до конца слова + + + + Insert a new paragraph + Вставить новый параграф + + + + Insert a new line + Вставить новую строку + + + + QWhatsThisAction + + + What's This? + Что это? + + + + QWidget + + + * + * + + + + QWizard + + + Go Back + Назад + + + + Continue + Продолжить + + + + Commit + Передать + + + + Done + Готово + + + + Help + Справка + + + + < &Back + < &Назад + + + + &Finish + &Завершить + + + + Cancel + Отмена + + + + &Help + &Справка + + + + &Next + &Далее + + + + &Next > + &Далее > + + + + QWorkspace + + + &Restore + &Восстановить + + + + &Move + &Переместить + + + + &Size + &Размер + + + + Mi&nimize + &Свернуть + + + + Ma&ximize + Р&аспахнуть + + + + &Close + &Закрыть + + + + Stay on &Top + Оставаться &сверху + + + + + Sh&ade + Св&ернуть в заголовок + + + + + %1 - [%2] + %1 - [%2] + + + + Minimize + Свернуть + + + + Restore Down + Восстановить + + + + Close + Закрыть + + + + &Unshade + В&осстановить из заголовка + + + + QXml + + + no error occurred + ошибки отсутствуют + + + + error triggered by consumer + ошибка вызвана пользователем + + + + unexpected end of file + неожиданный конец файла + + + + more than one document type definition + указано более одного типа документа + + + + error occurred while parsing element + ошибка разбора элемента + + + + tag mismatch + тэг не совпадает + + + + error occurred while parsing content + ошибка разбора документа + + + + unexpected character + неожиданный символ + + + + invalid name for processing instruction + некорректное имя директивы разбора + + + + version expected while reading the XML declaration + в объявлении XML ожидается параметр version + + + + wrong value for standalone declaration + некорректное значение параметра standalone + + + + encoding declaration or standalone declaration expected while reading the XML declaration + в объявлении XML ожидаются параметры encoding или standalone + + + + standalone declaration expected while reading the XML declaration + в объявлении XML ожидается параметр standalone + + + + error occurred while parsing document type definition + ошибка разбора объявления типа документа + + + + letter is expected + ожидалась буква + + + + error occurred while parsing comment + ошибка разбора комментария + + + + error occurred while parsing reference + ошибка разбора ссылки + + + + internal general entity reference not allowed in DTD + внутренняя ссылка на общий объект недопустима в DTD + + + + external parsed general entity reference not allowed in attribute value + внешняя ссылка на общий объект недопустима в значении атрибута + + + + external parsed general entity reference not allowed in DTD + внешняя ссылка на общий объект недопустима в DTD + + + + unparsed entity reference in wrong context + неразобранная ссылка на объект в неверном контексте + + + + recursive entities + рекурсивные объекты + + + + error in the text declaration of an external entity + ошибка в объявлении внешнего объекта + + + + QXmlStream + + + + Extra content at end of document. + Лишние данные в конце документа. + + + + Invalid entity value. + Некорректное значение объекта. + + + + Invalid XML character. + Некорректный символ XML. + + + + Sequence ']]>' not allowed in content. + Последовательность ']]>' недопустима в содержимом. + + + + Namespace prefix '%1' not declared + Префикс пространства имён '%1' не объявлен + + + + Attribute redefined. + Атрибут переопределен. + + + + Unexpected character '%1' in public id literal. + Неожиданный символ '%1' в литерале открытого идентификатора. + + + + Invalid XML version string. + Неверная строка версии XML. + + + + Unsupported XML version. + Неподдерживаемая версия XML. + + + + %1 is an invalid encoding name. + %1 - неверное название кодировки. + + + + Encoding %1 is unsupported + Кодировка %1 не поддерживается + + + + Standalone accepts only yes or no. + Псевдоатрибут 'standalone' может принимать только значения 'yes' или 'no'. + + + + Invalid attribute in XML declaration. + Некорректный атрибут в объявлении XML. + + + + Premature end of document. + Неожиданный конец документа. + + + + Invalid document. + Некорректный документ. + + + + Expected + Ожидалось + + + + , but got ' + , получили ' + + + + Unexpected ' + Неожиданное ' + + + + Expected character data. + Ожидаются символьные данные. + + + + Recursive entity detected. + Обнаружен рекурсивный объект. + + + + Start tag expected. + Ожидается открывающий тэг. + + + + XML declaration not at start of document. + Объявление XML находится не в начале документа. + + + + NDATA in parameter entity declaration. + Не уверен в правильности перевода + NDATA в объявлении объекта-параметра. + + + + %1 is an invalid processing instruction name. + %1 неверное название обрабатываемой инструкции. + + + + Invalid processing instruction name. + Неверное название обрабатываемой инструкции. + + + + + + + Illegal namespace declaration. + Неверное объявление пространства имён. + + + + Invalid XML name. + Некорректное имя XML. + + + + Opening and ending tag mismatch. + Открывающий тэг не совпадает с закрывающим. + + + + Reference to unparsed entity '%1'. + Ссылка на необработанный объект '%1'. + + + + + + Entity '%1' not declared. + Объект '%1' не объявлен. + + + + Reference to external entity '%1' in attribute value. + Ссылка на внешний объект '%1' в значении атрибута. + + + + Invalid character reference. + Неверная символьная ссылка. + + + + + Encountered incorrectly encoded content. + Обнаружено неверно закодированное содержимое. + + + + The standalone pseudo attribute must appear after the encoding. + Псевдоатрибут 'standalone' должен находиться после указания кодировки. + + + + %1 is an invalid PUBLIC identifier. + %1 - неверный идентификатор PUBLIC. + + + + QtXmlPatterns + + + An %1-attribute with value %2 has already been declared. + Атрибут '%1' со значением '%2' уже определен. + + + + An %1-attribute must have a valid %2 as value, which %3 isn't. + Атрибут '%1' должен иметь значение типа '%2', но '%3' им не является. + + + + Network timeout. + Время ожидания сети истекло. + + + + Element %1 can't be serialized because it appears outside the document element. + Элемент %1 не может быть сериализован, так как присутствует вне документа. + + + + Year %1 is invalid because it begins with %2. + Год %1 неверен, так как начинается с %2. + + + + Day %1 is outside the range %2..%3. + День %1 вне диапазона %2..%3. + + + + Month %1 is outside the range %2..%3. + Месяц %1 вне диапазона %2..%3. + + + + Overflow: Can't represent date %1. + Переполнение: Не удается представить дату %1. + + + + Day %1 is invalid for month %2. + День %1 неверен для месяца %2. + + + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + Время 24:%1:%2.%3 неверно. 24 часа, но минуты, секунды и/или миллисекунды отличны от 0; + + + + Time %1:%2:%3.%4 is invalid. + Время %1:%2:%3.%4 неверно. + + + + Overflow: Date can't be represented. + Переполнение: невозможно представить дату. + + + + + At least one component must be present. + Должна присутствовать как минимум одна компонента. + + + + At least one time component must appear after the %1-delimiter. + Как минимум одна компонента времени должна следовать за разделителем '%1'. + + + + No operand in an integer division, %1, can be %2. + Нет параметра в целочисленном делении %1, может быть %2. + + + + The first operand in an integer division, %1, cannot be infinity (%2). + Первый параметр целочисленного деления (%1) не может быть бесконечностью (%2). + + + + The second operand in a division, %1, cannot be zero (%2). + Второй параметр целочисленного деления (%1) не может быть нулем (%2). + + + + %1 is not a valid value of type %2. + %1 не является правильным значением типа %2. + + + + When casting to %1 from %2, the source value cannot be %3. + При преобразовании %2 в %1 исходное значение не может быть %3. + + + + Integer division (%1) by zero (%2) is undefined. + Целочисленное деление (%1) на нуль (%2) не определено. + + + + Division (%1) by zero (%2) is undefined. + Деление (%1) на нуль (%2) не определено. + + + + Modulus division (%1) by zero (%2) is undefined. + Деление по модулю (%1) на нуль (%2) не определено. + + + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + Деление числа типа %1 на %2 (not-a-number) недопустимо. + + + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + Деление числа типа %1 на %2 или %3 (плюс-минус нуль) недопустимо. + + + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + Умножение числа типа %1 на %2 или %3 (плюс-минус бесконечность) недопустимо. + + + + A value of type %1 cannot have an Effective Boolean Value. + Значение типа %1 не может быть булевым значением. + + + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + Булево значение не может быть вычислено для последовательностей, которые содержат два и более атомарных значения. + + + + Value %1 of type %2 exceeds maximum (%3). + Значение %1 типа %2 больше максимума (%3). + + + + Value %1 of type %2 is below minimum (%3). + Значение %1 типа %2 меньше минимума (%3). + + + + A value of type %1 must contain an even number of digits. The value %2 does not. + Значение типа %1 должно содержать четное количество цифр. Значение %2 этому требованию не удовлетворяет. + + + + %1 is not valid as a value of type %2. + Значение %1 некорректно для типа %2. + + + + Operator %1 cannot be used on type %2. + Оператор %1 не может использоваться для типа %2. + + + + Operator %1 cannot be used on atomic values of type %2 and %3. + Оператор %1 не может использоваться для атомарных значений типов %2 и %3. + + + + The namespace URI in the name for a computed attribute cannot be %1. + URI пространства имён в названии рассчитываемого атрибута не может быть %1. + + + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + Название расчитываемого атрибута не может иметь URI пространства имён %1 с локальным именем %2. + + + + Type error in cast, expected %1, received %2. + Ошибка типов в преобразовании, ожидалось %1, получено %2. + + + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + При преобразовании в %1 или производные от него типы исходное значение должно быть того же типа или строковым литералом. Тип %2 недопустим. + + + + No casting is possible with %1 as the target type. + Преобразование к типу %1 невозможно. + + + + It is not possible to cast from %1 to %2. + Невозможно преобразовать %1 в %2. + + + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + Преобразование к %1 невозможно, так как это абстрактный тип и, следовательно, для него невозможно создать объект. + + + + It's not possible to cast the value %1 of type %2 to %3 + Невозможно преобразовать значение %1 типа %2 в %3 + + + + Failure when casting from %1 to %2: %3 + Не удалось преобразовать %1 в %2: %3 + + + + A comment cannot contain %1 + Комментарий не может содержать %1 + + + + A comment cannot end with a %1. + Комментарий не может оканчиваться на %1. + + + + No comparisons can be done involving the type %1. + Невозможно выполнить сравнение с типом %1. + + + + Operator %1 is not available between atomic values of type %2 and %3. + Оператор %1 недоступен между атомарными значениями типа %2 и %3. + + + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + Узел-атрибут не может быть потомком узла-документа. Атрибут %1 неуместен. + + + + A library module cannot be evaluated directly. It must be imported from a main module. + Модуль библиотеки не может использоваться напрямую. Он должен быть импортирован из основного модуля. + + + + No template by name %1 exists. + Шаблон с именем %1 отсутствует. + + + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + Значение типа %1 не может быть условием. Условием могут являться числовой и булевый типы. + + + + A positional predicate must evaluate to a single numeric value. + Позиционный предикат должен вычисляться как числовое выражение. + + + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + Целевое имя в обрабатываемой инструкции не может быть %1 в любой комбинации нижнего и верхнего регистров. Имя %2 некорректно. + + + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + %1 некорректное целевое имя в обрабатываемой инструкции. Имя должно быть значением типа %2, например: %3. + + + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + Последняя часть пути должна содержать узлы или атомарные значения, но не может содержать и то, и другое одновременно. + + + + The data of a processing instruction cannot contain the string %1 + Данные обрабатываемой инструкции не могут содержать строку '%1' + + + + No namespace binding exists for the prefix %1 + Отсутствует привязка к пространству имён для префикса %1 + + + + No namespace binding exists for the prefix %1 in %2 + Отсутствует привязка к пространству имён для префикса %1 в %2 + + + + + %1 is an invalid %2 + %1 некоррекно для %2 + + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + %1 принимает не более %n аргумента. Следовательно, %2 неверно. + %1 принимает не более %n аргументов. Следовательно, %2 неверно. + %1 принимает не более %n аргументов. Следовательно, %2 неверно. + + + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + %1 принимает не менее %n аргумента. Следовательно, %2 неверно. + %1 принимает не менее %n аргументов. Следовательно, %2 неверно. + %1 принимает не менее %n аргументов. Следовательно, %2 неверно. + + + + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + Первый аргумент %1 не может быть типа %2. Он должен быть числового типа, типа xs:yearMonthDuration или типа xs:dayTimeDuration. + + + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + Первый аргумент %1 не может быть типа %2. Он должен быть типа %3, %4 или %5. + + + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + Второй аргумент %1 не может быть типа %2. Он должен быть типа %3, %4 или %5. + + + + %1 is not a valid XML 1.0 character. + Символ %1 недопустим для XML 1.0. + + + + The first argument to %1 cannot be of type %2. + Первый аргумент %1 не может быть типа %2. + + + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + Если оба значения имеют региональные смещения, смещения должны быть одинаковы. %1 и %2 не одинаковы. + + + + %1 was called. + %1 было вызвано. + + + + %1 must be followed by %2 or %3, not at the end of the replacement string. + '%1' должно сопровождаться '%2' или '%3', но не в конце замещаемой строки. + + + + In the replacement string, %1 must be followed by at least one digit when not escaped. + В замещаемой строке '%1' должно сопровождаться как минимум одной цифрой, если неэкранировано. + + + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + В замещаемой строке символ '%1' может использоваться только для экранирования самого себя или '%2', но не '%3' + + + + %1 matches newline characters + %1 соответствует символам конца строки + + + + %1 and %2 match the start and end of a line. + %1 и %2 соответствуют началу и концу строки. + + + + Matches are case insensitive + Соответствия регистронезависимы + + + + Whitespace characters are removed, except when they appear in character classes + Символы пробелов удалены, за исключением тех, что были в классах символов + + + + %1 is an invalid regular expression pattern: %2 + %1 - неверный шаблон регулярного выражения: %2 + + + + %1 is an invalid flag for regular expressions. Valid flags are: + %1 - неверный флаг для регулярного выражения. Допустимые флаги: + + + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + Префикс не должен быть указан, если первый параметр - пустая последовательность или пустая строка (вне пространства имён). Был указан префикс %1. + + + + It will not be possible to retrieve %1. + Будет невозможно восстановить %1. + + + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + Корневой узел второго аргумента функции %1 должен быть документом. %2 не является документом. + + + + The default collection is undefined + Набор по умолчанию не определен + + + + %1 cannot be retrieved + %1 не может быть восстановлен + + + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + Форма нормализации %1 не поддерживается. Поддерживаются только %2, %3, %4, %5 и пустая, т.е. пустая строка (без нормализации). + + + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + Региональное смещение должно быть в переделах от %1 до %2 включительно. %3 выходит за допустимые пределы. + + + + %1 is not a whole number of minutes. + %1 не является полным количеством минут. + + + + Required cardinality is %1; got cardinality %2. + Необходимое число элементов - %1, получено %2. + + + + The item %1 did not match the required type %2. + Элемент %1 не соответствует необходимому типу %2. + + + + + %1 is an unknown schema type. + %1 является схемой неизвестного типа. + + + + Only one %1 declaration can occur in the query prolog. + Только одно объявление %1 может присутствовать в прологе запроса. + + + + The initialization of variable %1 depends on itself + Инициализация переменной %1 зависит от себя самой + + + + No variable by name %1 exists + Переменная с именем %1 отсутствует + + + + The variable %1 is unused + Переменная %1 не используется + + + + Version %1 is not supported. The supported XQuery version is 1.0. + Версия %1 не поддерживается. Поддерживается XQuery версии 1.0. + + + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + Кодировка %1 неверна. Имя кодировки должно содержать только символы латиницы без пробелов и должно удовлетворять регулярному выражению %2. + + + + No function with signature %1 is available + Функция с сигнатурой %1 отсутствует + + + + + A default namespace declaration must occur before function, variable, and option declarations. + Объявление пространство имён по умолчанию должно быть до объявления функций, переменных и опций. + + + + Namespace declarations must occur before function, variable, and option declarations. + Объявление пространства имён должно быть до объявления функций, переменных и опций. + + + + Module imports must occur before function, variable, and option declarations. + Импорт модулей должен быть до объявлений функций, переменных и опций. + + + + It is not possible to redeclare prefix %1. + Невозможно переопределить префикс %1. + + + + Prefix %1 is already declared in the prolog. + Префикс %1 уже объявлен в прологе. + + + + The name of an option must have a prefix. There is no default namespace for options. + Название опции должно содержать префикс. Нет пространства имён по умолчанию для опций. + + + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + Возможность импорта схем не поддерживается. Следовательно, объявлений %1 быть не должно. + + + + The target namespace of a %1 cannot be empty. + Целевое пространство имён %1 не может быть пустым. + + + + The module import feature is not supported + Возможность импорта модулей не поддерживается + + + + No value is available for the external variable by name %1. + Отсутствует значение для внешней переменной с именем %1. + + + + A construct was encountered which only is allowed in XQuery. + Указана конструкция, допустимая только в XQuery. + + + + A template by name %1 has already been declared. + Шаблон с именем %1 уже был объявлен. + + + + The keyword %1 cannot occur with any other mode name. + Ключевое слово %1 не может встречаться с любым другим названием режима. + + + + The value of attribute %1 must of type %2, which %3 isn't. + Значение атрибута %1 должно быть типа %2, но %3 ему не соответствует. + + + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + Не удается связать префикс %1. По умолчанию префикс связан с пространством имён %2. + + + + A variable by name %1 has already been declared. + Переменная с именем %1 уже объявлена. + + + + A stylesheet function must have a prefixed name. + Функция стилей должна иметь имя с префиксом. + + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + Пространство имён для пользовательских функций не может быть пустым (попробуйте предопределенный префикс %1, который существует для подобных ситуаций) + + + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + Пространтсво имён %1 зарезервировано, поэтому пользовательские функции не могут его использовать. Попробуйте предопределенный префикс %2, который существует для подобных ситуаций. + + + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + Пространство имён пользовательской функции в модуле библиотеки должен соответствовать пространству имён модуля. Другими словами, он должен быть %1 вместо %2 + + + + A function already exists with the signature %1. + Функция с сигнатурой %1 уже существует. + + + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + Внешние функции не поддерживаются. Все поддерживаемые функции могут использоваться напрямую без первоначального объявления их внешними + + + + An argument by name %1 has already been declared. Every argument name must be unique. + Аргумент с именем %1 уже объявлен. Имя каждого аргумента должно быть уникальным. + + + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + Если функция %1 используется для сравнения внутри шаблона, аргумент должен быть ссылкой на переменную или строковым литералом. + + + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + В шаблоне XSL-T первый аргумент функции %1 должен быть строковым литералом, если функция используется для сравнения. + + + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + В шаблоне XSL-T первый аргумент функции %1 должен быть литералом или ссылкой на переменную, если функция используется для сравнения. + + + + In an XSL-T pattern, function %1 cannot have a third argument. + В шаблоне XSL-T у функции %1 не должно быть третьего аргумента. + + + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + В шаблоне XSL-T только функции %1 и %2 могут использоваться для сравнения, но не %3. + + + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + В шаблоне XSL-T не может быть использована ось %1 - только оси %2 или %3. + + + + %1 is an invalid template mode name. + %1 является неверным шаблоном имени режима. + + + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + Имя переменной, связанной с выражением for, должно отличаться от позиционной переменной. Две переменные с именем %1 конфликтуют. + + + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + Возможность проверки по схеме не поддерживается. Выражения %1 не могут использоваться. + + + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + Ни одно из выражений pragma не поддерживается. Должно существовать запасное выражение + + + + Each name of a template parameter must be unique; %1 is duplicated. + Имя каждого параметра шаблона должно быть уникальным, но %1 повторяется. + + + + The %1-axis is unsupported in XQuery + Ось %1 не поддерживается в XQuery + + + + %1 is not a valid name for a processing-instruction. + %1 является неверным названием для инструкции обработки. + + + + %1 is not a valid numeric literal. + %1 является неверным числовым литералом. + + + + No function by name %1 is available. + Функция с именем %1 отсутствует. + + + + The namespace URI cannot be the empty string when binding to a prefix, %1. + URI пространства имён не может быть пустой строкой при связывании с префиксом %1. + + + + %1 is an invalid namespace URI. + %1 - неверный URI пространства имён. + + + + It is not possible to bind to the prefix %1 + Невозможно связать с префиксом %1 + + + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + Пространство имён %1 может быть связано только с %2 (в данном случае уже предопределено). + + + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + Префикс %1 может быть связан только с %2 (в данном случае уже предопределено). + + + + Two namespace declaration attributes have the same name: %1. + Два атрибута объявления пространств имён имеют одинаковое имя: %1. + + + + The namespace URI must be a constant and cannot use enclosed expressions. + URI пространства имён должно быть константой и не может содержать выражений. + + + + An attribute by name %1 has already appeared on this element. + Атрибут с именем %1 уже есть в этом элементе. + + + + A direct element constructor is not well-formed. %1 is ended with %2. + Прямой конструктор элемента составлен некорректно. %1 заканчивается %2. + + + + The name %1 does not refer to any schema type. + Название %1 не соответствует ни одному типу схемы. + + + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + %1 - сложный тип. Преобразование к сложным типам невозможно. Однако, преобразование к атомарным типам как %2 работает. + + + + %1 is not an atomic type. Casting is only possible to atomic types. + %1 - не атомарный тип. Преобразование возможно только к атомарным типам. + + + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + %1 является объявлением атрибута вне положенного места. Имейте в виду, возможность импорта схем не поддерживается. + + + + The name of an extension expression must be in a namespace. + Название выражения расширения должно быть в пространстве имён. + + + + empty + пусто + + + + zero or one + нуль или один + + + + exactly one + ровно один + + + + one or more + один или более + + + + zero or more + нуль или более + + + + Required type is %1, but %2 was found. + Требуется тип %1, но обнаружен %2. + + + + Promoting %1 to %2 may cause loss of precision. + Преобразование %1 к %2 может снизить точность. + + + + The focus is undefined. + Фокус не определен. + + + + It's not possible to add attributes after any other kind of node. + Невозможно добавлять атрибуты после любого другого вида узла. + + + + An attribute by name %1 has already been created. + Атрибут с именем %1 уже существует. + + + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + Только Unicode Codepoint Collation поддерживается (%1). %2 не поддерживается. + + + + Attribute %1 can't be serialized because it appears at the top level. + Атрибут %1 не может быть сериализован, так как присутствует на верхнем уровне. + + + + %1 is an unsupported encoding. + Кодировка %1 не поддерживается. + + + + %1 contains octets which are disallowed in the requested encoding %2. + %1 содержит октеты, которые недопустимы в требуемой кодировке %2. + + + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + Символ с кодом %1, присутствующий в %2 при использовании кодировки %3, не является допустимым символом XML. + + + + Ambiguous rule match. + Неоднозначное соответствие правилу. + + + + In a namespace constructor, the value for a namespace cannot be an empty string. + В конструкторе пространства имён значение пространства имён не может быть пустой строкой. + + + + The prefix must be a valid %1, which %2 is not. + Префикс должен быть корректным %1, но %2 им не является. + + + + The prefix %1 cannot be bound. + Префикс%1 не может быть связан. + + + + Only the prefix %1 can be bound to %2 and vice versa. + Только префикс %1 может быть связан с %2 и наоборот. + + + + Circularity detected + Обнаружена зацикленность + + + + The parameter %1 is required, but no corresponding %2 is supplied. + Необходим параметр %1 , но соответствующего %2 не передано. + + + + The parameter %1 is passed, but no corresponding %2 exists. + Передан параметр %1 , но соответствующего %2 не существует. + + + + The URI cannot have a fragment + URI не может содержать фрагмент + + + + Element %1 is not allowed at this location. + Элемент %1 недопустим в этом месте. + + + + Text nodes are not allowed at this location. + Текстовые узлы недопустимы в этом месте. + + + + Parse error: %1 + Ошибка разбора: %1 + + + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + Значение атрибута версии XSL-T должно быть типа %1, но %2 им не является. + + + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + Выполняется таблица стилей XSL-T 1.0 с обработчиком версии 2.0. + + + + Unknown XSL-T attribute %1. + Неизвествный атрибут XSL-T %1. + + + + Attribute %1 and %2 are mutually exclusive. + Атрибуты %1 и %2 взаимоисключающие. + + + + In a simplified stylesheet module, attribute %1 must be present. + В модуле упрощённой таблицы стилей атрибут %1 обязан присутствовать. + + + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + Если элемент %1 не имеет атрибут %2, у него не может быть атрибутов %3 и %4. + + + + Element %1 must have at least one of the attributes %2 or %3. + Элемент %1 должен иметь как минимум один из атрибутов %2 или %3. + + + + At least one mode must be specified in the %1-attribute on element %2. + Как минимум один режим должен быть указан в атрибуте %1 элемента %2. + + + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + Атрибут %1 недопустим в элементе %2. Допустимы только стандартные атрибуты. + + + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + Атрибут %1 недопустим в элементе %2. Допустимы только %3 и стандартные атрибуты. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + Атрибут %1 недопустим в элементе %2. Допустимы только %3, %4 и стандартные атрибуты. + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + Атрибут %1 недопустим в элементе %2. Допустимы только %3 и стандартные атрибуты. + + + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + Атрибуты XSL-T элементов XSL-T должны быть вне пространства имён, а не в простанстве имеё XSL-T, которым является %1. + + + + The attribute %1 must appear on element %2. + Элемента %2 должен иметь атрибут %1. + + + + The element with local name %1 does not exist in XSL-T. + Элемент с локальным именем %1 отсутствует в XSL-T. + + + + Element %1 must come last. + Элемент %1 должен идти последним. + + + + At least one %1-element must occur before %2. + Как минимум один элемент %1 должен быть перед %2. + + + + Only one %1-element can appear. + Должен быть только один элемент %1. + + + + At least one %1-element must occur inside %2. + Как минимум один элемент %1 должен быть внутри %2. + + + + When attribute %1 is present on %2, a sequence constructor cannot be used. + Если %2 содержит атрибут %1, конструктор последовательности не может быть использован. + + + + Element %1 must have either a %2-attribute or a sequence constructor. + Элемент %1 должен иметь атрибут %2 или конструктор последовательности. + + + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + Если параметр необходим, значение по умолчание не может быть передано через атрибут %1 или конструктор последовательности. + + + + Element %1 cannot have children. + У элемента %1 не может быть потомков. + + + + Element %1 cannot have a sequence constructor. + У элемента %1 не может быть конструктора последовательности. + + + + + The attribute %1 cannot appear on %2, when it is a child of %3. + У %2 не может быть атрибута %1, когда он является потомком %3. + + + + A parameter in a function cannot be declared to be a tunnel. + Параметр в функции не может быть объявлен туннелем. + + + + This processor is not Schema-aware and therefore %1 cannot be used. + Данный обработчик не работает со схемами, следовательно, %1 не может использоваться. + + + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + Элементы верхнего уровня таблицы стилей должны быть в пространстве имен, которым %1 не является. + + + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + Значение атрибута %1 элемента %2 должно быть или %3, или %4, но не %5. + + + + Attribute %1 cannot have the value %2. + Атрибут %1 не может принимать значение %2. + + + + The attribute %1 can only appear on the first %2 element. + Атрибут %1 может быть только у первого элемента %2. + + + + At least one %1 element must appear as child of %2. + Как минимум один элемент %1 должен быть в %2. + + + + VolumeSlider + + + Muted + Без звука + + + + + Volume: %1% + Громкость: %1% + + + diff -Nru qesteidutil-0.3.1/common/ui/CertificateWidget.ui qesteidutil-0.3.1/common/ui/CertificateWidget.ui --- qesteidutil-0.3.1/common/ui/CertificateWidget.ui 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/common/ui/CertificateWidget.ui 2009-10-22 08:37:25.000000000 +0000 @@ -0,0 +1,164 @@ + + + CertificateDialog + + + + 0 + 0 + 400 + 453 + + + + Certificate + + + #parameterContent { font-family: "Liberation Mono, Courier New"; } + + + + + + 0 + + + + General + + + + + + true + + + + + + + + Details + + + + + + false + + + + Field + + + + + Value + + + + + + + + true + + + + + + + QDialogButtonBox::Save + + + + + + + + Certification Path + + + + + + Certification Path + + + + + + false + + + + 1 + + + + + + + + + + + Certificate status: + + + + + + + + + + + + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + clicked(QAbstractButton*) + CertificateDialog + reject() + + + 199 + 437 + + + 199 + 226 + + + + + saveBox + clicked(QAbstractButton*) + CertificateDialog + save() + + + 199 + 396 + + + 199 + 226 + + + + + + save() + + diff -Nru qesteidutil-0.3.1/COPYING qesteidutil-0.3.1/COPYING --- qesteidutil-0.3.1/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/COPYING 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff -Nru qesteidutil-0.3.1/debian/changelog qesteidutil-0.3.1/debian/changelog --- qesteidutil-0.3.1/debian/changelog 2011-10-13 05:54:52.000000000 +0000 +++ qesteidutil-0.3.1/debian/changelog 2012-02-10 14:30:20.000000000 +0000 @@ -1,17 +1,13 @@ -qesteidutil (0.3.1-0esteid2~oneiric1) oneiric; urgency=low +qesteidutil (0.3.1-0ubuntu1~oneiric1) oneiric; urgency=low - * Built from release tarball + * Backport to PPA. - -- Guido Tabbernuk Wed, 12 Oct 2011 23:55:29 +0300 + -- Martin-Éric Racine Fri, 10 Feb 2012 16:29:58 +0200 -qesteidutil (0.3.0-0esteid2~oneiric1) oneiric; urgency=low +qesteidutil (0.3.1-0ubuntu1) precise; urgency=low - * Built from release. + * Initial release for Ubuntu (LP: #916436). + Based upon initial packaging by Kalev Lember, with further improvements + by Guido Tabbernuk, then packaging review by Martin-Éric Racine. - -- Guido Tabbernuk Thu, 19 May 2011 15:10:00 +0300 - -qesteidutil (0.3.0-0esteid1~maverick1) maverick; urgency=low - - * Initial release - - -- Kalev Lember Mon, 4 Oct 2010 17:56:00 +0200 + -- Martin-Éric Racine Sat, 14 Jan 2012 05:37:09 +0200 diff -Nru qesteidutil-0.3.1/debian/control qesteidutil-0.3.1/debian/control --- qesteidutil-0.3.1/debian/control 2011-10-09 12:38:37.000000000 +0000 +++ qesteidutil-0.3.1/debian/control 2012-01-24 07:40:04.000000000 +0000 @@ -1,21 +1,28 @@ Source: qesteidutil Section: utils -Priority: extra -Maintainer: Kalev Lember -Build-Depends: cdbs, debhelper (>= 7), cmake, libsmartcardpp-dev, libqt4-dev, libp11-dev, libssl-dev, libqtwebkit-dev -Standards-Version: 3.8.0 +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Guido Tabbernuk , Martin-Éric Racine +Build-Depends: cdbs, debhelper (>= 7), cmake, pkg-config, + libp11-dev, libqt4-dev, libqtwebkit-dev, libsmartcardpp-dev, libssl-dev +Standards-Version: 3.9.2 Homepage: http://code.google.com/p/esteid/ Package: qesteidutil Architecture: any -Depends: ${shlibs:Depends}, ttf-liberation, opensc -Description: Estonian ID card utility - Qt based Estonian ID card utility. +Depends: fonts-liberation | ttf-liberation, opensc, ${misc:Depends}, ${shlibs:Depends} +Description: Estonian ID card management utility + QEsteidUtil is a user-friendly application for managing Estonian ID Cards. + It can be used to change and unlock PIN codes, examine the personal + information stored on the card, extract and view the certificates, set + up mobile ID and configure a personal @eesti.ee e-mail address. Package: qesteidutil-dbg Architecture: any -Section: libdevel +Section: debug Priority: extra -Depends: qesteidutil (= ${binary:Version}), ${misc:Depends} -Description: debugging symbols for qesteidutil +Depends: qesteidutil (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} +Description: qesteidutil debugging symbols + QEsteidUtil is a user-friendly application for managing Estonian ID Cards. + . This package contains debugging symbols for qesteidutil package. diff -Nru qesteidutil-0.3.1/debian/copyright qesteidutil-0.3.1/debian/copyright --- qesteidutil-0.3.1/debian/copyright 2010-10-05 19:39:42.000000000 +0000 +++ qesteidutil-0.3.1/debian/copyright 2012-01-24 20:16:14.000000000 +0000 @@ -1,39 +1,27 @@ -This package was debianized by Kalev Lember on -Tue, 24 Mar 2009 13:10:50 +0200. +qesteidutil -- user-friendly application for managing Estonian ID Cards. -It was downloaded from http://code.google.com/p/esteid/ +This package was debianized by Guido Tabbernuk on +Thu, 12 Jan 2012 15:13:46 +0200 -Upstream Author(s): +It was downloaded from - - +Copyrights: -Copyright: - - - + qesteidutil: + © 2010-2011 Jargo Kõster + © 2010-2011 Raul Metsma + © 2010-2011 Kalev Lember + debian/*: + © 2012 Martin-Éric Racine + © 2011 Guido Tabbernuk + © 2010 Kalev Lember License: - This package is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU Lesser General -Public License can be found in `/usr/share/common-licenses/LGPL'. - -The Debian packaging is (C) 2009, Kalev Lember and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. +On Debian systems, the complete text of the GNU Lesser General Public +License can be found in . diff -Nru qesteidutil-0.3.1/debian/rules qesteidutil-0.3.1/debian/rules --- qesteidutil-0.3.1/debian/rules 2011-05-19 12:05:09.000000000 +0000 +++ qesteidutil-0.3.1/debian/rules 2012-01-14 03:31:52.000000000 +0000 @@ -1,13 +1,23 @@ #!/usr/bin/make -f - -DEB_TAR_SRCDIR := $(shell ls -1 qesteidutil-*.tar.bz2 | sed -e 's,\.tar.*,,g') - -include /usr/share/cdbs/1/rules/tarball.mk +# [debian/rules] for libdigidoc +# +# COPYRIGHT © 2012 Guido Tabbernuk +# +# LICENSE +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/utils.mk include /usr/share/cdbs/1/class/cmake.mk +DEB_DESTDIR := $(CURDIR)/debian/qesteidutil + binary-install/qesteidutil:: - dh_desktop -pqesteidutil dh_icons -pqesteidutil -DEB_DESTDIR := $(CURDIR)/debian/qesteidutil +common-binary-post-install-arch common-binary-post-install-indep:: list-missing + +#EOF diff -Nru qesteidutil-0.3.1/debian/source/format qesteidutil-0.3.1/debian/source/format --- qesteidutil-0.3.1/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/debian/source/format 2012-02-10 14:39:27.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru qesteidutil-0.3.1/debian/watch qesteidutil-0.3.1/debian/watch --- qesteidutil-0.3.1/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/debian/watch 2012-01-12 07:12:50.000000000 +0000 @@ -0,0 +1,4 @@ +version=3 +http://esteid.googlecode.com/files/libdigidoc-([\d\.]+)\.tar\.bz2 \ + debian uupdate --no-symlink + diff -Nru qesteidutil-0.3.1/mac/Info.plist.cmake qesteidutil-0.3.1/mac/Info.plist.cmake --- qesteidutil-0.3.1/mac/Info.plist.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/mac/Info.plist.cmake 2009-06-18 08:12:25.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + qesteidutil + CFBundleIconFile + Icon.icns + CFBundleIdentifier + org.esteid.qesteidutil + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + qesteidutil + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.@PROJECT_WC_REVISION@ + CFBundleSignature + ???? + CFBundleVersion + @PROJECT_WC_REVISION@ + LSHasLocalizedDisplayName + + + \ No newline at end of file Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/mac/Resources/en.lproj/InfoPlist.strings and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/mac/Resources/en.lproj/InfoPlist.strings differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/mac/Resources/et.lproj/InfoPlist.strings and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/mac/Resources/et.lproj/InfoPlist.strings differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/mac/Resources/Icon.icns and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/mac/Resources/Icon.icns differ diff -Nru qesteidutil-0.3.1/mac/Resources/ru.lproj/InfoPlist.strings qesteidutil-0.3.1/mac/Resources/ru.lproj/InfoPlist.strings --- qesteidutil-0.3.1/mac/Resources/ru.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/mac/Resources/ru.lproj/InfoPlist.strings 2009-10-28 11:36:04.000000000 +0000 @@ -0,0 +1,5 @@ +/* Localized versions of Info.plist keys */ + +CFBundleDisplayName = "Oбсуживание ID-карты"; +CFBundleGetInfoString = "v1.0, Copyright 2009 __COMPANY_NAME__."; +NSHumanReadableCopyright = "Copyright (c) 2009, __COMPANY_NAME__."; \ No newline at end of file diff -Nru qesteidutil-0.3.1/NEWS qesteidutil-0.3.1/NEWS --- qesteidutil-0.3.1/NEWS 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/NEWS 2011-10-12 18:28:50.000000000 +0000 @@ -0,0 +1,24 @@ +qesteidutil 0.3.1 (2011-10-12) +============================== +- New man page (Mihkel Vain) +- Window decorations fix with IceWM/LXDE (alvar@raamat.polva.ee) +- Use system copy of qtsingleapplication if possible (Kalev Lember) +- Fixed build with smartcardpp 0.3.0 (Kalev Lember) +- Fixed blank window with recent webkit versions (Kalev Lember) +- Fixed unreadable Russian text in email settings (Sander Lepik) +- Translation updates (Erkko Kebbinau) + +Bugs fixed with this release: + #79 - "Wrong text in russian language + #160 - "Misspelling of occurred in qesteidutil" + #169 - "Starts with blank non functional window on Ubuntu Oneiric (and Debian + Unstable)" + +qesteidutil 0.3.0 (2010-09-29) +============================== + +- Initial release + +Many thanks to all the contributors: Antti Andreimann, Aram Sahradyan, +Asse Sauga, Edgar Kivisild, Hasso Tepper, Janek Priimann, Jargo Kõster, +Kalev Lember, Raul Metsma, Sander Lepik, Toomas Tamme. Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/qesteidutil-0.3.1.tar.bz2 and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/qesteidutil-0.3.1.tar.bz2 differ diff -Nru qesteidutil-0.3.1/qesteidutil.1 qesteidutil-0.3.1/qesteidutil.1 --- qesteidutil-0.3.1/qesteidutil.1 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qesteidutil.1 2011-07-06 16:35:38.000000000 +0000 @@ -0,0 +1,26 @@ +.TH qesteidutil "1" "July 2011" +.SH NAME +qesteidutil \- an application for managing Estonian ID Card +.SH SYNOPSIS +.TP +\fPqesteidutil\fP +.SH DESCRIPTION +QEsteidUtil is an application for managing Estonian ID Card. In an +user-friendly interface it is possible to change and unlock PINs, +examine detailed information about personal data file on the card, +extract and view certificates, set up mobile ID, and configure +@eesti.ee email. + +.PP +For more information about the qesteidutil and for full documentation, +visit https://code.google.com/p/esteid/wiki/QEsteidUtilHelp + +.SH AUTHORS +.B qesteidutil +was written by Jargo Kõster , Raul Metsma + and Kalev Lember + +.SH "SEE ALSO" +.BR qdigidocclient (1), +.BR qdigidoccrypto (1), +.BR cdigidoc (1), \ No newline at end of file diff -Nru qesteidutil-0.3.1/qesteidutil.desktop qesteidutil-0.3.1/qesteidutil.desktop --- qesteidutil-0.3.1/qesteidutil.desktop 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qesteidutil.desktop 2009-11-03 16:26:44.000000000 +0000 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=ID-card Utility +Name[et]=ID-kaardi haldusvahend +Name[ru]=Oбсуживание ID-карты +Exec=qesteidutil %F +Icon=qesteidutil +Terminal=false +Categories=Qt;Utility; diff -Nru qesteidutil-0.3.1/qtsingleapplication/buildlib/buildlib.pro qesteidutil-0.3.1/qtsingleapplication/buildlib/buildlib.pro --- qesteidutil-0.3.1/qtsingleapplication/buildlib/buildlib.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/buildlib/buildlib.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,13 @@ +TEMPLATE=lib +CONFIG += qt dll qtsingleapplication-buildlib +mac:CONFIG += absolute_library_soname +win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all +include(../src/qtsingleapplication.pri) +TARGET = $$QTSINGLEAPPLICATION_LIBNAME +DESTDIR = $$QTSINGLEAPPLICATION_LIBDIR +win32 { + DLLDESTDIR = $$[QT_INSTALL_BINS] + QMAKE_DISTCLEAN += $$[QT_INSTALL_BINS]\\$${QTSINGLEAPPLICATION_LIBNAME}.dll +} +target.path = $$DESTDIR +INSTALLS += target diff -Nru qesteidutil-0.3.1/qtsingleapplication/CMakeLists.txt qesteidutil-0.3.1/qtsingleapplication/CMakeLists.txt --- qesteidutil-0.3.1/qtsingleapplication/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/CMakeLists.txt 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,16 @@ +set( MOC_HEADERS + src/qtlocalpeer.h + src/qtsingleapplication.h + ) +set( HEADERS + ${MOC_HEADERS} + ) +QT4_WRAP_CPP( MOC_SOURCES ${MOC_HEADERS} ) +set( SOURCES + ${HEADERS} + ${MOC_SOURCES} + src/qtlocalpeer.cpp + src/qtsingleapplication.cpp + ) + +ADD_LIBRARY( qtsingleapplication STATIC ${SOURCES} ) diff -Nru qesteidutil-0.3.1/qtsingleapplication/common.pri qesteidutil-0.3.1/qtsingleapplication/common.pri --- qesteidutil-0.3.1/qtsingleapplication/common.pri 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/common.pri 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,6 @@ +infile(config.pri, SOLUTIONS_LIBRARY, yes): CONFIG += qtsingleapplication-uselib +TEMPLATE += fakelib +QTSINGLEAPPLICATION_LIBNAME = $$qtLibraryTarget(QtSolutions_SingleApplication-2.6) +TEMPLATE -= fakelib +QTSINGLEAPPLICATION_LIBDIR = $$PWD/lib +unix:qtsingleapplication-uselib:!qtsingleapplication-buildlib:QMAKE_RPATHDIR += $$QTSINGLEAPPLICATION_LIBDIR diff -Nru qesteidutil-0.3.1/qtsingleapplication/configure qesteidutil-0.3.1/qtsingleapplication/configure --- qesteidutil-0.3.1/qtsingleapplication/configure 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/configure 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,112 @@ +#!/bin/sh + +if [ "x$1" != "x" -a "x$1" != "x-library" ]; then + echo "Usage: $0 [-library]" + echo + echo "-library: Build the component as a dynamic library (DLL). Default is to" + echo " include the component source code directly in the application." + echo " A DLL may be preferable for technical or licensing (LGPL) reasons." + echo + exit 0 +fi + + +# only ask to accept the license text once +if [ ! -f .licenseAccepted ]; then +# determine if opensource or commercial package + if [ -f LICENSE.LGPL ]; then + # opensource edition + while true; do + echo + echo "You are licensed to use this software under the terms of" + echo "the GNU General Public License (GPL) version 3, or" + echo "the GNU Lesser General Public License (LGPL) version 2.1" + echo "with certain additional extra rights as specified in the" + echo "Nokia Qt LGPL Exception version 1.0." + echo + echo "Type 'G' to view the GNU General Public License (GPL) version 3." + echo "Type 'L' to view the GNU Lesser General Public License (LGPL) version 2.1." + echo "Type 'E' to view the Nokia Qt LGPL Exception version 1.0." + echo "Type 'yes' to accept this license offer." + echo "Type 'no' to decline this license offer." + echo + echo "Do you accept the terms of this license? " + read answer + echo + + if [ "x$answer" = "xno" ]; then + echo "You are not licensed to use this software." + echo + exit 1 + elif [ "x$answer" = "xyes" ]; then + echo license accepted > .licenseAccepted + break + elif [ "x$answer" = "xe" -o "x$answer" = "xE" ]; then + more LGPL_EXCEPTION.txt + elif [ "x$answer" = "xl" -o "x$answer" = "xL" ]; then + more LICENSE.LGPL + elif [ "x$answer" = "xg" -o "x$answer" = "xG" ]; then + more LICENSE.GPL3 + fi + done + else + while true; do + echo + echo "Please choose your region." + echo + echo "Type 1 for North or South America." + echo "Type 2 for anywhere outside North and South America." + echo + echo "Select: " + read region + if [ "x$region" = "x1" ]; then + licenseFile=LICENSE.US + break; + elif [ "x$region" = "x2" ]; then + licenseFile=LICENSE.NO + break; + fi + done + while true; do + echo + echo "License Agreement" + echo + echo "Type '?' to view the Qt Solutions Commercial License." + echo "Type 'yes' to accept this license offer." + echo "Type 'no' to decline this license offer." + echo + echo "Do you accept the terms of this license? " + read answer + echo + + if [ "x$answer" = "xno" ]; then + echo "You are not licensed to use this software." + echo + exit 1 + elif [ "x$answer" = "xyes" ]; then + echo license accepted > .licenseAccepted + cp "$licenseFile" LICENSE + rm LICENSE.US + rm LICENSE.NO + break + elif [ "x$answer" = "x?" ]; then + more "$licenseFile" + fi + done + fi +fi + +rm -f config.pri +if [ "x$1" = "x-library" ]; then + echo "Configuring to build this component as a dynamic library." + echo "SOLUTIONS_LIBRARY = yes" > config.pri +fi + +echo +echo "This component is now configured." +echo +echo "To build the component library (if requested) and example(s)," +echo "run qmake and your make command." +echo +echo "To remove or reconfigure, run make distclean." +echo diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/classic.css qesteidutil-0.3.1/qtsingleapplication/doc/html/classic.css --- qesteidutil-0.3.1/qtsingleapplication/doc/html/classic.css 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/classic.css 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,131 @@ +h3.fn,span.fn +{ + margin-left: 1cm; + text-indent: -1cm; +} + +a:link +{ + color: #004faf; + text-decoration: none +} + +a:visited +{ + color: #672967; + text-decoration: none +} + +a.obsolete +{ + color: #661100; + text-decoration: none +} + +a.compat +{ + color: #661100; + text-decoration: none +} + +a.obsolete:visited +{ + color: #995500; + text-decoration: none +} + +a.compat:visited +{ + color: #995500; + text-decoration: none +} + +td.postheader +{ + font-family: sans-serif +} + +tr.address +{ + font-family: sans-serif +} + +body +{ + background: #ffffff; + color: black +} + +table tr.odd { + background: #f0f0f0; + color: black; +} + +table tr.even { + background: #e4e4e4; + color: black; +} + +table.annotated th { + padding: 3px; + text-align: left +} + +table.annotated td { + padding: 3px; +} + +table tr pre +{ + padding-top: none; + padding-bottom: none; + padding-left: none; + padding-right: none; + border: none; + background: none +} + +tr.qt-style +{ + background: #a2c511; + color: black +} + +body pre +{ + padding: 0.2em; + border: #e7e7e7 1px solid; + background: #f1f1f1; + color: black +} + +span.preprocessor, span.preprocessor a +{ + color: darkblue; +} + +span.comment +{ + color: darkred; + font-style: italic +} + +span.string,span.char +{ + color: darkgreen; +} + +.title +{ + text-align: center +} + +.subtitle +{ + font-size: 0.8em +} + +.small-subtitle +{ + font-size: 0.65em +} Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/qtsingleapplication/doc/html/images/qt-logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/qtsingleapplication/doc/html/images/qt-logo.png differ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/index.html qesteidutil-0.3.1/qtsingleapplication/doc/html/index.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/index.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/index.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,48 @@ + + + + + + Single Application + + + + + + + +
  Home

Single Application
+

+ +

Description

+

The QtSingleApplication component provides support for applications that can be only started once per user.

+

For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance.

+

The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui.

+ +

Classes

+ + +

Examples

+ + +

Tested platforms

+
    +
  • Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005
  • +
  • Qt 4.4, 4.5 / Linux / gcc
  • +
  • Qt 4.4, 4.5 / MacOS X 10.5 / gcc
  • +
+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + QtLockedFile Class Reference + + + + + + + +
  Home

QtLockedFile Class Reference

+

The QtLockedFile class extends QFile with advisory locking functions. More...

+
 #include <QtLockedFile>

Inherits QFile.

+ + +

Public Types

+
    +
  • enum LockMode { ReadLock, WriteLock, NoLock }
  • +
+ +

Public Functions

+ +
    +
  • 23 public functions inherited from QFile
  • +
  • 32 public functions inherited from QIODevice
  • +
  • 29 public functions inherited from QObject
  • +
+

Additional Inherited Members

+
    +
  • 1 property inherited from QObject
  • +
  • 1 public slot inherited from QObject
  • +
  • 4 signals inherited from QIODevice
  • +
  • 1 signal inherited from QObject
  • +
  • 1 public type inherited from QObject
  • +
  • 14 static public members inherited from QFile
  • +
  • 4 static public members inherited from QObject
  • +
  • 5 protected functions inherited from QIODevice
  • +
  • 7 protected functions inherited from QObject
  • +
  • 2 protected variables inherited from QObject
  • +
+ +
+

Detailed Description

+

The QtLockedFile class extends QFile with advisory locking functions.

+

A file may be locked in read or write mode. Multiple instances of QtLockedFile, created in multiple processes running on the same machine, may have a file locked in read mode. Exactly one instance may have it locked in write mode. A read and a write lock cannot exist simultaneously on the same file.

+

The file locks are advisory. This means that nothing prevents another process from manipulating a locked file using QFile or file system functions offered by the OS. Serialization is only guaranteed if all processes that access the file use QLockedFile. Also, while holding a lock on a file, a process must not open the same file again (through any API), or locks can be unexpectedly lost.

+

The lock provided by an instance of QtLockedFile is released whenever the program terminates. This is true even when the program crashes and no destructors are called.

+
+

Member Type Documentation

+

enum QtLockedFile::LockMode

+

This enum describes the available lock modes.

+

+ + + + +
ConstantValueDescription
QtLockedFile::ReadLock1A read lock.
QtLockedFile::WriteLock2A write lock.
QtLockedFile::NoLock0Neither a read lock nor a write lock.

+
+

Member Function Documentation

+

QtLockedFile::QtLockedFile ()

+

Constructs an unlocked QtLockedFile object. This constructor behaves in the same way as QFile::QFile().

+

See also QFile::QFile().

+

QtLockedFile::QtLockedFile ( const QString & name )

+

Constructs an unlocked QtLockedFile object with file name. This constructor behaves in the same way as QFile::QFile(const QString&).

+

See also QFile::QFile().

+

QtLockedFile::~QtLockedFile ()

+

Destroys the QtLockedFile object. If any locks were held, they are released.

+

bool QtLockedFile::isLocked () const

+

Returns true if this object has a in read or write lock; otherwise returns false.

+

See also lockMode().

+

bool QtLockedFile::lock ( LockMode mode, bool block = true )

+

Obtains a lock of type mode. The file must be opened before it can be locked.

+

If block is true, this function will block until the lock is aquired. If block is false, this function returns false immediately if the lock cannot be aquired.

+

If this object already has a lock of type mode, this function returns true immediately. If this object has a lock of a different type than mode, the lock is first released and then a new lock is obtained.

+

This function returns true if, after it executes, the file is locked by this object, and false otherwise.

+

See also unlock(), isLocked(), and lockMode().

+

LockMode QtLockedFile::lockMode () const

+

Returns the type of lock currently held by this object, or QtLockedFile::NoLock.

+

See also isLocked().

+

bool QtLockedFile::open ( OpenMode mode )

+

Opens the file in OpenMode mode.

+

This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock.

+

Returns true if successful; otherwise false.

+

See also QFile::open() and QFile::resize().

+

bool QtLockedFile::unlock ()

+

Releases a lock.

+

If the object has no lock, this function returns immediately.

+

This function returns true if, after it executes, the file is not locked by this object, and false otherwise.

+

See also lock(), isLocked(), and lockMode().

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile-members.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile-members.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile-members.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtlockedfile-members.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,165 @@ + + + + + + List of All Members for QtLockedFile + + + + + + + +
  Home

List of All Members for QtLockedFile

+

This is the complete list of members for QtLockedFile, including inherited members.

+

+ +
+

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.dcf qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.dcf --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.dcf 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.dcf 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,53 @@ + + +
+
+ QtLockedFile + LockMode + QtLockedFile::WriteLock + QtLockedFile::NoLock + QtLockedFile::ReadLock + isLocked + lock + lockMode + open + unlock +
+
+
+ QtSingleApplication + activateWindow + activationWindow + id + isRunning + messageReceived + sendMessage + setActivationWindow +
+
+
+
+ QtSingleCoreApplication + id + isRunning + messageReceived + sendMessage +
+
+
+
+
+ A non-GUI example +
+
+ A Trivial Example +
+
+ Loading Documents +
+
+ Single Application +
+
+
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,184 @@ + + + + + + Loading Documents + + + + + + + +
  Home

Loading Documents
+

+

The application in this example loads or prints the documents passed as commandline parameters to further instances of this application.

+
 /****************************************************************************
+ **
+ ** This file is part of a Qt Solutions component.
+ **
+ ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** Contact:  Qt Software Information (qt-info@nokia.com)
+ **
+ ** Commercial Usage
+ ** Licensees holding valid Qt Commercial licenses may use this file in
+ ** accordance with the Qt Solutions Commercial License Agreement provided
+ ** with the Software or, alternatively, in accordance with the terms
+ ** contained in a written agreement between you and Nokia.
+ **
+ ** GNU Lesser General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain
+ ** additional rights. These rights are described in the Nokia Qt LGPL
+ ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+ ** package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU
+ ** General Public License version 3.0 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.GPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU General Public License version 3.0 requirements will be
+ ** met: http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** Please note Third Party Software included with Qt Solutions may impose
+ ** additional restrictions and it is the user's responsibility to ensure
+ ** that they have met the licensing requirements of the GPL, LGPL, or Qt
+ ** Solutions Commercial license and the relevant license of the Third
+ ** Party Software they are using.
+ **
+ ** If you are unsure which license is appropriate for your use, please
+ ** contact the sales department at qt-sales@nokia.com.
+ **
+ ****************************************************************************/
+
+ #include <qtsingleapplication.h>
+ #include <QtCore/QFile>
+ #include <QtGui/QMainWindow>
+ #include <QtGui/QPrinter>
+ #include <QtGui/QPainter>
+ #include <QtGui/QTextEdit>
+ #include <QtGui/QMdiArea>
+ #include <QtCore/QTextStream>
+
+ class MainWindow : public QMainWindow
+ {
+     Q_OBJECT
+ public:
+     MainWindow();
+
+ public slots:
+     void handleMessage(const QString& message);
+
+ signals:
+     void needToShow();
+
+ private:
+     QMdiArea *workspace;
+ };
+

The user interface in this application is a QMainWindow subclass with a QMdiArea as the central widget. It implements a slot handleMessage() that will be connected to the messageReceived() signal of the QtSingleApplication class.

+
 MainWindow::MainWindow()
+ {
+     workspace = new QMdiArea(this);
+
+     setCentralWidget(workspace);
+ }
+

The MainWindow constructor creates a minimal user interface.

+
 void MainWindow::handleMessage(const QString& message)
+ {
+     enum Action {
+         Nothing,
+         Open,
+         Print
+     } action;
+
+     action = Nothing;
+     QString filename = message;
+     if (message.toLower().startsWith("/print ")) {
+         filename = filename.mid(7);
+         action = Print;
+     } else if (!message.isEmpty()) {
+         action = Open;
+     }
+     if (action == Nothing) {
+         emit needToShow();
+         return;
+     }
+
+     QFile file(filename);
+     QString contents;
+     if (file.open(QIODevice::ReadOnly))
+         contents = file.readAll();
+     else
+         contents = "[[Error: Could not load file " + filename + "]]";
+
+     QTextEdit *view = new QTextEdit;
+     view->setPlainText(contents);
+
+     switch(action) {
+

The handleMessage() slot interprets the message passed in as a filename that can be prepended with /print to indicate that the file should just be printed rather than loaded.

+
     case Print:
+         {
+             QPrinter printer;
+             view->print(&printer);
+             delete view;
+         }
+         break;
+
+     case Open:
+         {
+             workspace->addSubWindow(view);
+             view->setWindowTitle(message);
+             view->show();
+             emit needToShow();
+         }
+         break;
+     default:
+         break;
+     };
+ }
+

Loading the file will also activate the window.

+
 #include "main.moc"
+
+ int main(int argc, char **argv)
+ {
+     QtSingleApplication instance("File loader QtSingleApplication example", argc, argv);
+     QString message;
+     for (int a = 1; a < argc; ++a) {
+         message += argv[a];
+         if (a < argc-1)
+             message += " ";
+     }
+
+     if (instance.sendMessage(message))
+         return 0;
+

The main entry point function creates a QtSingleApplication object, and creates a message to send to a running instance of the application. If the message was sent successfully the process exits immediately.

+
     MainWindow mw;
+     mw.handleMessage(message);
+     mw.show();
+
+     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
+                      &mw, SLOT(handleMessage(const QString&)));
+
+     instance.setActivationWindow(&mw, false);
+     QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow()));
+
+     return instance.exec();
+ }
+

If the message could not be sent the application starts up. Note that false is passed to the call to setActivationWindow() to prevent automatic activation for every message received, e.g. when the application should just print a file. Instead, the message handling function determines whether activation is requested, and signals that by emitting the needToShow() signal. This is then simply connected directly to QtSingleApplication's activateWindow() slot.

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,110 @@ + + + + + + A Trivial Example + + + + + + + +
  Home

A Trivial Example
+

+

The application in this example has a log-view that displays messages sent by further instances of the same application.

+

The example demonstrates the use of the QtSingleApplication class to detect and communicate with a running instance of the application using the sendMessage() API. The messageReceived() signal is used to display received messages in a QTextEdit log.

+
 /****************************************************************************
+ **
+ ** This file is part of a Qt Solutions component.
+ **
+ ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** Contact:  Qt Software Information (qt-info@nokia.com)
+ **
+ ** Commercial Usage
+ ** Licensees holding valid Qt Commercial licenses may use this file in
+ ** accordance with the Qt Solutions Commercial License Agreement provided
+ ** with the Software or, alternatively, in accordance with the terms
+ ** contained in a written agreement between you and Nokia.
+ **
+ ** GNU Lesser General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain
+ ** additional rights. These rights are described in the Nokia Qt LGPL
+ ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+ ** package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU
+ ** General Public License version 3.0 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.GPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU General Public License version 3.0 requirements will be
+ ** met: http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** Please note Third Party Software included with Qt Solutions may impose
+ ** additional restrictions and it is the user's responsibility to ensure
+ ** that they have met the licensing requirements of the GPL, LGPL, or Qt
+ ** Solutions Commercial license and the relevant license of the Third
+ ** Party Software they are using.
+ **
+ ** If you are unsure which license is appropriate for your use, please
+ ** contact the sales department at qt-sales@nokia.com.
+ **
+ ****************************************************************************/
+
+ #include <qtsingleapplication.h>
+ #include <QtGui/QTextEdit>
+
+ class TextEdit : public QTextEdit
+ {
+     Q_OBJECT
+ public:
+     TextEdit(QWidget *parent = 0)
+         : QTextEdit(parent)
+     {}
+ public slots:
+     void append(const QString &str)
+     {
+         QTextEdit::append(str);
+     }
+ };
+
+ #include "main.moc"
+
+ int main(int argc, char **argv)
+ {
+     QtSingleApplication instance(argc, argv);
+

The example has only the main entry point function. A QtSingleApplication object is created immediately.

+
     if (instance.sendMessage("Wake up!"))
+         return 0;
+

If another instance of this application is already running, sendMessage() will succeed, and this instance just exits immediately.

+
     TextEdit logview;
+     logview.setReadOnly(true);
+     logview.show();
+

Otherwise the instance continues as normal and creates the user interface.

+
     instance.setActivationWindow(&logview);
+
+     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
+                      &logview, SLOT(append(const QString&)));
+
+     return instance.exec();
+

The logview object is also set as the application's activation window. Every time a message is received, the window will be raised and activated automatically.

+

The messageReceived() signal is also connected to the QTextEdit's append() slot. Every message received from further instances of this application will be displayed in the log.

+

Finally the event loop is entered.

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,160 @@ + + + + + + QtSingleApplication Class Reference + + + + + + + +
  Home

QtSingleApplication Class Reference

+

The QtSingleApplication class provides an API to detect and communicate with running instances of an application. More...

+
 #include <QtSingleApplication>

Inherits QApplication.

+ + +

Public Functions

+ + + +

Public Slots

+ + + +

Signals

+ + +

Additional Inherited Members

+ + +
+

Detailed Description

+

The QtSingleApplication class provides an API to detect and communicate with running instances of an application.

+

This class allows you to create applications where only one instance should be running at a time. I.e., if the user tries to launch another instance, the already running instance will be activated instead. Another usecase is a client-server system, where the first started instance will assume the role of server, and the later instances will act as clients of that server.

+

By default, the full path of the executable file is used to determine whether two processes are instances of the same application. You can also provide an explicit identifier string that will be compared instead.

+

The application should create the QtSingleApplication object early in the startup phase, and call isRunning() or sendMessage() to find out if another instance of this application is already running. Startup parameters (e.g. the name of the file the user wanted this new instance to open) can be passed to the running instance in the sendMessage() function.

+

If isRunning() or sendMessage() returns false, it means that no other instance is running, and this instance has assumed the role as the running instance. The application should continue with the initialization of the application user interface before entering the event loop with exec(), as normal. The messageReceived() signal will be emitted when the application receives messages from another instance of the same application.

+

If isRunning() or sendMessage() returns true, another instance is already running, and the application should terminate or enter client mode.

+

If a message is received it might be helpful to the user to raise the application so that it becomes visible. To facilitate this, QtSingleApplication provides the setActivationWindow() function and the activateWindow() slot.

+

Here's an example that shows how to convert an existing application to use QtSingleApplication. It is very simple and does not make use of all QtSingleApplication's functionality (see the examples for that).

+
 // Original
+ int main(int argc, char **argv)
+ {
+     QApplication app(argc, argv);
+
+     MyMainWidget mmw;
+
+     mmw.show();
+     return app.exec();
+ }
+
+ // Single instance
+ int main(int argc, char **argv)
+ {
+     QtSingleApplication app(argc, argv);
+
+     if (app.isRunning())
+         return 0;
+
+     MyMainWidget mmw;
+
+     app.setActivationWindow(&mmw);
+
+     mmw.show();
+     return app.exec();
+ }
+

Once this QtSingleApplication instance is destroyed(for example, when the user quits), when the user next attempts to run the application this instance will not, of course, be encountered. The next instance to call isRunning() or sendMessage() will assume the role as the new running instance.

+

For console (non-GUI) applications, QtSingleCoreApplication may be used instead of this class, to avoid the dependency on the QtGui library.

+

See also QtSingleCoreApplication.

+
+

Member Function Documentation

+

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, bool GUIenabled = true )

+

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and GUIenabled are passed on to the QAppliation constructor.

+

If you are creating a console application (i.e. setting GUIenabled to false), you may consider using QtSingleCoreApplication instead.

+

QtSingleApplication::QtSingleApplication ( const QString & appId, int & argc, char ** argv )

+

Creates a QtSingleApplication object with the application identifier appId. argc and argv are passed on to the QAppliation constructor.

+

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, Type type )

+

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and type are passed on to the QAppliation constructor.

+

QtSingleApplication::QtSingleApplication ( Display * dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

+

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, visual, and cmap are passed on to the QApplication constructor.

+

QtSingleApplication::QtSingleApplication ( Display * dpy, int & argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

+

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

+

QtSingleApplication::QtSingleApplication ( Display * dpy, const QString & appId, int argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

+

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be appId. dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

+

void QtSingleApplication::activateWindow ()   [slot]

+

De-minimizes, raises, and activates this application's activation window. This function does nothing if no activation window has been set.

+

This is a convenience function to show the user that this application instance has been activated when he has tried to start another instance.

+

This function should typically be called in response to the messageReceived() signal. By default, that will happen automatically, if an activation window has been set.

+

See also setActivationWindow(), messageReceived(), and initialize().

+

QWidget * QtSingleApplication::activationWindow () const

+

Returns the applications activation window if one has been set by calling setActivationWindow(), otherwise returns 0.

+

See also setActivationWindow().

+

QString QtSingleApplication::id () const

+

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

+

bool QtSingleApplication::isRunning ()

+

Returns true if another instance of this application is running; otherwise false.

+

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

+

See also sendMessage().

+

void QtSingleApplication::messageReceived ( const QString & message )   [signal]

+

This signal is emitted when the current instance receives a message from another instance of this application.

+

See also sendMessage(), setActivationWindow(), and activateWindow().

+

bool QtSingleApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

+

Tries to send the text message to the currently running instance. The QtSingleApplication object in the running instance will emit the messageReceived() signal when it receives the message.

+

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

+

See also isRunning() and messageReceived().

+

void QtSingleApplication::setActivationWindow ( QWidget * aw, bool activateOnMessage = true )

+

Sets the activation window of this application to aw. The activation window is the widget that will be activated by activateWindow(). This is typically the application's main window.

+

If activateOnMessage is true (the default), the window will be activated automatically every time a message is received, just prior to the messageReceived() signal being emitted.

+

See also activationWindow(), activateWindow(), and messageReceived().

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.index qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.index --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.index 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.index 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-members.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-members.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-members.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-members.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,227 @@ + + + + + + List of All Members for QtSingleApplication + + + + + + + +
  Home

List of All Members for QtSingleApplication

+

This is the complete list of members for QtSingleApplication, including inherited members.

+

+ +
+

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + Obsolete Members for QtSingleApplication + + + + + + + +
  Home

Obsolete Members for QtSingleApplication

+

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

+

+

Public Functions

+
    +
  • void initialize ( bool dummy = true )   (obsolete)
  • +
+
+

Member Function Documentation

+

void QtSingleApplication::initialize ( bool dummy = true )

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qch and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qch differ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qhp qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qhp --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qhp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsingleapplication.qhp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,65 @@ + + + com.trolltech.qtsolutions.qtsingleapplication_2.6 + qdoc + + qt + solutions + qtsingleapplication + + + qt + solutions + qtsingleapplication + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + qtlockedfile.html + qtsingleapplication.html + index.html + qtsingleapplication-example-trivial.html + qtsinglecoreapplication.html + qtsingleapplication-example-loader.html + qtsinglecoreapplication-example-console.html + classic.css + images/qt-logo.png + +
+
diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + A non-GUI example + + + + + + + +
  Home

A non-GUI example
+

+

This example shows how to use the single-application functionality in a console application. It does not require the QtGui library at all.

+

The only differences from the GUI application usage demonstrated in the other examples are:

+

1) The .pro file should include qtsinglecoreapplication.pri instead of qtsingleapplication.pri

+

2) The class name is QtSingleCoreApplication instead of QtSingleApplication.

+

3) No calls are made regarding window activation, for obvious reasons.

+

console.pro:

+
 TEMPLATE   = app
+ CONFIG    += console
+ SOURCES   += main.cpp
+ include(../../src/qtsinglecoreapplication.pri)
+ QT -= gui
+

main.cpp:

+
 /****************************************************************************
+ **
+ ** This file is part of a Qt Solutions component.
+ **
+ ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** Contact:  Qt Software Information (qt-info@nokia.com)
+ **
+ ** Commercial Usage
+ ** Licensees holding valid Qt Commercial licenses may use this file in
+ ** accordance with the Qt Solutions Commercial License Agreement provided
+ ** with the Software or, alternatively, in accordance with the terms
+ ** contained in a written agreement between you and Nokia.
+ **
+ ** GNU Lesser General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain
+ ** additional rights. These rights are described in the Nokia Qt LGPL
+ ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+ ** package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU
+ ** General Public License version 3.0 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.GPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU General Public License version 3.0 requirements will be
+ ** met: http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** Please note Third Party Software included with Qt Solutions may impose
+ ** additional restrictions and it is the user's responsibility to ensure
+ ** that they have met the licensing requirements of the GPL, LGPL, or Qt
+ ** Solutions Commercial license and the relevant license of the Third
+ ** Party Software they are using.
+ **
+ ** If you are unsure which license is appropriate for your use, please
+ ** contact the sales department at qt-sales@nokia.com.
+ **
+ ****************************************************************************/
+
+ #include "qtsinglecoreapplication.h"
+ #include <QtCore/QDebug>
+
+ void report(const QString& msg)
+ {
+     qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg));
+ }
+
+ class MainClass : public QObject
+ {
+     Q_OBJECT
+ public:
+     MainClass()
+         : QObject()
+         {}
+
+ public slots:
+     void handleMessage(const QString& message)
+         {
+             report( "Message received: \"" + message + "\"");
+         }
+ };
+
+ int main(int argc, char **argv)
+ {
+     report("Starting up");
+
+     QtSingleCoreApplication app(argc, argv);
+
+     if (app.isRunning()) {
+         QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid()));
+         bool sentok = app.sendMessage(msg);
+         QString rep("Another instance is running, so I will exit.");
+         rep += sentok ? " Message sent ok." : " Message sending failed.";
+         report(rep);
+         return 0;
+     } else {
+         report("No other instance is running; so I will.");
+         MainClass mainObj;
+         QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
+                          &mainObj, SLOT(handleMessage(const QString&)));
+         return app.exec();
+     }
+ }
+
+ #include "main.moc"
+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,94 @@ + + + + + + QtSingleCoreApplication Class Reference + + + + + + + +
  Home

QtSingleCoreApplication Class Reference

+

A variant of the QtSingleApplication class for non-GUI applications. More...

+
 #include <QtSingleCoreApplication>

Inherits QCoreApplication.

+ + +

Public Functions

+ + + +

Public Slots

+
    +
  • bool sendMessage ( const QString & message, int timeout = 5000 )
  • +
+ + +

Signals

+ + +

Additional Inherited Members

+ + +
+

Detailed Description

+

A variant of the QtSingleApplication class for non-GUI applications.

+

This class is a variant of QtSingleApplication suited for use in console (non-GUI) applications. It is an extension of QCoreApplication (instead of QApplication). It does not require the QtGui library.

+

The API and usage is identical to QtSingleApplication, except that functions relating to the "activation window" are not present, for obvious reasons. Please refer to the QtSingleApplication documentation for explanation of the usage.

+

A QtSingleCoreApplication instance can communicate to a QtSingleApplication instance if they share the same application id. Hence, this class can be used to create a light-weight command-line tool that sends commands to a GUI application.

+

See also QtSingleApplication.

+
+

Member Function Documentation

+

QtSingleCoreApplication::QtSingleCoreApplication ( int & argc, char ** argv )

+

Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc and argv are passed on to the QCoreAppliation constructor.

+

QtSingleCoreApplication::QtSingleCoreApplication ( const QString & appId, int & argc, char ** argv )

+

Creates a QtSingleCoreApplication object with the application identifier appId. argc and argv are passed on to the QCoreAppliation constructor.

+

QString QtSingleCoreApplication::id () const

+

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

+

bool QtSingleCoreApplication::isRunning ()

+

Returns true if another instance of this application is running; otherwise false.

+

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

+

See also sendMessage().

+

void QtSingleCoreApplication::messageReceived ( const QString & message )   [signal]

+

This signal is emitted when the current instance receives a message from another instance of this application.

+

See also sendMessage().

+

bool QtSingleCoreApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

+

Tries to send the text message to the currently running instance. The QtSingleCoreApplication object in the running instance will emit the messageReceived() signal when it receives the message.

+

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

+

See also isRunning() and messageReceived().

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html --- qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + List of All Members for QtSingleCoreApplication + + + + + + + +
  Home

List of All Members for QtSingleCoreApplication

+

This is the complete list of members for QtSingleCoreApplication, including inherited members.

+

+ +
+

+


+ + + + +
Copyright © 2009 NokiaTrademarks
Qt Solutions
+ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/qtsingleapplication/doc/images/qt-logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/qtsingleapplication/doc/images/qt-logo.png differ diff -Nru qesteidutil-0.3.1/qtsingleapplication/doc/index.qdoc qesteidutil-0.3.1/qtsingleapplication/doc/index.qdoc --- qesteidutil-0.3.1/qtsingleapplication/doc/index.qdoc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/doc/index.qdoc 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,47 @@ +/*! + \page index.html + \title Single Application + + \section1 Description + + The QtSingleApplication component provides support + for applications that can be only started once per user. + + + + For some applications it is useful or even critical that they are started + only once by any user. Future attempts to start the application should + activate any already running instance, and possibly perform requested + actions, e.g. loading a file, in that instance. + + The QtSingleApplication class provides an interface to detect a running + instance, and to send command strings to that instance. + For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui. + + + + + \section1 Classes + \list + \i QtSingleApplication \i QtSingleCoreApplication\endlist + + \section1 Examples + \list + \i \link qtsingleapplication-example-trivial.html A Trivial Example \endlink \i \link qtsingleapplication-example-loader.html Loading Documents \endlink \i \link qtsinglecoreapplication-example-console.html A Non-GUI Example \endlink \endlist + + + + + + + \section1 Tested platforms + \list + \i Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005 + \i Qt 4.4, 4.5 / Linux / gcc + \i Qt 4.4, 4.5 / MacOS X 10.5 / gcc + \endlist + + + + + */ \ No newline at end of file diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/console/console.pro qesteidutil-0.3.1/qtsingleapplication/examples/console/console.pro --- qesteidutil-0.3.1/qtsingleapplication/examples/console/console.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/console/console.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,5 @@ +TEMPLATE = app +CONFIG += console +SOURCES += main.cpp +include(../../src/qtsinglecoreapplication.pri) +QT -= gui diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/console/console.qdoc qesteidutil-0.3.1/qtsingleapplication/examples/console/console.qdoc --- qesteidutil-0.3.1/qtsingleapplication/examples/console/console.qdoc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/console/console.qdoc 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/*! \page qtsinglecoreapplication-example-console.html + \title A non-GUI example + + This example shows how to use the single-application functionality + in a console application. It does not require the \c QtGui library + at all. + + The only differences from the GUI application usage demonstrated + in the other examples are: + + 1) The \c.pro file should include \c qtsinglecoreapplication.pri + instead of \c qtsingleapplication.pri + + 2) The class name is \c QtSingleCoreApplication instead of \c + QtSingleApplication. + + 3) No calls are made regarding window activation, for obvious reasons. + + console.pro: + \quotefile console/console.pro + + main.cpp: + \quotefile console/main.cpp + +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/console/main.cpp qesteidutil-0.3.1/qtsingleapplication/examples/console/main.cpp --- qesteidutil-0.3.1/qtsingleapplication/examples/console/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/console/main.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include "qtsinglecoreapplication.h" +#include + + +void report(const QString& msg) +{ + qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg)); +} + +class MainClass : public QObject +{ + Q_OBJECT +public: + MainClass() + : QObject() + {} + +public slots: + void handleMessage(const QString& message) + { + report( "Message received: \"" + message + "\""); + } +}; + +int main(int argc, char **argv) +{ + report("Starting up"); + + QtSingleCoreApplication app(argc, argv); + + if (app.isRunning()) { + QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid())); + bool sentok = app.sendMessage(msg); + QString rep("Another instance is running, so I will exit."); + rep += sentok ? " Message sent ok." : " Message sending failed."; + report(rep); + return 0; + } else { + report("No other instance is running; so I will."); + MainClass mainObj; + QObject::connect(&app, SIGNAL(messageReceived(const QString&)), + &mainObj, SLOT(handleMessage(const QString&))); + return app.exec(); + } +} + + +#include "main.moc" diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/examples.pro qesteidutil-0.3.1/qtsingleapplication/examples/examples.pro --- qesteidutil-0.3.1/qtsingleapplication/examples/examples.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/examples.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = trivial \ + loader \ + console diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/loader/file1.qsl qesteidutil-0.3.1/qtsingleapplication/examples/loader/file1.qsl --- qesteidutil-0.3.1/qtsingleapplication/examples/loader/file1.qsl 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/loader/file1.qsl 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1 @@ +File 1 diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/loader/file2.qsl qesteidutil-0.3.1/qtsingleapplication/examples/loader/file2.qsl --- qesteidutil-0.3.1/qtsingleapplication/examples/loader/file2.qsl 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/loader/file2.qsl 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1 @@ +File 2 diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.pro qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.pro --- qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,5 @@ +TEMPLATE = app + +include(../../src/qtsingleapplication.pri) + +SOURCES += main.cpp diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.qdoc qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.qdoc --- qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.qdoc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/loader/loader.qdoc 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/*! \page qtsingleapplication-example-loader.html + \title Loading Documents + + The application in this example loads or prints the documents + passed as commandline parameters to further instances of this + application. + + \quotefromfile loader/main.cpp + \printuntil }; + The user interface in this application is a QMainWindow subclass + with a QMdiArea as the central widget. It implements a slot + \c handleMessage() that will be connected to the messageReceived() + signal of the QtSingleApplication class. + + \printuntil } + The MainWindow constructor creates a minimal user interface. + + \printto case Print: + The handleMessage() slot interprets the message passed in as a + filename that can be prepended with \e /print to indicate that + the file should just be printed rather than loaded. + + \printto #include + Loading the file will also activate the window. + + \printto mw + The \c main entry point function creates a QtSingleApplication + object, and creates a message to send to a running instance + of the application. If the message was sent successfully the + process exits immediately. + + \printuntil } + If the message could not be sent the application starts up. Note + that \c false is passed to the call to setActivationWindow() to + prevent automatic activation for every message received, e.g. when + the application should just print a file. Instead, the message + handling function determines whether activation is requested, and + signals that by emitting the needToShow() signal. This is then + simply connected directly to QtSingleApplication's + activateWindow() slot. +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/loader/main.cpp qesteidutil-0.3.1/qtsingleapplication/examples/loader/main.cpp --- qesteidutil-0.3.1/qtsingleapplication/examples/loader/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/loader/main.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +class MainWindow : public QMainWindow +{ + Q_OBJECT +public: + MainWindow(); + +public slots: + void handleMessage(const QString& message); + +signals: + void needToShow(); + +private: + QMdiArea *workspace; +}; + +MainWindow::MainWindow() +{ + workspace = new QMdiArea(this); + + setCentralWidget(workspace); +} + +void MainWindow::handleMessage(const QString& message) +{ + enum Action { + Nothing, + Open, + Print + } action; + + action = Nothing; + QString filename = message; + if (message.toLower().startsWith("/print ")) { + filename = filename.mid(7); + action = Print; + } else if (!message.isEmpty()) { + action = Open; + } + if (action == Nothing) { + emit needToShow(); + return; + } + + QFile file(filename); + QString contents; + if (file.open(QIODevice::ReadOnly)) + contents = file.readAll(); + else + contents = "[[Error: Could not load file " + filename + "]]"; + + QTextEdit *view = new QTextEdit; + view->setPlainText(contents); + + switch(action) { + case Print: + { + QPrinter printer; + view->print(&printer); + delete view; + } + break; + + case Open: + { + workspace->addSubWindow(view); + view->setWindowTitle(message); + view->show(); + emit needToShow(); + } + break; + default: + break; + }; +} + +#include "main.moc" + +int main(int argc, char **argv) +{ + QtSingleApplication instance("File loader QtSingleApplication example", argc, argv); + QString message; + for (int a = 1; a < argc; ++a) { + message += argv[a]; + if (a < argc-1) + message += " "; + } + + if (instance.sendMessage(message)) + return 0; + + MainWindow mw; + mw.handleMessage(message); + mw.show(); + + QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), + &mw, SLOT(handleMessage(const QString&))); + + instance.setActivationWindow(&mw, false); + QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow())); + + return instance.exec(); +} diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/trivial/main.cpp qesteidutil-0.3.1/qtsingleapplication/examples/trivial/main.cpp --- qesteidutil-0.3.1/qtsingleapplication/examples/trivial/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/trivial/main.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#include +#include + +class TextEdit : public QTextEdit +{ + Q_OBJECT +public: + TextEdit(QWidget *parent = 0) + : QTextEdit(parent) + {} +public slots: + void append(const QString &str) + { + QTextEdit::append(str); + } +}; + +#include "main.moc" + + + +int main(int argc, char **argv) +{ + QtSingleApplication instance(argc, argv); + if (instance.sendMessage("Wake up!")) + return 0; + + TextEdit logview; + logview.setReadOnly(true); + logview.show(); + + instance.setActivationWindow(&logview); + + QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), + &logview, SLOT(append(const QString&))); + + return instance.exec(); +} diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.pro qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.pro --- qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,5 @@ +TEMPLATE = app + +include(../../src/qtsingleapplication.pri) + +SOURCES += main.cpp diff -Nru qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.qdoc qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.qdoc --- qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.qdoc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/examples/trivial/trivial.qdoc 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/*! \page qtsingleapplication-example-trivial.html + \title A Trivial Example + + The application in this example has a log-view that displays + messages sent by further instances of the same application. + + The example demonstrates the use of the QtSingleApplication + class to detect and communicate with a running instance of + the application using the sendMessage() API. The messageReceived() + signal is used to display received messages in a QTextEdit log. + + \quotefromfile trivial/main.cpp + \printuntil instance + The example has only the \c main entry point function. + A QtSingleApplication object is created immediately. + + \printuntil return + If another instance of this application is already running, + sendMessage() will succeed, and this instance just exits + immediately. + + \printuntil show() + Otherwise the instance continues as normal and creates the + user interface. + + \printuntil return instance.exec(); + The \c logview object is also set as the application's activation + window. Every time a message is received, the window will be raised + and activated automatically. + + The messageReceived() signal is also connected to the QTextEdit's + append() slot. Every message received from further instances of + this application will be displayed in the log. + + Finally the event loop is entered. +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/INSTALL.TXT qesteidutil-0.3.1/qtsingleapplication/INSTALL.TXT --- qesteidutil-0.3.1/qtsingleapplication/INSTALL.TXT 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/INSTALL.TXT 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,254 @@ +INSTALLATION INSTRUCTIONS + +These instructions refer to the package you are installing as +some-package.tar.gz or some-package.zip. The .zip file is intended for use +on Windows. + +The directory you choose for the installation will be referred to as +your-install-dir. + +Note to Qt Visual Studio Integration users: In the instructions below, +instead of building from command line with nmake, you can use the menu +command 'Qt->Open Solution from .pro file' on the .pro files in the +example and plugin directories, and then build from within Visual +Studio. + +Unpacking and installation +-------------------------- + +1. Unpacking the archive (if you have not done so already). + + On Unix and Mac OS X (in a terminal window): + + cd your-install-dir + gunzip some-package.tar.gz + tar xvf some-package.tar + + This creates the subdirectory some-package containing the files. + + On Windows: + + Unpack the .zip archive by right-clicking it in explorer and + choosing "Extract All...". If your version of Windows does not + have zip support, you can use the infozip tools available + from www.info-zip.org. + + If you are using the infozip tools (in a command prompt window): + cd your-install-dir + unzip some-package.zip + +2. Configuring the package. + + The configure script is called "configure" on unix/mac and + "configure.bat" on Windows. It should be run from a command line + after cd'ing to the package directory. + + You can choose whether you want to use the component by including + its source code directly into your project, or build the component + as a dynamic shared library (DLL) that is loaded into the + application at run-time. The latter may be preferable for + technical or licensing (LGPL) reasons. If you want to build a DLL, + run the configure script with the argument "-library". Also see + the note about usage below. + + (Components that are Qt plugins, e.g. styles and image formats, + are by default built as a plugin DLL.) + + The configure script will prompt you in some cases for further + information. Answer these questions and carefully read the license text + before accepting the license conditions. The package cannot be used if + you do not accept the license conditions. + +3. Building the component and examples (when required). + + If a DLL is to be built, or if you would like to build the + examples, next give the commands + + qmake + make [or nmake if your are using Microsoft Visual C++] + + The example program(s) can be found in the directory called + "examples" or "example". + + Components that are Qt plugins, e.g. styles and image formats, are + ready to be used as soon as they are built, so the rest of this + installation instruction can be skipped. + +4. Building the Qt Designer plugin (optional). + + Some of the widget components are provided with plugins for Qt + Designer. To build and install the plugin, cd into the + some-package/plugin directory and give the commands + + qmake + make [or nmake if your are using Microsoft Visual C++] + + Restart Qt Designer to make it load the new widget plugin. + + Note: If you are using the built-in Qt Designer from the Qt Visual + Studio Integration, you will need to manually copy the plugin DLL + file, i.e. copy + %QTDIR%\plugins\designer\some-component.dll + to the Qt Visual Studio Integration plugin path, typically: + C:\Program Files\Trolltech\Qt VS Integration\plugins + + Note: If you for some reason are using a Qt Designer that is built + in debug mode, you will need to build the plugin in debug mode + also. Edit the file plugin.pro in the plugin directory, changing + 'release' to 'debug' in the CONFIG line, before running qmake. + + + +Solutions components are intended to be used directly from the package +directory during development, so there is no 'make install' procedure. + + +Using a component in your project +--------------------------------- + +To use this component in your project, add the following line to the +project's .pro file (or do the equivalent in your IDE): + + include(your-install-dir/some-package/src/some-package.pri) + +This adds the package's sources and headers to the SOURCES and HEADERS +project variables respectively (or, if the component has been +configured as a DLL, it adds that library to the LIBS variable), and +updates INCLUDEPATH to contain the package's src +directory. Additionally, the .pri file may include some dependencies +needed by the package. + +To include a header file from the package in your sources, you can now +simply use: + + #include + +or alternatively, in pre-Qt 4 style: + + #include + +Refer to the documentation to see the classes and headers this +components provides. + + + +Install documentation (optional) +-------------------------------- + +The HTML documentation for the package's classes is located in the +your-install-dir/some-package/doc/html/index.html. You can open this +file and read the documentation with any web browser. + +To install the documentation into Qt Assistant (for Qt version 4.4 and +later): + +1. In Assistant, open the Edit->Preferences dialog and choose the + Documentation tab. Click the Add... button and select the file + your-install-dir/some-package/doc/html/some-package.qch + +For Qt versions prior to 4.4, do instead the following: + +1. The directory your-install-dir/some-package/doc/html contains a + file called some-package.dcf. Execute the following commands in a + shell, command prompt or terminal window: + + cd your-install-dir/some-package/doc/html/ + assistant -addContentFile some-package.dcf + +The next time you start Qt Assistant, you can access the package's +documentation. + + +Removing the documentation from assistant +----------------------------------------- + +If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later: + +1. In Assistant, open the Edit->Preferences dialog and choose the + Documentation tab. In the list of Registered Documentation, select + the item com.trolltech.qtsolutions.some-package_version, and click + the Remove button. + +For Qt versions prior to 4.4, do instead the following: + +1. The directory your-install-dir/some-package/doc/html contains a + file called some-package.dcf. Execute the following commands in a + shell, command prompt or terminal window: + + cd your-install-dir/some-package/doc/html/ + assistant -removeContentFile some-package.dcf + + + +Using the component as a DLL +---------------------------- + +1. Normal components + + The shared library (DLL) is built and placed in the + some-package/lib directory. It is intended to be used directly + from there during development. When appropriate, both debug and + release versions are built, since the run-time linker will in some + cases refuse to load a debug-built DLL into a release-built + application or vice versa. + + The following steps are taken by default to help the dynamic + linker to locate the DLL at run-time (during development): + + Unix: The some-package.pri file will add linker instructions to + add the some-package/lib directory to the rpath of the + executable. (When distributing, or if your system does not support + rpath, you can copy the shared library to another place that is + searched by the dynamic linker, e.g. the "lib" directory of your + Qt installation.) + + Mac: The full path to the library is hardcoded into the library + itself, from where it is copied into the executable at link time, + and ready by the dynamic linker at run-time. (When distributing, + you will want to edit these hardcoded paths in the same way as for + the Qt DLLs. Refer to the document "Deploying an Application on + Mac OS X" in the Qt Reference Documentation.) + + Windows: the .dll file(s) are copied into the "bin" directory of + your Qt installation. The Qt installation will already have set up + that directory to be searched by the dynamic linker. + + +2. Plugins + + For Qt Solutions plugins (e.g. image formats), both debug and + release versions of the plugin are built by default when + appropriate, since in some cases the release Qt library will not + load a debug plugin, and vice versa. The plugins are automatically + copied into the plugins directory of your Qt installation when + built, so no further setup is required. + + Plugins may also be built statically, i.e. as a library that will be + linked into your application executable, and so will not need to + be redistributed as a separate plugin DLL to end users. Static + building is required if Qt itself is built statically. To do it, + just add "static" to the CONFIG variable in the plugin/plugin.pro + file before building. Refer to the "Static Plugins" section in the + chapter "How to Create Qt Plugins" for explanation of how to use a + static plugin in your application. The source code of the example + program(s) will also typically contain the relevant instructions + as comments. + + + +Uninstalling +------------ + + The following command will remove any fils that have been + automatically placed outside the package directory itself during + installation and building + + make distclean [or nmake if your are using Microsoft Visual C++] + + If Qt Assistant documentation or Qt Designer plugins have been + installed, they can be uninstalled manually, ref. above. + + +Enjoy! :) + +- The Qt Solutions Team. diff -Nru qesteidutil-0.3.1/qtsingleapplication/LGPL_EXCEPTION.txt qesteidutil-0.3.1/qtsingleapplication/LGPL_EXCEPTION.txt --- qesteidutil-0.3.1/qtsingleapplication/LGPL_EXCEPTION.txt 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/LGPL_EXCEPTION.txt 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,10 @@ +Nokia Qt LGPL Exception version 1.0 + +As a special exception to the GNU Lesser General Public License +version 2.1, the object code form of a "work that uses the Library" +may incorporate material from a header file that is part of the +Library. You may distribute such object code under terms of your +choice, provided that the incorporated material (i) does not exceed +more than 5% of the total size of the Library; and (ii) is limited to +numerical parameters, data structure layouts, accessors, macros, +inline functions and templates. diff -Nru qesteidutil-0.3.1/qtsingleapplication/LICENSE.GPL3 qesteidutil-0.3.1/qtsingleapplication/LICENSE.GPL3 --- qesteidutil-0.3.1/qtsingleapplication/LICENSE.GPL3 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/LICENSE.GPL3 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru qesteidutil-0.3.1/qtsingleapplication/LICENSE.LGPL qesteidutil-0.3.1/qtsingleapplication/LICENSE.LGPL --- qesteidutil-0.3.1/qtsingleapplication/LICENSE.LGPL 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/LICENSE.LGPL 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff -Nru qesteidutil-0.3.1/qtsingleapplication/qtsingleapplication.pro qesteidutil-0.3.1/qtsingleapplication/qtsingleapplication.pro --- qesteidutil-0.3.1/qtsingleapplication/qtsingleapplication.pro 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/qtsingleapplication.pro 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,5 @@ +TEMPLATE=subdirs +CONFIG += ordered +include(common.pri) +qtsingleapplication-uselib:SUBDIRS=buildlib +SUBDIRS+=examples diff -Nru qesteidutil-0.3.1/qtsingleapplication/README.TXT qesteidutil-0.3.1/qtsingleapplication/README.TXT --- qesteidutil-0.3.1/qtsingleapplication/README.TXT 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/README.TXT 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,7 @@ +Single Application v2.6 + +The QtSingleApplication component provides support for +applications that can be only started once per user. + + + diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.cpp 2009-10-01 08:42:43.000000000 +0000 @@ -0,0 +1,204 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include "qtlocalpeer.h" +#include +#include + +#if defined(Q_OS_WIN) +#include +#include +typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*); +static PProcessIdToSessionId pProcessIdToSessionId = 0; +#endif +#if defined(Q_OS_UNIX) +#include +#include +#endif + +namespace QtLP_Private { +#include "qtlockedfile.cpp" +#if defined(Q_OS_WIN) +#include "qtlockedfile_win.cpp" +#else +#include "qtlockedfile_unix.cpp" +#endif +} + +const char* QtLocalPeer::ack = "ack"; + +QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) + : QObject(parent), id(appId) +{ + QString prefix = id; + if (id.isEmpty()) { + id = QCoreApplication::applicationFilePath(); +#if defined(Q_OS_WIN) + id = id.toLower(); +#endif + prefix = id.section(QLatin1Char('/'), -1); + } + prefix.remove(QRegExp("[^a-zA-Z]")); + prefix.truncate(6); + + QByteArray idc = id.toUtf8(); + quint16 idNum = qChecksum(idc.constData(), idc.size()); + socketName = QLatin1String("qtsingleapp-") + prefix + + QLatin1Char('-') + QString::number(idNum, 16); + +#if defined(Q_OS_WIN) + if (!pProcessIdToSessionId) { + QLibrary lib("kernel32"); + pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId"); + } + if (pProcessIdToSessionId) { + DWORD sessionId = 0; + pProcessIdToSessionId(GetCurrentProcessId(), &sessionId); + socketName += QLatin1Char('-') + QString::number(sessionId, 16); + } +#else + socketName += QLatin1Char('-') + QString::number(::getuid(), 16); +#endif + + server = new QLocalServer(this); + QString lockName = QDir(QDir::tempPath()).absolutePath() + + QLatin1Char('/') + socketName + + QLatin1String("-lockfile"); + lockFile.setFileName(lockName); + lockFile.open(QIODevice::ReadWrite); +} + + + +bool QtLocalPeer::isClient() +{ + if (lockFile.isLocked()) + return false; + + if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) + return true; + + bool res = server->listen(socketName); +#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) + // ### Workaround + if (!res && server->serverError() == QAbstractSocket::AddressInUseError) { + QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName); + res = server->listen(socketName); + } +#endif + if (!res) + qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString())); + QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection())); + return false; +} + + +bool QtLocalPeer::sendMessage(const QString &message, int timeout) +{ + if (!isClient()) + return false; + + QLocalSocket socket; + bool connOk = false; + for(int i = 0; i < 2; i++) { + // Try twice, in case the other instance is just starting up + socket.connectToServer(socketName); + connOk = socket.waitForConnected(timeout/2); + if (connOk || i) + break; + int ms = 250; +#if defined(Q_OS_WIN) + Sleep(DWORD(ms)); +#else + struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; + nanosleep(&ts, NULL); +#endif + } + if (!connOk) + return false; + + QByteArray uMsg(message.toUtf8()); + QDataStream ds(&socket); + ds.writeBytes(uMsg.constData(), uMsg.size()); + bool res = socket.waitForBytesWritten(timeout); + res &= socket.waitForReadyRead(timeout); // wait for ack + res &= (socket.read(qstrlen(ack)) == ack); + return res; +} + + +void QtLocalPeer::receiveConnection() +{ + QLocalSocket* socket = server->nextPendingConnection(); + if (!socket) + return; + + while (socket->bytesAvailable() < (int)sizeof(quint32)) + socket->waitForReadyRead(); + QDataStream ds(socket); + QByteArray uMsg; + quint32 remaining; + ds >> remaining; + uMsg.resize(remaining); + int got = 0; + char* uMsgBuf = uMsg.data(); + do { + got = ds.readRawData(uMsgBuf, remaining); + remaining -= got; + uMsgBuf += got; + } while (remaining && got >= 0 && socket->waitForReadyRead(2000)); + if (got < 0) { + qWarning() << "QtLocalPeer: Message reception failed" << socket->errorString(); + delete socket; + return; + } + QString message(QString::fromUtf8(uMsg)); + socket->write(ack, qstrlen(ack)); + socket->waitForBytesWritten(1000); + delete socket; + emit messageReceived(message); //### (might take a long time to return) +} diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.h qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.h --- qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlocalpeer.h 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include +#include +#include + +namespace QtLP_Private { +#include "qtlockedfile.h" +} + +class QtLocalPeer : public QObject +{ + Q_OBJECT + +public: + QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); + bool isClient(); + bool sendMessage(const QString &message, int timeout); + QString applicationId() const + { return id; } + +Q_SIGNALS: + void messageReceived(const QString &message); + +protected Q_SLOTS: + void receiveConnection(); + +protected: + QString id; + QString socketName; + QLocalServer* server; + QtLP_Private::QtLockedFile lockFile; + +private: + static const char* ack; +}; diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/QtLockedFile qesteidutil-0.3.1/qtsingleapplication/src/QtLockedFile --- qesteidutil-0.3.1/qtsingleapplication/src/QtLockedFile 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/QtLockedFile 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1 @@ +#include "qtlockedfile.h" diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#include "qtlockedfile.h" + +/*! + \class QtLockedFile + + \brief The QtLockedFile class extends QFile with advisory locking + functions. + + A file may be locked in read or write mode. Multiple instances of + \e QtLockedFile, created in multiple processes running on the same + machine, may have a file locked in read mode. Exactly one instance + may have it locked in write mode. A read and a write lock cannot + exist simultaneously on the same file. + + The file locks are advisory. This means that nothing prevents + another process from manipulating a locked file using QFile or + file system functions offered by the OS. Serialization is only + guaranteed if all processes that access the file use + QLockedFile. Also, while holding a lock on a file, a process + must not open the same file again (through any API), or locks + can be unexpectedly lost. + + The lock provided by an instance of \e QtLockedFile is released + whenever the program terminates. This is true even when the + program crashes and no destructors are called. +*/ + +/*! \enum QtLockedFile::LockMode + + This enum describes the available lock modes. + + \value ReadLock A read lock. + \value WriteLock A write lock. + \value NoLock Neither a read lock nor a write lock. +*/ + +/*! + Constructs an unlocked \e QtLockedFile object. This constructor + behaves in the same way as \e QFile::QFile(). + + \sa QFile::QFile() +*/ +QtLockedFile::QtLockedFile() + : QFile() +{ +#ifdef Q_OS_WIN + wmutex = 0; + rmutex = 0; +#endif + m_lock_mode = NoLock; +} + +/*! + Constructs an unlocked QtLockedFile object with file \a name. This + constructor behaves in the same way as \e QFile::QFile(const + QString&). + + \sa QFile::QFile() +*/ +QtLockedFile::QtLockedFile(const QString &name) + : QFile(name) +{ +#ifdef Q_OS_WIN + wmutex = 0; + rmutex = 0; +#endif + m_lock_mode = NoLock; +} + +/*! + Opens the file in OpenMode \a mode. + + This is identical to QFile::open(), with the one exception that the + Truncate mode flag is disallowed. Truncation would conflict with the + advisory file locking, since the file would be modified before the + write lock is obtained. If truncation is required, use resize(0) + after obtaining the write lock. + + Returns true if successful; otherwise false. + + \sa QFile::open(), QFile::resize() +*/ +bool QtLockedFile::open(OpenMode mode) +{ + if (mode & QIODevice::Truncate) { + qWarning("QtLockedFile::open(): Truncate mode not allowed."); + return false; + } + return QFile::open(mode); +} + +/*! + Returns \e true if this object has a in read or write lock; + otherwise returns \e false. + + \sa lockMode() +*/ +bool QtLockedFile::isLocked() const +{ + return m_lock_mode != NoLock; +} + +/*! + Returns the type of lock currently held by this object, or \e + QtLockedFile::NoLock. + + \sa isLocked() +*/ +QtLockedFile::LockMode QtLockedFile::lockMode() const +{ + return m_lock_mode; +} + +/*! + \fn bool QtLockedFile::lock(LockMode mode, bool block = true) + + Obtains a lock of type \a mode. The file must be opened before it + can be locked. + + If \a block is true, this function will block until the lock is + aquired. If \a block is false, this function returns \e false + immediately if the lock cannot be aquired. + + If this object already has a lock of type \a mode, this function + returns \e true immediately. If this object has a lock of a + different type than \a mode, the lock is first released and then a + new lock is obtained. + + This function returns \e true if, after it executes, the file is + locked by this object, and \e false otherwise. + + \sa unlock(), isLocked(), lockMode() +*/ + +/*! + \fn bool QtLockedFile::unlock() + + Releases a lock. + + If the object has no lock, this function returns immediately. + + This function returns \e true if, after it executes, the file is + not locked by this object, and \e false otherwise. + + \sa lock(), isLocked(), lockMode() +*/ + +/*! + \fn QtLockedFile::~QtLockedFile() + + Destroys the \e QtLockedFile object. If any locks were held, they + are released. +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.h qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.h --- qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile.h 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#ifndef QTLOCKEDFILE_H +#define QTLOCKEDFILE_H + +#include +#ifdef Q_OS_WIN +#include +#endif + +#if defined(Q_WS_WIN) +# if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) +# define QT_QTLOCKEDFILE_EXPORT +# elif defined(QT_QTLOCKEDFILE_IMPORT) +# if defined(QT_QTLOCKEDFILE_EXPORT) +# undef QT_QTLOCKEDFILE_EXPORT +# endif +# define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport) +# elif defined(QT_QTLOCKEDFILE_EXPORT) +# undef QT_QTLOCKEDFILE_EXPORT +# define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport) +# endif +#else +# define QT_QTLOCKEDFILE_EXPORT +#endif + +class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile +{ +public: + enum LockMode { NoLock = 0, ReadLock, WriteLock }; + + QtLockedFile(); + QtLockedFile(const QString &name); + ~QtLockedFile(); + + bool open(OpenMode mode); + + bool lock(LockMode mode, bool block = true); + bool unlock(); + bool isLocked() const; + LockMode lockMode() const; + +private: +#ifdef Q_OS_WIN + Qt::HANDLE wmutex; + Qt::HANDLE rmutex; + QVector rmutexes; + QString mutexname; + + Qt::HANDLE getMutexHandle(int idx, bool doCreate); + bool waitMutex(Qt::HANDLE mutex, bool doBlock); + +#endif + LockMode m_lock_mode; +}; + +#endif diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_unix.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_unix.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_unix.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_unix.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#include +#include +#include +#include + +#include "qtlockedfile.h" + +bool QtLockedFile::lock(LockMode mode, bool block) +{ + if (!isOpen()) { + qWarning("QtLockedFile::lock(): file is not opened"); + return false; + } + + if (mode == NoLock) + return unlock(); + + if (mode == m_lock_mode) + return true; + + if (m_lock_mode != NoLock) + unlock(); + + struct flock fl; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; + int cmd = block ? F_SETLKW : F_SETLK; + int ret = fcntl(handle(), cmd, &fl); + + if (ret == -1) { + if (errno != EINTR && errno != EAGAIN) + qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); + return false; + } + + + m_lock_mode = mode; + return true; +} + + +bool QtLockedFile::unlock() +{ + if (!isOpen()) { + qWarning("QtLockedFile::unlock(): file is not opened"); + return false; + } + + if (!isLocked()) + return true; + + struct flock fl; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + fl.l_type = F_UNLCK; + int ret = fcntl(handle(), F_SETLKW, &fl); + + if (ret == -1) { + qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); + return false; + } + + m_lock_mode = NoLock; + return true; +} + +QtLockedFile::~QtLockedFile() +{ + if (isOpen()) + unlock(); +} + diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_win.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_win.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_win.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtlockedfile_win.cpp 2010-06-06 11:08:01.000000000 +0000 @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#include "qtlockedfile.h" +#include +#include + +#define MUTEX_PREFIX "QtLockedFile mutex " +// Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS +#define MAX_READERS MAXIMUM_WAIT_OBJECTS + +Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) +{ + if (mutexname.isEmpty()) { + QFileInfo fi(*this); + mutexname = QString::fromLatin1(MUTEX_PREFIX) + + fi.absoluteFilePath().toLower(); + } + QString mname(mutexname); + if (idx >= 0) + mname += QString::number(idx); + + Qt::HANDLE mutex; + if (doCreate) { + QT_WA( { mutex = CreateMutexW(NULL, FALSE, reinterpret_cast(mname.utf16())); }, + { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); + if (!mutex) { + qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); + return 0; + } + } + else { + QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, reinterpret_cast(mname.utf16())); }, + { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); + if (!mutex) { + if (GetLastError() != ERROR_FILE_NOT_FOUND) + qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); + return 0; + } + } + return mutex; +} + +bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock) +{ + Q_ASSERT(mutex); + DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0); + switch (res) { + case WAIT_OBJECT_0: + case WAIT_ABANDONED: + return true; + break; + case WAIT_TIMEOUT: + break; + default: + qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed"); + } + return false; +} + + + +bool QtLockedFile::lock(LockMode mode, bool block) +{ + if (!isOpen()) { + qWarning("QtLockedFile::lock(): file is not opened"); + return false; + } + + if (mode == NoLock) + return unlock(); + + if (mode == m_lock_mode) + return true; + + if (m_lock_mode != NoLock) + unlock(); + + if (!wmutex && !(wmutex = getMutexHandle(-1, true))) + return false; + + if (!waitMutex(wmutex, block)) + return false; + + if (mode == ReadLock) { + int idx = 0; + for (; idx < MAX_READERS; idx++) { + rmutex = getMutexHandle(idx, false); + if (!rmutex || waitMutex(rmutex, false)) + break; + CloseHandle(rmutex); + } + bool ok = true; + if (idx >= MAX_READERS) { + qWarning("QtLockedFile::lock(): too many readers"); + rmutex = 0; + ok = false; + } + else if (!rmutex) { + rmutex = getMutexHandle(idx, true); + if (!rmutex || !waitMutex(rmutex, false)) + ok = false; + } + if (!ok && rmutex) { + CloseHandle(rmutex); + rmutex = 0; + } + ReleaseMutex(wmutex); + if (!ok) + return false; + } + else { + Q_ASSERT(rmutexes.isEmpty()); + for (int i = 0; i < MAX_READERS; i++) { + Qt::HANDLE mutex = getMutexHandle(i, false); + if (mutex) + rmutexes.append(mutex); + } + if (rmutexes.size()) { + DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), + TRUE, block ? INFINITE : 0); + if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { + if (res != WAIT_TIMEOUT) + qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); + m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky + unlock(); + return false; + } + } + } + + m_lock_mode = mode; + return true; +} + +bool QtLockedFile::unlock() +{ + if (!isOpen()) { + qWarning("QtLockedFile::unlock(): file is not opened"); + return false; + } + + if (!isLocked()) + return true; + + if (m_lock_mode == ReadLock) { + ReleaseMutex(rmutex); + CloseHandle(rmutex); + rmutex = 0; + } + else { + foreach(Qt::HANDLE mutex, rmutexes) { + ReleaseMutex(mutex); + CloseHandle(mutex); + } + rmutexes.clear(); + ReleaseMutex(wmutex); + } + + m_lock_mode = QtLockedFile::NoLock; + return true; +} + +QtLockedFile::~QtLockedFile() +{ + if (isOpen()) + unlock(); + if (wmutex) + CloseHandle(wmutex); +} diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/QtSingleApplication qesteidutil-0.3.1/qtsingleapplication/src/QtSingleApplication --- qesteidutil-0.3.1/qtsingleapplication/src/QtSingleApplication 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/QtSingleApplication 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1 @@ +#include "qtsingleapplication.h" diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,351 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include "qtsingleapplication.h" +#include "qtlocalpeer.h" +#include + + +/*! + \class QtSingleApplication qtsingleapplication.h + \brief The QtSingleApplication class provides an API to detect and + communicate with running instances of an application. + + This class allows you to create applications where only one + instance should be running at a time. I.e., if the user tries to + launch another instance, the already running instance will be + activated instead. Another usecase is a client-server system, + where the first started instance will assume the role of server, + and the later instances will act as clients of that server. + + By default, the full path of the executable file is used to + determine whether two processes are instances of the same + application. You can also provide an explicit identifier string + that will be compared instead. + + The application should create the QtSingleApplication object early + in the startup phase, and call isRunning() or sendMessage() to + find out if another instance of this application is already + running. Startup parameters (e.g. the name of the file the user + wanted this new instance to open) can be passed to the running + instance in the sendMessage() function. + + If isRunning() or sendMessage() returns false, it means that no + other instance is running, and this instance has assumed the role + as the running instance. The application should continue with the + initialization of the application user interface before entering + the event loop with exec(), as normal. The messageReceived() + signal will be emitted when the application receives messages from + another instance of the same application. + + If isRunning() or sendMessage() returns true, another instance is + already running, and the application should terminate or enter + client mode. + + If a message is received it might be helpful to the user to raise + the application so that it becomes visible. To facilitate this, + QtSingleApplication provides the setActivationWindow() function + and the activateWindow() slot. + + Here's an example that shows how to convert an existing + application to use QtSingleApplication. It is very simple and does + not make use of all QtSingleApplication's functionality (see the + examples for that). + + \code + // Original + int main(int argc, char **argv) + { + QApplication app(argc, argv); + + MyMainWidget mmw; + + mmw.show(); + return app.exec(); + } + + // Single instance + int main(int argc, char **argv) + { + QtSingleApplication app(argc, argv); + + if (app.isRunning()) + return 0; + + MyMainWidget mmw; + + app.setActivationWindow(&mmw); + + mmw.show(); + return app.exec(); + } + \endcode + + Once this QtSingleApplication instance is destroyed(for example, + when the user quits), when the user next attempts to run the + application this instance will not, of course, be encountered. The + next instance to call isRunning() or sendMessage() will assume the + role as the new running instance. + + For console (non-GUI) applications, QtSingleCoreApplication may be + used instead of this class, to avoid the dependency on the QtGui + library. + + \sa QtSingleCoreApplication +*/ + + +void QtSingleApplication::sysInit(const QString &appId) +{ + actWin = 0; + peer = new QtLocalPeer(this, appId); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Creates a QtSingleApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc, \a + argv, and \a GUIenabled are passed on to the QAppliation constructor. + + If you are creating a console application (i.e. setting \a + GUIenabled to false), you may consider using + QtSingleCoreApplication instead. +*/ + +QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled) + : QApplication(argc, argv, GUIenabled) +{ + sysInit(); +} + + +/*! + Creates a QtSingleApplication object with the application + identifier \a appId. \a argc and \a argv are passed on to the + QAppliation constructor. +*/ + +QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) + : QApplication(argc, argv) +{ + sysInit(appId); +} + + +/*! + Creates a QtSingleApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc, \a + argv, and \a type are passed on to the QAppliation constructor. +*/ +QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) + : QApplication(argc, argv, type) +{ + sysInit(); +} + + +#if defined(Q_WS_X11) +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be QCoreApplication::applicationFilePath(). \a dpy, \a visual, + and \a cmap are passed on to the QApplication constructor. +*/ +QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, visual, cmap) +{ + sysInit(); +} + +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a + argv, \a visual, and \a cmap are passed on to the QApplication + constructor. +*/ +QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, argc, argv, visual, cmap) +{ + sysInit(); +} + +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be \a appId. \a dpy, \a argc, \a + argv, \a visual, and \a cmap are passed on to the QApplication + constructor. +*/ +QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, argc, argv, visual, cmap) +{ + sysInit(appId); +} +#endif + + +/*! + Returns true if another instance of this application is running; + otherwise false. + + This function does not find instances of this application that are + being run by a different user (on Windows: that are running in + another session). + + \sa sendMessage() +*/ + +bool QtSingleApplication::isRunning() +{ + return peer->isClient(); +} + + +/*! + Tries to send the text \a message to the currently running + instance. The QtSingleApplication object in the running instance + will emit the messageReceived() signal when it receives the + message. + + This function returns true if the message has been sent to, and + processed by, the current instance. If there is no instance + currently running, or if the running instance fails to process the + message within \a timeout milliseconds, this function return false. + + \sa isRunning(), messageReceived() +*/ +bool QtSingleApplication::sendMessage(const QString &message, int timeout) +{ + return peer->sendMessage(message, timeout); +} + + +/*! + Returns the application identifier. Two processes with the same + identifier will be regarded as instances of the same application. +*/ +QString QtSingleApplication::id() const +{ + return peer->applicationId(); +} + + +/*! + Sets the activation window of this application to \a aw. The + activation window is the widget that will be activated by + activateWindow(). This is typically the application's main window. + + If \a activateOnMessage is true (the default), the window will be + activated automatically every time a message is received, just prior + to the messageReceived() signal being emitted. + + \sa activateWindow(), messageReceived() +*/ + +void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage) +{ + actWin = aw; + if (activateOnMessage) + connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); + else + disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); +} + + +/*! + Returns the applications activation window if one has been set by + calling setActivationWindow(), otherwise returns 0. + + \sa setActivationWindow() +*/ +QWidget* QtSingleApplication::activationWindow() const +{ + return actWin; +} + + +/*! + De-minimizes, raises, and activates this application's activation window. + This function does nothing if no activation window has been set. + + This is a convenience function to show the user that this + application instance has been activated when he has tried to start + another instance. + + This function should typically be called in response to the + messageReceived() signal. By default, that will happen + automatically, if an activation window has been set. + + \sa setActivationWindow(), messageReceived(), initialize() +*/ +void QtSingleApplication::activateWindow() +{ + if (actWin) { + actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized); + actWin->raise(); + actWin->activateWindow(); + } +} + + +/*! + \fn void QtSingleApplication::messageReceived(const QString& message) + + This signal is emitted when the current instance receives a \a + message from another instance of this application. + + \sa sendMessage(), setActivationWindow(), activateWindow() +*/ + + +/*! + \fn void QtSingleApplication::initialize(bool dummy = true) + + \obsolete +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.h qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.h --- qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.h 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include + +class QtLocalPeer; + +#if defined(Q_WS_WIN) +# if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) +# define QT_QTSINGLEAPPLICATION_EXPORT +# elif defined(QT_QTSINGLEAPPLICATION_IMPORT) +# if defined(QT_QTSINGLEAPPLICATION_EXPORT) +# undef QT_QTSINGLEAPPLICATION_EXPORT +# endif +# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) +# elif defined(QT_QTSINGLEAPPLICATION_EXPORT) +# undef QT_QTSINGLEAPPLICATION_EXPORT +# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) +# endif +#else +# define QT_QTSINGLEAPPLICATION_EXPORT +#endif + +class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication +{ + Q_OBJECT + +public: + QtSingleApplication(int &argc, char **argv, bool GUIenabled = true); + QtSingleApplication(const QString &id, int &argc, char **argv); + QtSingleApplication(int &argc, char **argv, Type type); +#if defined(Q_WS_X11) + QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); + QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0); + QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); +#endif + + bool isRunning(); + QString id() const; + + void setActivationWindow(QWidget* aw, bool activateOnMessage = true); + QWidget* activationWindow() const; + + // Obsolete: + void initialize(bool dummy = true) + { isRunning(); Q_UNUSED(dummy) } + +public Q_SLOTS: + bool sendMessage(const QString &message, int timeout = 5000); + void activateWindow(); + + +Q_SIGNALS: + void messageReceived(const QString &message); + + +private: + void sysInit(const QString &appId = QString()); + QtLocalPeer *peer; + QWidget *actWin; +}; diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.pri qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.pri --- qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.pri 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsingleapplication.pri 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,16 @@ +include(../common.pri) +INCLUDEPATH += $$PWD +DEPENDPATH += $$PWD +QT *= network + +qtsingleapplication-uselib:!qtsingleapplication-buildlib { + LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME +} else { + SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp + HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h +} + +win32 { + contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTSINGLEAPPLICATION_EXPORT + else:qtsingleapplication-uselib:DEFINES += QT_QTSINGLEAPPLICATION_IMPORT +} diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.cpp qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.cpp --- qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.cpp 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include "qtsinglecoreapplication.h" +#include "qtlocalpeer.h" + +/*! + \class QtSingleCoreApplication qtsinglecoreapplication.h + \brief A variant of the QtSingleApplication class for non-GUI applications. + + This class is a variant of QtSingleApplication suited for use in + console (non-GUI) applications. It is an extension of + QCoreApplication (instead of QApplication). It does not require + the QtGui library. + + The API and usage is identical to QtSingleApplication, except that + functions relating to the "activation window" are not present, for + obvious reasons. Please refer to the QtSingleApplication + documentation for explanation of the usage. + + A QtSingleCoreApplication instance can communicate to a + QtSingleApplication instance if they share the same application + id. Hence, this class can be used to create a light-weight + command-line tool that sends commands to a GUI application. + + \sa QtSingleApplication +*/ + +/*! + Creates a QtSingleCoreApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc and \a + argv are passed on to the QCoreAppliation constructor. +*/ + +QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) + : QCoreApplication(argc, argv) +{ + peer = new QtLocalPeer(this); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Creates a QtSingleCoreApplication object with the application + identifier \a appId. \a argc and \a argv are passed on to the + QCoreAppliation constructor. +*/ +QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) + : QCoreApplication(argc, argv) +{ + peer = new QtLocalPeer(this, appId); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Returns true if another instance of this application is running; + otherwise false. + + This function does not find instances of this application that are + being run by a different user (on Windows: that are running in + another session). + + \sa sendMessage() +*/ + +bool QtSingleCoreApplication::isRunning() +{ + return peer->isClient(); +} + + +/*! + Tries to send the text \a message to the currently running + instance. The QtSingleCoreApplication object in the running instance + will emit the messageReceived() signal when it receives the + message. + + This function returns true if the message has been sent to, and + processed by, the current instance. If there is no instance + currently running, or if the running instance fails to process the + message within \a timeout milliseconds, this function return false. + + \sa isRunning(), messageReceived() +*/ + +bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) +{ + return peer->sendMessage(message, timeout); +} + + +/*! + Returns the application identifier. Two processes with the same + identifier will be regarded as instances of the same application. +*/ + +QString QtSingleCoreApplication::id() const +{ + return peer->applicationId(); +} + + +/*! + \fn void QtSingleCoreApplication::messageReceived(const QString& message) + + This signal is emitted when the current instance receives a \a + message from another instance of this application. + + \sa sendMessage() +*/ diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.h qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.h --- qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.h 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + + +#include + +class QtLocalPeer; + +class QtSingleCoreApplication : public QCoreApplication +{ + Q_OBJECT + +public: + QtSingleCoreApplication(int &argc, char **argv); + QtSingleCoreApplication(const QString &id, int &argc, char **argv); + + bool isRunning(); + QString id() const; + +public Q_SLOTS: + bool sendMessage(const QString &message, int timeout = 5000); + + +Q_SIGNALS: + void messageReceived(const QString &message); + + +private: + QtLocalPeer* peer; +}; diff -Nru qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.pri qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.pri --- qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.pri 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/qtsingleapplication/src/qtsinglecoreapplication.pri 2009-07-20 13:04:34.000000000 +0000 @@ -0,0 +1,10 @@ +INCLUDEPATH += $$PWD +DEPENDPATH += $$PWD +HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h +SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp + +QT *= network + +win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { + DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) +} diff -Nru qesteidutil-0.3.1/README qesteidutil-0.3.1/README --- qesteidutil-0.3.1/README 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/README 2010-10-13 20:56:25.000000000 +0000 @@ -0,0 +1,30 @@ +QEsteidUtil +=========== + +QEsteidUtil is a user-friendly application for managing Estonian ID Cards. +It can be used to to change and unlock PIN codes, examine the personal +information stored on the card, extract and view the certificates, set +up mobile ID and configure a personal @eesti.ee e-mail address. + + +Dependencies +============ + +cmake >= 2.6.0 +libp11 +openssl +qt >= 4.4.0 +smartcardpp >= 0.2.0 +pkcs11 library (e.g. opensc) + + +BUILD INSTRUCTIONS +================== + +1. Run build with cmake + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make -j4 +2. Install the application to a system wide directory + make install diff -Nru qesteidutil-0.3.1/src/CertUpdate.cpp qesteidutil-0.3.1/src/CertUpdate.cpp --- qesteidutil-0.3.1/src/CertUpdate.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/CertUpdate.cpp 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,734 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "CertUpdate.h" + +#include "common/PinDialog.h" +#include "common/SslCertificate.h" + +#include +#include + +#define LENOF(a) (sizeof(a)/sizeof(*(a))) +#define MAKEVECTOR(a) ByteVec(a,a + LENOF(a) ) + +#define HEADER 28 + +CertUpdate::CertUpdate( int reader, QObject *parent ) +: QObject( parent ) +, card( 0 ) +, cardMgr( 0 ) +, sock( 0 ) +, step( 0 ) +, serverStep( 0 ) +, generateKeys( false ) +, m_authCert( 0 ) +{ + cardMgr = new PCSCManager(); + + card = new EstEidCard(*cardMgr); + if ( !card->isInReader( reader ) ) + throw std::runtime_error( "no card in specified reader" ); + card->connect( reader ); + m_authCert = new JsCertData( this ); + m_authCert->loadCert( card, JsCertData::AuthCert ); + updateUrl = QUrl( ( !m_authCert || m_authCert->isTest() ) ? "http://demo.digidoc.ee:80/iduuendusproxy/" : "http://www.sk.ee:80/id-kontroll2/usk/" ); + QByteArray c( QByteArray::number( QDateTime::currentDateTime().toTime_t() ) ); + memcpy( (void*)challenge, c, 8 ); + + sock = new QTcpSocket( this ); +} + +CertUpdate::~CertUpdate() +{ + if ( sock && sock->state() == QTcpSocket::ConnectedState ) + sock->disconnectFromHost(); + if ( m_authCert ) + delete m_authCert; + if ( card ) + delete card; + if ( cardMgr ) + delete cardMgr; +} + +bool CertUpdate::checkConnection() const +{ + if ( sock && sock->state() != QTcpSocket::ConnectedState ) + { + sock->connectToHost( updateUrl.host(), updateUrl.port() ); + if ( !sock->waitForConnected( 5000 ) ) + return false; + } + return true; +} + +bool CertUpdate::checkUpdateAllowed() +{ + QByteArray result = QByteArray::fromHex( runStep( step ) ); + if ( result.isEmpty() || result.size() != 22 || result.size() < 22 ) + throwError( tr("Check internet connection").toUtf8() ); + if ( result.at(4) == 0x06 ) + generateKeys = true; + if ( !(result.size() > 20 && result.at( 21 ) == 0x00) ) + throwError( tr("update not allowed!").toUtf8() ); + return true; +} + +void CertUpdate::startUpdate() +{ + QByteArray result; + for( step = 1; step < 36; step++ ) + result = runStep( step, result ); +} + +void CertUpdate::throwError( const QString &msg ) +{ throw std::runtime_error( msg.toStdString() ); } + +QByteArray CertUpdate::runStep( int s, QByteArray result ) +{ + QCoreApplication::processEvents(); + switch( s ) + { + case 1: card->setSecEnv( 1 ); break; + case 2: + { + std::string id = card->readCardID(); + memcpy( (void*)personCode, id.c_str(), id.size() ); + break; + } + case 3: + { + card->selectMF(); + card->setSecEnv( 3 ); + card->selectDF( 0xEEEE ); + card->selectEF( 0x0033 ); + card->setSecEnv( 3 ); + } + break; + case 4: + { + PinDialog *p = new PinDialog( qApp->activeWindow() ); + try { + SslCertificate c = m_authCert->cert(); + if ( !card->isSecureConnection() && m_pin.isEmpty() ) + { + p->init( PinDialog::Pin1Type, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); + if( !p->exec() ) + throw std::runtime_error( "" ); + m_pin = p->text(); + } else if ( card->isSecureConnection() ) { + p->init( PinDialog::Pin1PinpadType, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); + p->show(); + QApplication::processEvents(); + } + card->enterPin( EstEidCard::PIN_AUTH, PinString( m_pin.toLatin1() ) ); + } catch( const AuthError &e ) { + delete p; + throw std::runtime_error( "step4 auth error: " + e.desc ); + } + delete p; + break; + } + case 5: break; + case 6: + { + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || ( generateKeys && result.size() != 19) || ( !generateKeys && result.size() != 114 ) ) + throw std::runtime_error( "step6" ); + if ( !generateKeys ) + step = 25; + break; + } + case 7: break; + case 8: + { + byte tmp[18]; + memcpy( (void*)tmp, result, 18 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = r.size() ? QByteArray( (char*)&r[0], r.size() ) : ""; + } catch( CardError e ) { + throw std::runtime_error( "step8 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime8: " << e.what(); + throw std::runtime_error( "step8 runtime error" ); + } + if ( result.isEmpty() || result.size() != 33 || result.size() < 22 ) + throw std::runtime_error( "step8" ); + + if( result.at(11) == 0x12 ) + authKey = 0x11; + else + authKey = 0x12; + if( result.at(21) == 0x01 ) + signKey = 0x02; + else + signKey = 0x01; + break; + } + case 9: + { + step10 = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( step10.isEmpty() || step10.size() != 194 ) + throw std::runtime_error( "step10" ); + break; + } + case 10: break; + case 11: + { + card->selectEF( 0x0013 ); + break; + } + case 12: + { + byte tmp[96]; + memcpy( (void*)tmp, step10, 96 ); + memset( tmpResult, 0, sizeof(tmpResult)); + QByteArray tmpByte; + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + tmpByte = QByteArray( (char*)&r[0], r.size() ); + memcpy( (void*)tmpResult, tmpByte, 14 ); + } catch( CardError e ) { + throw std::runtime_error( "step12 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime12: " << e.what(); + throw std::runtime_error( "step12 runtime error" ); + } + if ( tmpByte.isEmpty() || tmpByte.size() != 14 ) + throw std::runtime_error( "step12" ); + break; + } + case 13: + { + byte tmp[96]; + QByteArray tmp13 = step10; + tmp13.chop( 1 ); + memcpy( (void*)tmp, tmp13.right(96), 96 ); + QByteArray tmpByte; + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + tmpByte = QByteArray( (char*)&r[0], r.size() ); + memcpy( (void*)&tmpResult[14], tmpByte, 14 ); + } catch( CardError e ) { + throw std::runtime_error( "step13 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime13: " << e.what(); + throw std::runtime_error( "step13 runtime error" ); + } + if ( tmpByte.isEmpty() || tmpByte.size() != 14 ) + throw std::runtime_error( "step13" ); + break; + } + case 14: + { + card->selectEF( 0x1000 ); + break; + } + case 15: + { + try { + ByteVec r = card->cardChallenge(); + memcpy( (void*)&tmpResult[28], QByteArray( (char*)&r[0], r.size() ), 8 ); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } + break; + } + case 16: + { + result = QByteArray::fromHex( queryServer( s, QByteArray( (char*)tmpResult, sizeof( tmpResult ) ) ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 54 ) + throw std::runtime_error( "step16" ); + break; + } + case 17: + { + byte tmp[53]; + memcpy( (void*)tmp, result, 53 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step17 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime17: " << e.what(); + throw std::runtime_error( "step17 runtime error" ); + } + if ( result.isEmpty() || result.size() != 48 ) + throw std::runtime_error( "step17a" ); + + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 22 ) + throw std::runtime_error( "step17b" ); + break; + } + case 18: + { + byte tmp[] = {0x00,0x22,0x41,0xB6,0x02,0x83,0x00}; + try { + card->runCommand( MAKEVECTOR(tmp) ); + } catch( CardError e ) { + throw std::runtime_error( "step18 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime18: " << e.what(); + throw std::runtime_error( "step18 runtime error" ); + } + break; + } + case 19: + { + byte tmp[] = {0x00,0x22,0x41,0xA4,0x05,0x83,0x03,0x80,authKey,0x00}; + try { + card->runCommand( MAKEVECTOR(tmp) ); + } catch( CardError e ) { + throw std::runtime_error( "step19 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime19: " << e.what(); + throw std::runtime_error( "step19 runtime error" ); + } + break; + } + case 20: + { + byte tmp[21]; + memcpy( (void*)tmp, result, 21 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step20 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime20: " << e.what(); + throw std::runtime_error( "step20 runtime error" ); + } + if ( result.isEmpty() || result.size() != 14 ) + throw std::runtime_error( "step20a" ); + + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 19 ) + throw std::runtime_error( "step20b" ); + break; + } + case 21: + { + byte tmp[18]; + memcpy( (void*)tmp, result, 18 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step21 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime21: " << e.what(); + throw std::runtime_error( "step21 runtime error" ); + } + if ( result.isEmpty() || result.size() != 147 || result.size() < 134 ) + throw std::runtime_error( "step21a" ); + + QByteArray tmpResult = result; + + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 22 ) + throw std::runtime_error( "step21b" ); + + if ((unsigned char)tmpResult.at( 132 ) == 0x34 && (unsigned char)tmpResult.at( 133 ) >= 0x80 ) + { + runStep( 3 ); + runStep( 4 ); + runStep( 11 ); + runStep( 12 ); + step = 13; + } + break; + } + case 22: + { + byte tmp[] = {0x00,0x22,0x41,0xB6,0x05,0x83,0x03,0x80,signKey,0x00}; + try { + card->runCommand( MAKEVECTOR(tmp) ); + } catch( CardError e ) { + throw std::runtime_error( "step22 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime22: " << e.what(); + throw std::runtime_error( "step22 runtime error" ); + } + break; + } + case 23: + { + byte tmp[] = {0x00,0x22,0x41,0xA4,0x05,0x83,0x03,0x80,authKey,0x00}; + try { + card->runCommand( MAKEVECTOR(tmp) ); + } catch( CardError e ) { + throw std::runtime_error( "step23 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime23: " << e.what(); + throw std::runtime_error( "step23 runtime error" ); + } + break; + } + case 24: + { + serverStep = 9; + byte tmp[21]; + memcpy( (void*)tmp, result, 21 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = r.size() ? QByteArray( (char*)&r[0], r.size() ) : ""; + } catch( CardError e ) { + throw std::runtime_error( "step24 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime24: " << e.what(); + throw std::runtime_error( "step24 runtime error" ); + } + if ( result.isEmpty() || result.size() != 14 ) + throw std::runtime_error( "step24a" ); + + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 19 ) + throw std::runtime_error( "step24b" ); + break; + } + case 25: + { + byte tmp[18]; + memcpy( (void*)tmp, result, 18 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step25 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime25: " << e.what(); + throw std::runtime_error( "step25 runtime error" ); + } + if ( result.isEmpty() || result.size() != 147 || result.size() < 134 ) + throw std::runtime_error( "step25a" ); + + QByteArray tmpResult = result; + + result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); + if ( result.isEmpty() || result.size() != 114 ) + throw std::runtime_error( "step25b" ); + + if ( (unsigned char)tmpResult.at( 132 ) == 0x34 && (unsigned char)tmpResult.at( 133 ) >= 0x80 ) + { + runStep( 3 ); + runStep( 4 ); + runStep( 11 ); + runStep( 13 ); + runStep( 14 ); + runStep( 15 ); + runStep( 16 ); + runStep( 17 ); + step = 21; + } + break; + } + case 26: + runStep( 3 ); + break; + case 27: + runStep( 4 ); + break; + case 28: + { + card->selectEF( 0xAACE ); + break; + } + case 29: + { + memcpy( (void*)certInfo[0], result, result.size() ); + char request[] = { 0x4F, 0x4B }; + for ( int i = 1;; i++ ) + { + result = QByteArray::fromHex( queryServer( s, QByteArray( (char*)&request, 2 ) ).remove( 0, 16 ) ); + if ( result.isEmpty() || ( result.size() != 114 && result.size() != 39 ) ) + throw std::runtime_error( "step29" ); + memcpy( (void*)certInfo[i], result, result.size() ); + if ( result.size() == 39 ) + break; + } + break; + } + case 30: + { + for ( int i = 0; i < 16; i++ ) + { + byte tmp[113]; + memcpy( (void*)tmp, certInfo[i], 113 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step30 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime30: " << e.what(); + throw std::runtime_error( "step30 runtime error" ); + } + + if ( result.isEmpty() || result.size() != 14 ) + throw std::runtime_error( "step30" ); + } + break; + } + case 31: + { + card->selectEF( 0xDDCE ); + break; + } + case 32: + { + for ( int i = 16; i < 32; i++ ) + { + byte tmp[113]; + memcpy( (void*)tmp, certInfo[i], 113 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step32 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime32: " << e.what(); + throw std::runtime_error( "step32 runtime error" ); + } + + if ( result.isEmpty() || result.size() != 14 ) + throw std::runtime_error( "step32" ); + } + if ( !generateKeys ) + step = 36;//done + break; + } + case 33: + { + card->selectEF( 0x0033 ); + break; + } + case 34: + { + byte tmp[38]; + memcpy( (void*)tmp, certInfo[32], 38 ); + try { + ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); + result = QByteArray( (char*)&r[0], r.size() ); + } catch( CardError e ) { + throw std::runtime_error( "step34 card error: " + e.desc ); + } catch( std::runtime_error e ) { + qDebug() << "runtime34: " << e.what(); + throw std::runtime_error( "step34 runtime error" ); + } + + if ( result.isEmpty() || result.size() != 14 ) + throw std::runtime_error( "step34" ); + + result = queryServer( s, result ).remove( 0, 16 ); + break; + } + default: + result = queryServer( s, result ); + } + return result; +} + +QByteArray CertUpdate::queryServer( int s, QByteArray result ) +{ + if ( !checkConnection() ) + throwError( tr("Check internet connection").toUtf8() ); + + const char serviceCode[] = { 0x31, 0x00 }; + QByteArray packet; + + serverStep++; + + switch( s ) + { + case 0: + { + std::string id = card->readDocumentID(); + memcpy( (void*)documentNumber, id.c_str(), id.size() ); + + char query[HEADER+44]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 44 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[28], card->readCardID().c_str(), 11 ); + memcpy( (void*)&query[39], documentNumber, 8 ); + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 6: + { + char query[HEADER+39]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 39 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], personCode, 11 ); + const char tmp[] = { generateKeys ? 0x01 : 0x00 }; + memcpy( (void*)&query[47], tmp, 1 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 9: + { + char query[HEADER+33]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 33 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 33 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 16: + { + char query[HEADER+36]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 36 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 36 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 17: + { + char query[HEADER+48]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 48 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 48 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 20: + case 24: + { + char query[HEADER+14]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 14 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 14 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 21: + case 25: + { + char query[HEADER+147]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 147 ), 3 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 147 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 29: + { + char query[HEADER+2]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 2 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 2 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + case 34: + { + char query[HEADER+14]; + memset( query, 0, sizeof(query)); + memcpy( (void*)query, serviceCode, 2 ); + memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); + memcpy( (void*)&query[4], QByteArray::number( 14 ), 2 ); + memcpy( (void*)&query[12], documentNumber, 8 ); + memcpy( (void*)&query[20], challenge, 8 ); + memcpy( (void*)&query[28], result, 14 ); + + packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); + break; + } + default: + return QByteArray(); + } + qDebug() << "step " << s << " serverStep: " << serverStep << " send: " << packet.toUpper(); + QByteArray data = "POST "; + data += updateUrl.path(); + data += " HTTP/1.1\r\nHost: "; + data += updateUrl.host(); + data += "\r\nContent-Type: text/plain\r\nContent-Length: " + QByteArray::number(packet.size()) + "\r\nConnection: close\r\n\r\n" + packet.toUpper() + "\r\n"; + sock->write( data ); + if ( !sock->waitForReadyRead( 60000 ) ) + { + qDebug() << sock->errorString(); + return result; + } + result = sock->readAll(); + if ( result.contains( "\r\n\r\n" ) ) + result = result.remove( 0, result.indexOf( "\r\n\r\n" ) + 4 ); + qDebug() << "step " << s << " serverStep: " << serverStep << " receive: " << result; + sock->disconnectFromHost(); + + //veakoodide kontroll + QByteArray hex = QByteArray::fromHex( result ); + if ( hex.size() > 4 ) + { + switch( hex.at(4) ) + { + case 0x01: throw std::runtime_error( tr( "Server sai vale arvu baite, samm: %1" ).arg( s ).toStdString() ); + case 0x02: + case 0x03: + case 0x07: + case 0x08: throw std::runtime_error( tr( "Serveri ts tekkisid vead, samm: %1" ).arg( s ).toStdString() ); + case 0x04: throw std::runtime_error( tr( "Kaardi vastuse parsimisel tekkis viga, samm: %1" ).arg( s ).toStdString() ); + case 0x05: throw std::runtime_error( tr( "Sertifitseerimiskeskus ei vasta, samm: %1" ).arg( s ).toStdString() ); + } + } + return result; +} diff -Nru qesteidutil-0.3.1/src/CertUpdate.h qesteidutil-0.3.1/src/CertUpdate.h --- qesteidutil-0.3.1/src/CertUpdate.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/CertUpdate.h 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include +#include +#include + +#include "jscardmanager.h" +#include + +class CertUpdate: public QObject +{ + Q_OBJECT + +public: + + CertUpdate( int reader, QObject *parent = 0 ); + ~CertUpdate(); + + bool checkUpdateAllowed(); + void startUpdate(); + +private: + void throwError( const QString &msg ); + + QString m_pin; + EstEidCard *card; + PCSCManager *cardMgr; + QTcpSocket *sock; + char challenge[8]; + char personCode[11], documentNumber[8], tmpResult[36], certInfo[33][114]; + int step, serverStep, authKey, signKey; + bool generateKeys; + QByteArray step10; + + bool checkConnection() const; + QByteArray runStep( int step, QByteArray result = "" ); + QByteArray queryServer( int step, QByteArray result ); + JsCertData *m_authCert; + QUrl updateUrl; +}; diff -Nru qesteidutil-0.3.1/src/DiagnosticsDialog.cpp qesteidutil-0.3.1/src/DiagnosticsDialog.cpp --- qesteidutil-0.3.1/src/DiagnosticsDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/DiagnosticsDialog.cpp 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,288 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "DiagnosticsDialog.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#if defined(Q_OS_WIN32) +#include +#elif defined(Q_OS_LINUX) +#include +#elif defined(Q_OS_MAC) +#include +#include +#endif + +DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) +: QDialog( parent ) +{ + setupUi( this ); + setAttribute( Qt::WA_DeleteOnClose, true ); + + QString info; + QTextStream s( &info ); + + s << "" << tr("ID-card utility version:") << " "; + s << QCoreApplication::applicationVersion() << "
"; + + s << "" << tr("OS:") << " "; +#if defined(Q_OS_WIN32) + OSVERSIONINFOEX osvi; + ZeroMemory( &osvi, sizeof( OSVERSIONINFOEX ) ); + osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFOEX ); + if( !GetVersionEx( (OSVERSIONINFO *) &osvi) ) + { + switch( QSysInfo::WindowsVersion ) + { + case QSysInfo::WV_2000: s << "Windows 2000"; break; + case QSysInfo::WV_XP: s << "Windows XP"; break; + case QSysInfo::WV_2003: s << "Windows 2003"; break; + case QSysInfo::WV_VISTA: s << "Windows Vista"; break; + case QSysInfo::WV_WINDOWS7: s << "Windows 7"; break; + default: s << "Unknown version (" << QSysInfo::WindowsVersion << ")"; + } + } else { + switch( osvi.dwMajorVersion ) + { + case 5: + { + switch( osvi.dwMinorVersion ) + { + case 0: + s << "Windows 2000 "; + s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Professional" : "Server" ); + break; + case 1: + s << "Windows XP "; + s << ( osvi.wSuiteMask & VER_SUITE_PERSONAL ? "Home" : "Professional" ); + break; + case 2: + if ( GetSystemMetrics( SM_SERVERR2 ) ) + s << "Windows Server 2003 R2"; + else if ( osvi.wProductType == VER_NT_WORKSTATION ) + s << "Windows XP Professional"; + else + s << "Windows Server 2003"; + break; + } + break; + } + case 6: + { + switch( osvi.dwMinorVersion ) + { + case 0: s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008" ); break; + case 1: s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2" ); break; + } + break; + } + default: s << "Unknown version (" << QSysInfo::WindowsVersion << ")"; + } + } +#elif defined(Q_OS_LINUX) + QProcess p; + p.start( "lsb_release", QStringList() << "-s" << "-d" ); + p.waitForReadyRead(); + s << p.readAll(); +#elif defined(Q_OS_MAC) + SInt32 major, minor, bugfix; + + if(Gestalt(gestaltSystemVersionMajor, &major) == noErr && Gestalt(gestaltSystemVersionMinor, &minor) == noErr && Gestalt(gestaltSystemVersionBugFix, &bugfix) == noErr) { + s << "Mac OS " << major << "." << minor << "." << bugfix; + } else { + s << "Mac OS 10.3"; + } +#endif + +#if defined(Q_OS_WIN) + QString bits = "32"; + typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + LPFN_ISWOW64PROCESS fnIsWow64Process; + BOOL bIsWow64 = false; + //check if kernel32 supports this function + fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress( GetModuleHandle(TEXT("kernel32")), "IsWow64Process" ); + if ( fnIsWow64Process != NULL ) + { + if ( fnIsWow64Process( GetCurrentProcess(), &bIsWow64 ) ) + if ( bIsWow64 ) + bits = "64"; + } else { + SYSTEM_INFO sysInfo; + GetSystemInfo( &sysInfo ); + if ( sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ) + bits = "64"; + } + s << " (" << bits << ")

"; +#else + s << " (" << QSysInfo::WordSize << ")

"; +#endif + + s << "" << tr("Library paths:") << " "; + s << QCoreApplication::libraryPaths().join( ";" ) << "
"; + + s << "" << tr("Libraries") << "
"; +#if defined(Q_OS_WIN32) + s << getLibVersion( "advapi32") << "
"; + s << getLibVersion( "libeay32" ) << "
"; + s << getLibVersion( "ssleay32" ) << "
"; +#elif defined(Q_OS_MAC) + s << getLibVersion( "PCSC" ) << "
"; +#elif defined(Q_OS_LINUX) + s << getLibVersion( "pcsclite" ) << "
"; + s << getLibVersion( "ssl" ) << "
"; + s << getLibVersion( "crypto" ) << "
"; +#endif + s << getLibVersion( "opensc-pkcs11" ) << "
"; + s << "QT (" << qVersion() << ")
"; + s << "
"; + +#if defined(Q_OS_WIN32) + s << "" << tr("Smart Card service status: ") << ""; +#else + s << "" << tr("PCSC service status: ") << ""; +#endif + s << " " << (isPCSCRunning() ? tr("Running") : tr("Not running")); + s << "

"; + + s << "" << tr("Card readers") << "
"; + s << getReaderInfo(); + s << "
"; + + diagnosticsText->setHtml( info ); +} + +QString DiagnosticsDialog::getLibVersion( const QString &lib ) const +{ + try + { + return QString( "%1 (%2)" ).arg( lib ) + .arg( QString::fromStdString( DynamicLibrary( lib.toLatin1() ).getVersionStr() ) ); + } + catch( const std::runtime_error & ) + { return tr("%1 - failed to get version info").arg( lib ); } +} + +QString DiagnosticsDialog::getReaderInfo() const +{ + QString d; + QTextStream s( &d ); + + QHash readers; + PCSCManager *m = 0; + QString reader; + try { + m = new PCSCManager(); + int readersCount = m->getReaderCount( true ); + for( int i = 0; i < readersCount; i++ ) + { + reader = QString::fromStdString( m->getReaderName( i ) ); + if ( !QString::fromStdString( m->getReaderState( i ) ).contains( "EMPTY" ) ) + { + EstEidCard card( *m ); + card.connect( i ); + readers[reader] = tr( "ID - %1" ).arg( QString::fromStdString( card.readCardID() ) ); + } + else + readers[reader] = ""; + } + } catch( const std::runtime_error &e ) { + readers[reader] = tr("Error reading card data:") + e.what(); + } + delete m; + + for( QHash::const_iterator i = readers.constBegin(); + i != readers.constEnd(); ++i ) + { + s << "* " << i.key(); + if( !i.value().isEmpty() ) + s << "

" << i.value() << "

"; + else + s << "
"; + } + + return d; +} + +#if defined(Q_OS_WIN32) +bool DiagnosticsDialog::isPCSCRunning() const +{ + bool result = false; + SC_HANDLE h = OpenSCManager( NULL, NULL, SC_MANAGER_CONNECT ); + if( h ) + { + SC_HANDLE s = OpenService( h, "SCardSvr", SERVICE_QUERY_STATUS ); + if( s ) + { + SERVICE_STATUS status; + QueryServiceStatus( s, &status ); + result = (status.dwCurrentState == SERVICE_RUNNING); + CloseServiceHandle( s ); + } + CloseServiceHandle( h ); + } + return result; +} +#elif defined(Q_OS_LINUX) +bool DiagnosticsDialog::isPCSCRunning() const +{ + QProcess p; + p.start( "pidof", QStringList() << "pcscd" ); + p.waitForFinished(); + return !p.readAll().trimmed().isEmpty(); +} +#elif defined(Q_OS_MAC) +bool DiagnosticsDialog::isPCSCRunning() const +{ + QProcess p; + p.start( "sh -c \"ps ax | grep -v grep | grep pcscd\"" ); + p.waitForFinished(); + return !p.readAll().trimmed().isEmpty(); +} +#else +bool DiagnosticsDialog::isPCSCRunning() const { return true; } +#endif + +void DiagnosticsDialog::save() +{ + QString filename = QFileDialog::getSaveFileName( this, tr("Save as"), QString( "%1%2qesteidutil_diagnostics.txt" ) + .arg( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) ).arg( QDir::separator() ), + tr("Text files (*.txt)") ); + if( filename.isEmpty() ) + return; + QFile f( filename ); + if( f.open( QIODevice::WriteOnly ) ) + { + QTextStream( &f ) << diagnosticsText->toPlainText(); + f.close(); + } + else + QMessageBox::warning( this, tr("Error occurred"), tr("Failed write to file!") ); +} diff -Nru qesteidutil-0.3.1/src/DiagnosticsDialog.h qesteidutil-0.3.1/src/DiagnosticsDialog.h --- qesteidutil-0.3.1/src/DiagnosticsDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/DiagnosticsDialog.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "ui_DiagnosticsDialog.h" + +class DiagnosticsDialog: public QDialog, private Ui::DiagnosticsDialog +{ + Q_OBJECT +public: + DiagnosticsDialog( QWidget *parent = 0 ); + +private slots: + void save(); + +private: + bool isPCSCRunning() const; + QString getLibVersion( const QString &lib ) const; + QString getReaderInfo() const; +}; Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/button.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/button.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/buttonSelected.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/buttonSelected.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/digidoc_icon_16x16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/digidoc_icon_16x16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/digidoc_icon_32x32.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/digidoc_icon_32x32.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/flag_english.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/flag_english.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/flag_estonian.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/flag_estonian.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/flag_russian.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/flag_russian.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/id_icon_16x16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/id_icon_16x16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/id_icon_32x32.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/id_icon_32x32.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/id_icon_48x48.ico and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/id_icon_48x48.ico differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/id_icon_48x48.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/id_icon_48x48.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/id_icon_big.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/id_icon_big.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/linegray.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/linegray.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/logo.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/logotext.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/logotext.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/src/html/images/topLogo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/src/html/images/topLogo.png differ diff -Nru qesteidutil-0.3.1/src/html/index.html qesteidutil-0.3.1/src/html/index.html --- qesteidutil-0.3.1/src/html/index.html 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/html/index.html 2011-10-12 18:12:02.000000000 +0000 @@ -0,0 +1,455 @@ + + + + + + + + +
+
+ +
+
    +
  • +
  • +
  • +
+
+ +
+ +
+
+
 
+ +
 
+
 
+
+
    +
  • :
  • + +
  • :
  • +
  • :
  • +
  • :
  • +
  • :
  • +
+
+
+ +
+
+ +
+
+
    +
  • +
  • +
  • +
  • +
+
+
+
    +
  • +
  • +
  • +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + diff -Nru qesteidutil-0.3.1/src/html/lang.js qesteidutil-0.3.1/src/html/lang.js --- qesteidutil-0.3.1/src/html/lang.js 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/html/lang.js 2011-05-26 08:56:30.000000000 +0000 @@ -0,0 +1,261 @@ +var defaultLanguage = "et"; +var language = defaultLanguage; + +var helpUrl_et = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp"; +var helpUrl_en = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp?wl=en"; +var helpUrl_ru = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp?wl=ru"; + +//code: (est, eng, rus) +var htmlStrings = { + "Active": new tr( "sertifikaadid on aktiivsed ja Mobiil-ID kasutamine on võimalik.", "certificates are active and Mobile-ID is usable.", "сертификаты активны, и использование Modiil-ID возможно." ), + "Not Active": new tr( "sertifikaadid on aktiveerimata, Mobiil-ID kasutamiseks on vajalik sertifikaatide aktiveerimine.", "certificates are inactive, to use Mobile-ID certificates must be activated.", "сертификаты не активированы, для использования Mobiil-ID требуется активация сертификатов." ), + "Suspended": new tr( "sertifikaadid on peatatud, Mobiil-ID kasutamiseks on vajalik peatatuse lõpetamine.", "certificates are suspended. To use Mobile-Id these must be active.", "сертификаты приостановлены, для использования Mobiil-ID следует их возобновить." ), + "Revoked": new tr( "sertifikaadid on tunnistatud kehtetuks. Mobiil-ID kasutamiseks on vajalik hankida operaatorilt uus Mobiil-ID SIM kaart.", "certificates are revoked. To use Mobile-ID, a new SIM card must be requested from service provider.", "сертификаты признаны недействительными. Для использования Mobiil-ID следует взять новую Mobiil-ID SIM карту у оператора." ), + "Unknown": new tr( "sertifikaadi olek teadmata.", "certificates status is unknown", "состояние сертификата неизвестно." ), + "Expired": new tr( "sertifikaadid on aegunud. Vajalik on operaatorilt uue SIM kaardi hankimine.", "certificates are expired. New SIM card has to be requested from Service provider.", "сертификаты устарели. У оператора следует взять новую SIM карту." ), + "mobileNoCert": new tr( "Kasutajal puuduvad Mobiil-ID sertifikaadid!", "User has no Mobile-ID certificates.", "У пользователя отсутствуют Mobiil-ID сертификаты!" ), + "mobileNotActive": new tr( "Kasutaja Mobiil-id sertifikaadid ei ole aktiivsed, info kuvamine ei ole võimalik!", "Mobile-id not active. Not possible to display info.", "Пользовательские сертификаты ID-карты неактивны, получение информации невозможно!" ), + "mobileInternalError": new tr( "Teenuse sisemine viga!", "Service internal error!", "Внутренняя ошибка услуги!" ), + "mobileInterfaceNotReady": new tr( "Liides ei ole veel töökorras!", "Mobile interface not ready!", "Интерфейс ещё не работает!" ), + "noIDCert": new tr( "Server ei suutnud lugeda või valideerida ID-kaardi sertifikaati!", "Server could not read or validate ID card certificate!", "Сервер не смог прочитать или распознать сертификат ID карты!"), + + "linkDiagnostics": new tr( "Diagnostika", "Diagnostics", "Диагностика" ), + "linkSettings": new tr( "Seaded", "Settings", "Настройки" ), + "linkHelp": new tr( "Abi", "Help", "Помощь" ), + + "personName": new tr( "Nimi", "Name", "Имя" ), + "personCode": new tr( "Isikukood", "Personal Code", "Личный номер" ), + "regcode": new tr( "Registrikood", "Reg nr", "Регистрационный номер" ), + "personBirth": new tr( "Sündinud", "Birth", "День рождения" ), + "personCitizen": new tr( "Kodakondsus", "Citizenship", "Гражданство" ), + "personEmail": new tr( "E-post", "E-mail", "Эл. почта" ), + + "labelCardInReaderID": new tr( "Lugejas on ID-kaart", "Card in reader", "Карта в считывателе" ), + "labelThisIs": new tr( "See on", "This is", "Это" ), + "labelIsValid": new tr( "kehtiv", "valid", "действующий" ), + "labelIsInValid": new tr( "kehtetu", "expired", "недействителен" ), + "labelDocument": new tr( "dokument", "document", "документ" ), + "labelCardValidTill": new tr( "Kaart on kehtiv kuni ", "Card is valid till ", "Карта действительна до " ), + "labelCardGetNew": new tr( "Juhised uue ID-kaardi taotlemiseks leiad siit", "Instructions how to get a new ID card you can find here", "Инструкции по ходатайству новой ID карты находятся здесь" ), + + "labelAuthCert": new tr( "Isikutuvastamise sertifikaat", "Authentication certificate", "Идент. сертификат" ), + "labelSignCert": new tr( "Allkirjastamise sertifikaat", "Signature certificate", "Сертификат подписи" ), + "labelCertIs": new tr( "Sertifikaat on", "Certificate is", "Сертификат" ), + "labelCertIsValidTill": new tr( "Sertifikaat kehtib kuni", "Certificate is valid till", "Сертификат действителен до" ), + "labelCertWillExpire": new tr( "Sertifikaat aegub %d päeva pärast", "Certificate will expire in %d days", "Сертификат истекает через %d дня" ), + "labelAuthUsed": new tr( "Sertifikaati on kasutatud isikutuvastamiseks", "Authentication certificate has been used", "Сертификат использован для аутентикации" ), + "labelSignUsed": new tr( "Sertifikaati on kasutatud allkirjastamiseks", "Signature certificate has been used", "Сертификат использован для подписи" ), + "labelTimes": new tr( "korda", "times", "раз" ), + + "labelCertBlocked": new tr( "Sertifikaat on blokeeritud.", "Certificate is blocked.", "Сертификат заблокирован." ), + "labelAuthKeyBlocked": new tr( "Selle ID-kaardiga ei ole hetkel võimalik autentida, kuna PIN1 koodi on sisestatud 3 korda valesti.", "It is not possible to authenticate with this ID-card, because PIN1 was inserted 3 times incorrectly.", "С данной ID-картой невозможно идентифицироваться, т.к. PIN1 был введён 3 раза неверно." ), + "labelSignKeyBlocked": new tr( "Selle ID-kaardiga ei ole hetkel võimalik anda digitaalallkirja, kuna PIN2 koodi on sisestatud 3 korda valesti.", "It is not possible to digitally sign with this ID-card, because PIN2 was inserted 3 times incorrectly.", "С данной ID-картой невозможно создать цифровую подпись, т.к. PIN2 был введён 3 раза неверно." ), + "labelAuthCertBlocked": new tr( "Isikutuvastamise sertifikaat on blokeeritud.", "Authentication certificate is blocked." , "Идентификационный сертификат заблокирован." ), + "labelSignCertBlocked": new tr( "Allkirjastamise sertifikaat on blokeeritud.", "Signing certificate is blocked.", "Сертификат подписи заблокирован." ), + "labelCertUnblock": new tr( "Sertfikaadi blokeeringu tühistamiseks sisesta kaardi PUK kood.", "To unblock certificate you have to enter PUK code.", "Для разблокировки сертификата введите PUK код." ), + "labelCertUnblock1": new tr( "PUK koodi leiad ID-kaardi koodiümbrikus, kui sa pole seda vahepeal muutnud.", "You can find your PUK code inside ID-card codes envelope.", "PUK код находится в конверте с кодами, который выдаётся при получении ID-карты или смене сертификатов." ), + "labelCertUnblock2": new tr( "Kui sa ei tea oma ID-kaardi PUK koodi, külasta klienditeeninduspunkti, kust saad uue koodiümbriku.", "If you do not know PUK code for your ID-card, please visit service center where you can get the new codes.", "Если вы не знаете PUK код своей ID-карты, посетите центр обслуживания, где вы сможете получить конверт с кодами." ), + + "labelChangingPIN1": new tr( "PIN1 koodi vahetus", "Change PIN1 code", "Замена PIN1 кода" ), + "labelChangingPIN11": new tr( "PIN1 koodi kasutatakse isikutuvastamise sertifikaadile juurdepääsemiseks.", "PIN1 code is used for accessing identification certificates.", "PIN1 код, используемый для доступа к сертификатам индентификации личности." ), + "labelChangingPIN12": new tr( "Kui sisestad PIN1 koodi kolm korda valesti, siis isikutuvastamise sertifikaat blokeeritakse ning ID-kaarti pole võimalik isikutuvastamiseks kasutada enne blokeeringu tühistamist PUK koodi abil.", "If PIN1 is inserted 3 times inccorectly, then identification certificate will be blocked and it will be impossible to use ID-card to verify identification, until it is unblocked via PUK code.", "Если PIN1 введён 3 раза неверно, тогда блокируется идентификационный сертификат и использовать ID- карту невозможно, пока блокировка не снята PUK кодом." ), + "labelChangingPIN13": new tr( "Kui olete unustanud PIN1 koodi, kuid teate PUK koodi, siis siin saate määrata uue PIN1 koodi.", "If you have forgotten PIN1, but know PUK, then here you can enter new PIN1.", "Если вы забыли PIN1, при помощи PUK кода можно ввести новый PIN1 код." ), + "linkPIN1withPUK": new tr( "Muuda PIN1 kood PUK koodi abil", "Change PIN1 using PUK code", "Изменить PIN1 код с помощью PUK кода" ), + + "labelChangingPIN2": new tr( "PIN2 koodi vahetus", "Change PIN2 code", "Смена кода PIN2" ), + "labelChangingPIN21": new tr( "PIN2 koodi kasutatakse digitaalallkirja andmiseks.", "PIN2 code is used to digitally sign documents.", "PIN2 код, что используется для дигитальной подписи." ), + "labelChangingPIN22": new tr( "Kui sisestad PIN2 koodi kolm korda valesti, siis allkirjastamise sertifikaat blokeeritakse ning ID-kaarti pole võimalik allkirjastamiseks kasutada enne blokeeringu tühistamist PUK koodi abil.", "If PIN2 is inserted 3 times inccorectly, then signing certificate will be blocked and it will be impossible to use ID-card for digital signing, until it is unblocked via PUK code.", "Если PIN2 введён 3 раза неверно, тогда блокируется сертификат цифровой подписи и использовать ID- карту для цифровой подписи невозможно, пока блокировка не снята PUK кодом." ), + "labelChangingPIN23": new tr( "Kui olete unustanud PIN2 koodi, kuid teate PUK koodi, siis siin saate määrata uue PIN2 koodi.", "If you have forgotten PIN2, but know PUK, then here you can enter new PIN2.", "Если забыли PIN2 код, но знаете PUK код, тогда можете создать новый PIN2 код." ), + "linkPIN2withPUK": new tr( "Muuda PIN2 kood PUK koodi abil", "Change PIN2 using PUK code", "Изменить PIN2 код с помощью PUK кода" ), + + "labelChangingPUK": new tr( "PUK koodi vahetus", "Change PUK code", "Смена PUK кода" ), + "labelChangingPUK2": new tr( "Kui peale vahetamist PUK kood läheb meelest ära ja sertifikaat jääb blokeerituks kolme vale PIN1 või PIN2 sisetamise järel, siis ainus võimalus ID-kaart jälle tööle saada on pöörduda klienditeeninduspunkti poole.", "If you forget PUK code or certificates remain unblocked, then it is needed to turn to service provider to get your ID-card working again.", "Если после смены PUK код забывается и сетрификат блокируется из-за неверно введённых PIN1 или PIN2, то единственной возможностью восстановить работоспособность ID- карты, это обратиться в бюро обслуживания." ), + + "labelInputPUK": new tr( "PUK koodi abil saab tühistada sertifikaadi blokeeringu, kui PIN1 või PIN2 koodi on 3 korda järjest valesti sisestatud.", "PUK code ise used for unblocking certificates, when PIN1 or PIN2 has been entered 3 times incorrectly.", "PUK код - это код, разблокирующий заблокированные сертификаты, если код PIN1 или PIN2 был введён неверно 3 раза подряд." ), + "labelInputPUK2": new tr( "PUK kood on kirjas koodiümbrikus, mida väljastatakse koos ID-kaardiga või sertifikaatide vahetamisel.", "PUK code is written in the envelpole, that was given with the ID-card or when certificates were changed.", "PUK код находится в конверте с кодами, который выдаётся при получении ID-карты или смене сертификатов." ), + "labelPUKBlocked": new tr( "PUK kood on blokeeritud!
Uue PUK koodi saamiseks, külasta klienditeeninduspunkti, kust saad koodiümbriku uute koodidega. Lisainfo", "PUK code is blocked!
For getting new PUK code for your ID-card, please visit service center where you can get the new codes. Additional information", "PUK код заблокирован!
Для получения нового PUK кода для своей ID-карты, посетите центр обслуживания, где вы сможете получить конверт с кодами. Дополнительная информация" ), + + "inputCert": new tr( "Sertifikaadid", "Certificates", "Сертификаты" ), + "inputEmail": new tr( "@eesti.ee e-post", "@eesti.ee e-mail", "@eesti.ee" ), + "inputActivateEmail": new tr( "Aktiveeri @eesti.ee e-post", "Activate @eesti.ee email", "Активируй @eesti.ee эл. почту" ), + "inputCheckEmails": new tr( "Kontrolli @eesti.ee e-posti seadistust", "Check your @eesti.ee email settings", "Проверь настройки эл. почты @eesti.ee" ), + "emailCheckID": new tr( "E-posti seadistamine on lubatud ainult ID-kaardiga.", "It is possible to change email settings only with an ID-card.", "Настройка эл. почты возможна только с ID-картой." ), + "inputMobile": new tr( "Mobiil-ID", "Mobile-ID", "Mobiil-ID" ), + "inputActivateMobile": new tr( "Aktiveeri Mobiil-ID teenus", "Activate Mobile-ID", "Активируй услугу Mobiil-ID" ), + "inputCheckMobile": new tr( "Kontrolli Mobiil-ID staatust", "Check Mobile-ID status", "Проверь статус Mobiil-ID" ), + "inputPUK": new tr( "PUK kood", "PUK code", "PUK код" ), + + "inputChange": new tr( "Muuda", "Change", "Изменить" ), + "inputCancel": new tr( "Tühista", "Cancel", "Отмена" ), + "inputChangePIN1": new tr( "Muuda PIN1", "Change PIN1", "Поменять PIN1" ), + "inputChangePIN2": new tr( "Muuda PIN2", "Change PIN2", "Поменять PIN2" ), + "inputChangePUK": new tr( "Muuda PUK", "Change PUK", "Поменять PUK" ), + "inputCertDetails": new tr( "Vaata üksikasju", "View details", "Просмотреть детали" ), + "inputUpdateCert": new tr( "Uuenda sertifikaat", "Update certificate", "Обнови сертификат" ), + "inputUnblock": new tr ( "Tühista blokeering", "Revoke blocking", "Отменить блокировку" ), + + "labelCurrentPIN1": new tr( "Kehtiv PIN1 kood", "Current PIN1 code", "Действующий PIN1 код" ), + "labelNewPIN1": new tr( "Uus PIN1 kood", "New PIN1 code", "Новый PIN1 код" ), + "labelNewPIN12": new tr( "Uus PIN1 kood uuesti", "Repeat new PIN1 code", "Новый PIN1 код заново" ), + "labelCurrentPIN2": new tr( "Kehtiv PIN2 kood", "Current PIN2 code", "Действующий PIN2 код" ), + "labelNewPIN2": new tr( "Uus PIN2 kood", "New PIN2 code", "Новый PIN2 код" ), + "labelNewPIN22": new tr( "Uus PIN2 kood uuesti", "Repeat new PIN2 code", "Новый PIN2 код заново" ), + "labelCurrentPUK": new tr( "Kehtiv PUK kood", "Current PUK code", "Действующий PUK код" ), + "labelNewPUK": new tr( "Uus PUK kood", "New PUK code", "Новый PUK код" ), + "labelNewPUK2": new tr( "Uus PUK kood uuesti", "Repeat new PUK code", "Новый PUK код заново" ), + "labelPUK": new tr( "PUK kood", "PUK code", "PUK код" ), + + "labelEmailAddress": new tr( "E-posti aadress, kuhu suunatakse sinu @eesti.ee kirjad", "Email addres where your @eesti.ee emails will be forwarded", "Адрес эл. почты, куда перенаправляют Вашу почту с @eesti.ee" ), + "labelEmailUrl": new tr( "Täiuslikuma ametliku e-posti suunamise häälestamisvahendi leiad portaalist", "For more detailed official email address forwarding, please visit", "Более подробную информацию по настройке пересылки электронной почты найдёте на портале eesti.ee" ), + + "labelMobile": new tr( "Mobiil-ID on võimalus kasutada isikutuvastamiseks ja digitaalallkirja andmiseks ID-kaardi asemel mobiiltelefoni.", "Mobile-id is possibility to use mobile phone instead of ID-card for identification and digital signing.", "Mobiil-ID - это возможность идентифицировать личность и ставить цифровую подпись при помощи мобильного телефона, наравне с ID-картой." ), + "labelMobile2": new tr( "Mobiil-ID kasutamiseks on vajalik uus SIM-kaart, mille sa saad endale mobiilsideoperaatori käest. Kui selline kaart on sul juba olemas, tuleb teenus aktiveerida.", "To use Mobile-id it is needed to use a SIM card that supports this feature. If such a SIM card is already purchased, then it has to be activated.", "Для пользования Mobiil-ID вам понадобится SIM-карта с поддержкой этой технологии. Новую карту можно получить у вашего мобильного оператора. Если такая карта уже установлена, следует активировать услугу." ), + "labelMobileReadMore": new tr( "Loe täpsemalt id.ee kodulehelt", "More info from id.ee", "Подробности - на портале id.ee" ), + "mobileNumber": new tr( "Mobiili number", "Mobile number", "Номер моб. телефона" ), + "mobileOperator": new tr( "Mobiili operaator", "Mobile operator", "Оператор моб. телефона" ), + "mobileStatus": new tr( "Staatus", "Mobile status", "Статус" ), + + "errorFound": new tr( "Tekkis viga: ", "Error occurred: ", "Возникла ошибка:" ), + "loadEmail": new tr( "Laen e-posti seadeid", "Loading e-mail settings", "Загружаю настройки эл. почты" ), + "activatingEmail": new tr( "Aktiveerin e-posti seadeid", "Activating e-mail settings", "настройки эл. почты" ), + "forwardFailed": new tr( "E-posti suunamise aktiveerimine ebaõnnestus.", "Failed activating e-mail forwards.", "Активация перенаправления с эл. почты провалилась." ), + "loadFailed": new tr( "E-posti aadresside laadimine ebaõnnestus.", "Failed loading e-mail settings.", "Активация перенаправления с эл. почты провалилась" ), + "emailEnter": new tr( "E-posti aadress sisestamata või vigane!", "E-mail address missing or invalid!", "Введите адрес эл. почты!" ), + "loadPicture": new tr( "Lae pilt", "Load picture", "Загрузить фотографию" ), + "savePicture": new tr( "salvesta", "save", "сохранить" ), + "savePicFailed": new tr( "Pildi salvestamine ebaõnnestus!", "Saving picture failed!", "Сохранение картинки неуспешно!" ), + "loadPic": new tr( "Laen pilti", "Loading picture", "Загружаю фотографию" ), + "loadPicFailed": new tr( "Pildi laadimine ebaõnnestus!", "Loading picture failed!", "Загрузка картинки неуспешна!" ), + "loadPicFailed2": new tr( "Pildi laadimine ebaõnnestus - tundmatu pildiformaat!", "Loading picture failed - unknown picture format!", "Загрузка картинки неуспешна- неизвестный формат!" ), + "loadPicFailed3": new tr( "Pildi laadimine ebaõnnestus - viga salvestamisel!", "Loading picture failed - error saving file!", "Загрузка картинки неуспешна- ошибка при сохранении!" ), + "loadCardData": new tr( "Loen andmeid", "Reading data", "Данные считываются" ), + "updateCert": new tr( "Sertifikaatide uuendamine...", "Updating certificates", "Обновление сертификатов" ), + "updateCertOk": new tr( "Sertifikaatide uuendamine õnnestus", "Updating certificates successful", "Успешное обновление сертификатов" ) +}; + +//codes from eesti.ee +var eestiStrings = { + "0": new tr( "Toiming õnnestus", "Success", "Выполнение успешно!" ), + "1": new tr( "ID-kaart pole väljastatud riiklikult tunnustatud sertifitseerija poolt.", "ID-card has not been published by locally recognized verification provider.", "ID- карта не была выдана разрешённым сертифицирующим органом." ), + "2": new tr( "Sisestati vale PIN kood, katkestati PIN koodi sisestamine, tekkisid probleemid sertifikaatidega või puudub ID-kaardi tugi brauseris.","Wrong PIN was entered or cancelled, there was a problem with certificates or browser does not support ID-card.", "Ввели неверный PIN код, прервали введение PIN кода, возникли проблемы с сертификатами или отсутствует поддержка ID- карты в браузере." ), + "3": new tr( "ID-kaardi sertifikaat ei kehti.", "ID-card certificate is not valid.", "Сертификат ID- карты недействителен." ), + "4": new tr( "Sisemine on lubatud ainult Eesti isikukoodiga.", "Entrance is permitted only with Estonian personal code.", "Вход разрешён только с эстонским личным кодом." ), + "10": new tr( "Tundmatu viga.", "Unknown error", "Неизвестная ошибка." ), + "11": new tr( "KMA päringu tegemisel tekkis viga.", "There was an error with request to KMA." ,"В запросе КМА возникла ошибка." ), + "12": new tr( "Äriregistri päringu tegemisel tekkis viga.", "There was an error with request to Äriregister.", "В запросе к Äriregister возникла ошибка." ), + "20": new tr( "Ühtegi ametliku e-posti suunamist ei leitud.", "No official email forwarding adresses was found", "Не было найдено ни одной официальной пересылки эл. почты." ), + "21": new tr( "Teie e-posti konto on suletud. Avamiseks saatke palun e-kiri aadressil toimetaja@eesti.ee või helistage telefonil 663 0215.", "Your email account has been blocked. To open it, please send an e-mail to toimetaja@eesti.ee or call 663 0215.", "Ваша учётная запись эл. почты закрыта. Для открытия пошлите письмо на toimetaja@eesti.ee или позвоните по телефону 663 0215." ), + "22": new tr( "Vigane e-posti aadress.", "Invalid e-mail address", "Неверный адрес эл. почты." ), + "23": new tr( "Suunamine on salvestatud, ning sinule on saadetud kiri edasisuunamisaadressi aktiveerimisvõtmega. Suunamine on kasutatav ainult pärast aktiveerimisvõtme sisestamist.", "Forwarding is activated and you have been sent an email with activation key. Forwarding will be activated only after confirming the key.", "Переадресация сохранена и Вам послано письмо с ключом активации. Переадресация активна только после введения ключа." ) +}; + +var eidStrings = { + "noCard": new tr( "Ei leitud ühtegi ID-kaarti", "No card found", "Не найдена ID-карта" ), + "noReaders": new tr( "Ühtegi kiipkaardi lugejat pole ühendatud", "No readers found", "Считывающее устройство не обнаружено" ), + "certValid": new tr( "kehtiv ja kasutatav", "valid and applicable", "действителен и пригоден" ), + "certBlocked": new tr( "kehtetu", "expired", "недействительно" ), + "validBlocked": new tr( "kehtiv kuid blokeeritud", "valid but blocked", "действительно, но заблокировано" ), + "invalidBlocked": new tr( "kehtetu ja blokeeritud", "invalid and blocked", "недействительно и заблокировано" ), + + "PINCheck": new tr( "PIN1 ja PIN2 ei tohi sisaldada sünnikuupäeva ja -aastat", "PIN1 and PIN2 have to be different than date of birth or year of birth", "PIN1 и PIN2 не должны содержать дату рождения" ), + "PIN1Enter": new tr( "Sisesta kehtiv PIN1 kood", "Current PIN1 code", "Введите старый PIN1 код" ), + "PIN1Length": new tr( "PIN1 pikkus peab olema 4-12 numbrit", "PIN1 length has to be between 4 and 12", "Длина PIN1 должна быть 4-12 номера" ), + "PIN1InvalidRetry": new tr( "Vale PIN1 kood. Saad veel proovida %d korda.", "Wrong PIN1 code. You can try %d more times.", "Неверный PIN1 код. Попыток ещё: %d" ), + "PIN1Invalid": new tr( "Vale PIN1 kood.", "Wrong PIN1 code.", "Неверный PIN1 код." ), + "PIN1EnterNew": new tr( "Sisesta uus PIN1 kood", "Enter new PIN1 code", "Неверный PIN1 код. Попыток ещё" ), + "PIN1Retry": new tr( "Korda uut PIN1 koodi", "Retry your new PIN1 code", "Повторите новый PIN1 код" ), + "PIN1Different": new tr( "Uued PIN1 koodid on erinevad", "New PIN1 codes doesn't match", "Новые PIN1 коды не сходятся" ), + "PIN1Changed": new tr( "PIN1 kood muudetud!", "PIN1 changed!", "PIN1 код изменён!" ), + "PIN1Unsuccess": new tr( "PIN1 muutmine ebaõnnestus.", "Changing PIN1 failed", "Смена PIN1 кода неудачна." ), + "PIN1UnblockFailed": new tr( "Blokeeringu tühistamine ebaõnnestus.\nUus PIN peab erinema eelmisest PINist!", "Unblock failed.\nYour new PIN1 has to be different than current!", "Снятие блокировки неуспешно.\nНовый PIN должен отличаться от старого!" ), + "PIN1UnblockSuccess": new tr( "PIN1 kood on muudetud ja sertifikaadi blokeering tühistatud!", "PIN1 changed and you current sertificates blocking has been removed!", "PIN1 код изменён и сертификат разблокирован!" ), + "PIN1Blocked": new tr( "PIN1 blokeeritud.", "PIN1 blocked", "PIN1 заблокирован." ), + "PIN1NewOldSame": new tr( "Kehtiv ja uus PIN1 peavad olema erinevad!", "Old and new PIN1 has to be different!", "Старый и новый PIN1 должны отличаться!" ), + "PIN1ValidateFailed": new tr( "PIN1 koodi valideerimine ebaõnnestus", "PIN1 validation failed", "Не удалось распознать PIN1" ), + + "PIN2Enter": new tr( "Sisesta kehtiv PIN2 kood", "Current PIN2 code", "Введите старый PIN2 код" ), + "PIN2Length": new tr( "PIN2 pikkus peab olema 5-12 numbrit", "PIN2 length has to be between 5 and 12", "Длина PIN2 должна быть 5-12 номера" ), + "PIN2InvalidRetry": new tr( "Vale PIN2 kood. Saad veel proovida %d korda.", "Wrong PIN2 code. You can try %d more times.", "Неверный PIN2 код. Попыток ещё: %d" ), + "PIN2NewDifferent": new tr( "Uued PIN2 koodid on erinevad.", "New PIN2 codes doesn't match", "Новые PIN2 коды не сходятся" ), + "PIN2EnterNew": new tr( "Sisesta uus PIN2 kood.", "Enter new PIN2 code", "Неверный PIN2 код. Попыток ещё" ), + "PIN2Retry": new tr( "Korda uut PIN2 koodi.", "Retry your new PIN2 code", "Повторите новый PIN2 код" ), + "PIN2Different": new tr( "Uued PIN2 koodid on erinevad", "New PIN2 codes doesn't match", "Новые PIN2 коды не сходятся" ), + "PIN2Changed": new tr( "PIN2 kood muudetud!", "PIN2 changed!", "PIN2 код изменён!" ), + "PIN2Unsuccess": new tr( "PIN2 muutmine ebaõnnestus.", "Changing PIN2 failed", "Смена PIN2 кода неудачна." ), + "PIN2UnblockFailed": new tr( "Blokeeringu tühistamine ebaõnnestus.\nUus PIN peab erinema eelmisest PINist!", "Unblock failed.\nYour new PIN2 has to be different than current!", "Снятие блокировки неуспешно.\nНовый PIN должен отличаться от старого!" ), + "PIN2UnblockSuccess": new tr( "PIN2 kood on muudetud ja sertifikaadi blokeering tühistatud!", "PIN2 changed and you current sertificates blocking has been removed!", "PIN2 код изменён и сертификат разблокирован!" ), + "PIN2Blocked": new tr( "PIN2 blokeeritud.", "PIN2 blocked", "PIN2 заблокирован." ), + "PIN2NewOldSame": new tr( "Kehtiv ja uus PIN2 peavad olema erinevad!", "Old and new PIN2 has to be different!", "Старый и новый PIN2 должны отличаться!" ), + "PIN2ValidateFailed": new tr( "PIN2 koodi valideerimine ebaõnnestus", "PIN2 validation failed", "Не удалось распознать PIN2" ), + + "PUKEnter": new tr( "Sisesta PUK kood.", "Enter PUK code.", "Введите PUK код" ), + "PUKLength": new tr( "PUK koodi pikkus peab olema 8-12 numbrit.", "PUK length has to be between 8 and 12.", "Длина PUK должна быть 8-12 номера" ), + "PUKEnterOld": new tr( "Sisesta kehtiv PUK kood.", "Enter current PUK code.", "Введите старый PUK код" ), + "PUKEnterNew": new tr( "Sisesta uus PUK kood.", "Enter new PUK code.", "Неверный PUK код. Попыток ещё" ), + "PUKRetry": new tr( "Korda uut PUK koodi.", "Retry your new PUK code.", "Повторите новый PUK код" ), + "PUKDifferent": new tr( "Uued PUK koodid on erinevad", "New PUK codes doesn't match", "Новые PUK коды не сходятся" ), + "PUKChanged": new tr( "PUK kood muudetud!", "PUK changed!", "PUK код изменён!" ), + "PUKUnsuccess": new tr( "PUK koodi muutmine ebaõnnestus!", "Changing PUK failed!", "Смена PUK кода неудачна!" ), + "PUKInvalidRetry": new tr( "Vale PUK kood. Saad veel proovida %d korda.", "Wrong PUK code. You can try %d more times.", "Неверный PUK код. Попыток ещё: %d" ), + "PUKBlocked": new tr( "PUK kood blokeeritud.", "PUK blocked", "PUK заблокирован." ), + "PUKNewOldSame": new tr( "Kehtiv ja uus PUK peavad olema erinevad!", "Old and new PUK has to be different!", "Старый и новый PUK должны отличаться!" ), + "PUKValidateFailed": new tr( "PUK koodi valideerimine ebaõnnestus", "PUK validation failed", "Не удалось распознать PUK" ) +}; + +function selectLanguage() +{ + var select = document.getElementById('headerSelect'); + language = select.options[select.selectedIndex].value; + translateHTML(); + readCardData( true ); + extender.setLanguage( language ); + document.getElementById( 'forUpdate' ).innerHTML += "."; +} + +function tr( est, eng, rus ) +{ + this.et = est; + this.en = eng; + this.ru = rus; +} + +function _( code, defaultString ) +{ + if ( typeof htmlStrings[code] != "undefined" ) + { + if ( eval( "htmlStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "htmlStrings[\"" + code + "\"]." + language ) == "") + return eval( "htmlStrings[\"" + code + "\"]." + defaultLanguage ); + return eval( "htmlStrings[\"" + code + "\"]." + language ); + } else if ( typeof eidStrings[code] != "undefined" ) { + if ( eval( "eidStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "eidStrings[\"" + code + "\"]." + language ) == "" ) + return eval( "eidStrings[\"" + code + "\"]." + defaultLanguage ); + return eval( "eidStrings[\"" + code + "\"]." + language ); + } else if ( typeof eestiStrings[code] != "undefined" ) { + if ( eval( "eestiStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "eestiStrings[\"" + code + "\"]." + language ) == "") + return eval( "eestiStrings[\"" + code + "\"]." + defaultLanguage ); + return eval( "eestiStrings[\"" + code + "\"]." + language ); + } + return (typeof defaultString != "undefined" ) ? defaultString : code; +} + +function translateHTML() +{ + var trTags = document.getElementsByTagName('trTag'); + for( i=0;i= 0 ) + { + buttons[i].focus(); + buttons[i].click(); + return; + } + } + var ahrefs = document.getElementById('headerMenus').getElementsByTagName('a'); + for( i=0;i= 0 ) + { + ahrefs[i].focus(); + ahrefs[i].onclick(); + return; + } + } +} + +function checkNumeric(e) +{ + if ( e.charCode == 13 || e.charCode == 9 || e.charCode == 8 || e.charCode == 0 || String.fromCharCode(e.charCode).match(/[\d]/) ) + return true; + return false; +} + +function handlekey(nextItem) +{ + if ( window.event.charCode != 13 && window.event.charCode != 9 ) + return; + + var el = document.getElementById(nextItem) + if ( (typeof el == "undefined") || (typeof el.type == "undefined") ) + return; + + if ( el.type == "password" ) + el.focus(); + else if ( el.type == "button" ) + el.click(); +} + +function checkEnter( e, obj ) +{ + if ( e.charCode == 13 && ( typeof obj.click != "undefined" ) && obj.click ) + obj.click(); +} + +function cardInserted(i) +{ + //alert("Kaart sisestati lugejasse " + i + " - " + cardManager.getReaderName(i)) + checkReaderCount(); + setActive('cert',document.getElementById('buttonCert')); + + var inReader = false; + try { + if ( !cardManager.isInReader( activeCardId ) ) + { + disableFields(); + document.getElementById('cardInfoNoCard').style.display='none'; + activeCardId = ""; + emailsLoaded = false; + if ( i != -1 ) + { + extender.showLoading( _('loadCardData') ); + var retry = 3; + while( retry > 0 ) + { + cardManager.selectReader( i ); + if ( esteidData.canReadCard() ) + { + activeCardId = esteidData.getDocumentId(); + break; + } + retry--; + } + if ( activeCardId != '' || !cardManager.anyCardsInReader() ) + extender.closeLoading(); + } + } else + inReader = true; + } catch ( err ) {} + + if ( activeCardId == "" && !cardManager.anyCardsInReader() ) + document.getElementById('cardInfoNoCard').style.display='block'; + + document.getElementById( 'forUpdate' ).innerHTML += "."; + if ( !inReader && activeCardId != '' ) + readCardData(); + cardManager.allowRead(); +} + +function cardRemoved(i) +{ + //alert("Kaart eemaldati lugejast " + cardManager.getReaderName(i) + " " + activeCardId ); + checkReaderCount(); + setActive('cert',document.getElementById('buttonCert')); + + var inReader = false; + try { + if ( !cardManager.isInReader( activeCardId ) ) + { + if ( cardManager.anyCardsInReader() ) + extender.showLoading( _('loadCardData') ); + emailsLoaded = false; + activeCardId = ""; + disableFields(); + var retry = 3; + while( retry > 0 ) + { + cardManager.findCard(); + if ( esteidData.canReadCard() ) + { + activeCardId = esteidData.getDocumentId(); + break; + } + retry--; + } + } else + inReader = true; + } catch( err ) {} + + extender.closeLoading(); + document.getElementById( 'forUpdate' ).innerHTML += "."; + if ( !inReader ) + readCardData(); + cardManager.allowRead(); +} + +function selectReader() +{ + setActive('cert',document.getElementById('buttonCert')); + extender.showLoading( _('loadCardData') ); + disableFields(); + var select = document.getElementById('readerSelect'); + + try { + cardManager.selectReader( select.options[select.selectedIndex].value ); + } catch( err ) {} + + if ( esteidData.canReadCard() ) + activeCardId = esteidData.getDocumentId(); + + extender.closeLoading(); + document.getElementById( 'forUpdate' ).innerHTML += "."; + readCardData(); +} + +function checkReaderCount() +{ + var cards = 0; + var reader = document.getElementById( 'readerSelect' ); + while ( reader.options.length > 0 ) + reader.remove(0); + + try { + for( var i = 0; i < cardManager.getReaderCount(); i++ ) + { + if ( cardManager.isInReader( i ) ) + { + var el = document.createElement( 'option' ); + el.text = cardManager.cardId( i ); + el.value = i; + if ( activeCardId != "" && el.text == activeCardId ) + el.selected = true; + reader.add( el, null ); + cards++; + } + } + } catch ( err ) {} + + if ( cards < 2 ) + { + document.getElementById( 'headerMenus' ).style.right = '100px'; + document.getElementById( 'readerSelectDiv' ).style.display = 'none'; + } else { + document.getElementById( 'headerMenus' ).style.right = '200px'; + document.getElementById( 'readerSelectDiv' ).style.display = 'block'; + } +} + +function readCardData( translate ) +{ + try { + if ( translate == null ) + { + if ( cardManager.getReaderCount() == 0 || !esteidData.canReadCard() ) + { + disableFields(); + return; + } else + enableFields(); + + if ( activeCardId == "" ) + activeCardId = esteidData.getDocumentId(); + + checkReaderCount(); + } + var pukRetry = esteidData.getPukRetryCount(); + var esteidIsValid = esteidData.isValid(); + + document.getElementById('documentId').innerHTML = activeCardId; + document.getElementById('email').innerHTML = esteidData.authCert.getEmail(); + document.getElementById('labelCardValidity').innerHTML = _( esteidIsValid ? 'labelIsValid' : 'labelIsInValid' ); + document.getElementById('labelCardValidity').style.color = esteidIsValid ? '#509b00' : '#e80303'; + document.getElementById('labelCardValidTo').innerHTML = !esteidIsValid ? _('labelCardGetNew') : _('labelCardValidTill') + '' + esteidData.getExpiry( language ) + ''; + + if ( esteidData.authCert.isTempel() ) + { + document.getElementById('photo').innerHTML = '
'; + document.getElementById('id').innerHTML = esteidData.authCert.getSerialNum(); + document.getElementById('personCode').innerHTML = _('regcode'); + document.getElementById('firstName').innerHTML = esteidData.authCert.getSubjCN(); + document.getElementById('liPersonBirth').style.display = 'none'; + document.getElementById('liPersonCitizen').style.display = 'none'; + } else { + document.getElementById('personCode').innerHTML = _('personCode'); + document.getElementById('liPersonBirth').style.display = 'block'; + document.getElementById('liPersonCitizen').style.display = 'block'; + document.getElementById('firstName').innerHTML = esteidData.getFirstName(); + document.getElementById('middleName').innerHTML = esteidData.getMiddleName(); + document.getElementById('surName').innerHTML = esteidData.getSurName(); + document.getElementById('id').innerHTML = esteidData.getId(); + document.getElementById('birthDate').innerHTML = esteidData.getBirthDate( language ); + document.getElementById('birthPlace').innerHTML = (esteidData.getBirthPlace() != "" ? ", " + esteidData.getBirthPlace() : "" ); + document.getElementById('citizen').innerHTML = esteidData.getCitizen(); + } + + var pin1Retry = esteidData.getPin1RetryCount(); + var pin2Retry = esteidData.getPin2RetryCount(); + + document.getElementById('authCertValidTo').innerHTML = esteidData.authCert.getValidTo( language ); + var days = esteidData.authCert.validDays(); + if ( days >= 0 && days <= 105 && pin1Retry != 0 ) + { + document.getElementById('authCertWillExpire').style.display = 'block'; + document.getElementById('authCertWillExpire').innerHTML = _( 'labelCertWillExpire' ).replace( /%d/, days ); + } else + document.getElementById('authCertWillExpire').style.display = 'none'; + + document.getElementById('authKeyUsage').innerHTML = esteidData.getAuthUsageCount(); + + document.getElementById('signCertValidTo').innerHTML = esteidData.signCert.getValidTo( language ); + days = esteidData.signCert.validDays(); + if ( days >= 0 && days <= 105 && pin2Retry != 0 ) + { + document.getElementById('signCertWillExpire').style.display = 'block'; + document.getElementById('signCertWillExpire').innerHTML = _( 'labelCertWillExpire' ).replace( /%d/, days ); + } else + document.getElementById('signCertWillExpire').style.display = 'none'; + document.getElementById('signKeyUsage').innerHTML = esteidData.getSignUsageCount(); + + if ( pin1Retry != 0 ) + { + document.getElementById('authCertStatus').className=esteidData.authCert.isValid() ? 'statusValid' : 'statusBlocked'; + document.getElementById('authCertStatus').innerHTML=_( esteidData.authCert.isValid() ? 'certValid' : 'certBlocked' ); + document.getElementById('authKeyText').style.display='block'; + document.getElementById('authKeyBlocked').style.display='none'; + document.getElementById('authValidButtons').style.display='block'; + document.getElementById('authBlockedButtons').style.display='none'; + } else { + document.getElementById('authCertStatus').className='statusBlocked'; + document.getElementById('authCertStatus').innerHTML=_( esteidData.authCert.isValid() ? 'validBlocked' : 'invalidBlocked' ); + document.getElementById('authKeyText').style.display='none'; + document.getElementById('authKeyBlocked').style.display='block'; + document.getElementById('spanAuthKeyBlocked').innerHTML=_("labelAuthKeyBlocked"); + if ( language != "ru" ) + document.getElementById('spanAuthKeyBlocked').innerHTML+="
"+_("labelCertBlocked"); + document.getElementById('authValidButtons').style.display='none'; + document.getElementById('authBlockedButtons').style.display=(pukRetry == 0 ? 'none' : 'block'); + } + document.getElementById('authCertValidTo').className=(esteidData.authCert.isValid() ? 'certValid' : 'certBlocked'); + + if ( pin2Retry != 0 ) + { + document.getElementById('signCertStatus').className=esteidData.signCert.isValid() ? 'statusValid' : 'statusBlocked'; + document.getElementById('signCertStatus').innerHTML=_( esteidData.signCert.isValid() ? 'certValid' : 'certBlocked' ); + document.getElementById('signKeyText').style.display='block'; + document.getElementById('signKeyBlocked').style.display='none'; + document.getElementById('signValidButtons').style.display='block'; + document.getElementById('signBlockedButtons').style.display='none'; + } else { + document.getElementById('signCertStatus').className='statusBlocked'; + document.getElementById('signCertStatus').innerHTML=_( esteidData.signCert.isValid() ? 'validBlocked' : 'invalidBlocked' ); + document.getElementById('signKeyText').style.display='none'; + document.getElementById('signKeyBlocked').style.display='block'; + document.getElementById('spanSignKeyBlocked').innerHTML=_("labelSignKeyBlocked"); + if ( language != "ru" ) + document.getElementById('spanSignKeyBlocked').innerHTML+="
"+_("labelCertBlocked"); + document.getElementById('signValidButtons').style.display='none'; + document.getElementById('signBlockedButtons').style.display=(pukRetry == 0 ? 'none' : 'block');; + } + document.getElementById('signCertValidTo').className=(esteidData.signCert.isValid() ? 'certValid' : 'certBlocked'); + + //update cert button + days = esteidData.authCert.validDays(); + if ( ( days <= 105 || esteidData.signCert.validDays() <= 105 ) && pin1Retry > 0 && esteidIsValid ) + { + document.getElementById('authUpdateDiv').style.display='block'; + var width = 0; + if ( document.getElementById('authValidButtons').style.display == 'block' ) + width = parseInt(document.defaultView.getComputedStyle(document.getElementById('authValidButtons1'), "").getPropertyValue('width')) + + parseInt(document.defaultView.getComputedStyle(document.getElementById('authValidButtons2'), "").getPropertyValue('width')) + 5; + else if ( document.getElementById('authBlockedButtons').style.display == 'block' ) + width = parseInt(document.defaultView.getComputedStyle(document.getElementById('authBlockedButtons1'), "").getPropertyValue('width')); + document.getElementById('authUpdateButton').style.width=width + 'px'; + } else + document.getElementById('authUpdateDiv').style.display='none'; + + if(pukRetry == 0) + setActive('puk',document.getElementById('buttonPUK')); + } catch ( err ) { } +} + +function setActive( content, el ) +{ + if ( el != '' ) + { + if ( typeof el == 'string' ) + el = document.getElementById( el ); + var buttons = document.getElementById('leftMenus').getElementsByTagName('input'); + for( i=0;i'; + document.getElementById('savePhoto').style.display = 'block'; + } + extender.closeLoading(); +} + +function setEmailActivate( msg ) +{ + //emails activated, lets load again + if ( msg == "0" ) + { + document.getElementById('emailsContentActivate').style.display = "none"; + extender.loadEmails(); + return; + } + extender.closeLoading(); + document.getElementById('emailsContent').innerHTML = _(msg); +} + +function setEmails( code, msg ) +{ + extender.closeLoading(); + if ( code == "0" && msg.indexOf( ' - ' ) == -1 ) + code = "20"; + //not activated + if ( code == "20" ) + { + document.getElementById('emailAddress').focus(); + document.getElementById('emailsContentActivate').style.display = "block"; + } + //success + if ( code != "0" && code != "20" ) + _alert( 'error', _(code) ); + else { + if ( code == "0" ) + code = msg; + document.getElementById('emailsContent').innerHTML = _(code); + } + if ( code != "loadFailed" ) + emailsLoaded = true; + if ( emailsLoaded ) + document.getElementById('emailsContentCheck').style.display = 'none'; +} + +function activateEmail() +{ + var txt = document.getElementById('emailAddress').value; + if ( txt == "" || txt.indexOf('@') == -1 || txt.indexOf('.') == -1 || txt.indexOf(' ') != -1 ) + { + _alert( 'warning', _('emailEnter') ); + document.getElementById('emailAddress').focus(); + return; + } + extender.showLoading( _('activatingEmail') ); + extender.activateEmail( document.getElementById('emailAddress').value ); + document.getElementById('emailAddress').value = ""; +} + +function handleError(msg) +{ + if ( msg == "" ) + return; + if ( msg.indexOf("smart card API error") != -1 || msg.indexOf("No card in specified reader") != -1 ) + { + extender.closeLoading(); + return; + } + if ( msg == "PIN1InvalidRetry" || msg == "PIN1Invalid" ) + { + msg = "PIN1InvalidRetry"; + var ret = esteidData.getPin1RetryCount( true ); + if ( ret == -1 || ret > 3 ) + return; + if ( ret == 0 ) + { + _alert( 'error', _("PIN1Blocked") ); + readCardData(); + } else + _alert( 'error', _( msg ).replace( /%d/, ret ) ); + return; + } + _alert( 'error', _('errorFound') + _( msg ) ) +} + +function handleNotice(msg) +{ + if ( msg == "" ) + return; + _alert( 'notice', _( msg ) ) +} + +function disableFields() +{ + var divs = document.getElementsByTagName('div'); + for( i=0;i'; + document.getElementById('savePhoto').style.display = 'none'; + document.getElementById('emailsContentActivate').style.display = "none"; + document.getElementById('emailsContentCheckID').style.display = "none"; + + try { + if ( !cardManager.anyCardsInReader() ) + { + cardManager.disableRead(); + activeCardId = ""; + document.getElementById('cardInfoNoCard').style.display='block'; + document.getElementById('cardInfoNoCardText').innerHTML='' + _( cardManager.getReaderCount() == 0 ? 'noReaders' : 'noCard' ) + ''; + if ( cardManager.getReaderCount() == 0 ) + cardManager.newManager(); + cardManager.allowRead(); + } + } catch( err ) { cardManager.allowRead(); } +} + +function enableFields() +{ + document.getElementById('cardInfo').style.display='block'; + document.getElementById('cardInfoNoCard').style.display='none'; + var buttons = document.getElementById('leftMenus').getElementsByTagName('input'); + var selected = ""; + for( i=0;i 1 ) + { + setActive('smobile',''); + if ( strings[2] == "Active" ) + { + document.getElementById('activateMobileButton').style.display = "none"; + document.getElementById('mobileStatus').style.color = "#509b00"; + } else { + document.getElementById('mobileStatus').style.color = "#e80303"; + document.getElementById('inputActivateMobile').attributes["onclick"].value = "extender.openUrl('" + strings[3] + "');"; + document.getElementById('activateMobileButton').style.display = "block"; + } + document.getElementById('mobileNumber').innerHTML = strings[0]; + document.getElementById('mobileOperator').innerHTML = strings[1]; + document.getElementById('mobileStatus').innerHTML = _(strings[2]); + } +} + +function updateCert() +{ + cardManager.disableRead(); + extender.showLoading( _('updateCert') ); + if ( !extender.updateCertAllowed() ) + { + extender.closeLoading(); + cardManager.allowRead(); + return; + } + var ok = false; + try { + ok = extender.updateCert(); + } catch( err ){} + if ( ok ) + { + extender.closeLoading(); + _alert( 'info', _( 'updateCertOk' ) ); + activeCardId = ""; + var activeNum = cardManager.activeReaderNum(); + cardManager.newManager(); + cardInserted( activeNum ); + } + cardManager.allowRead(); + extender.closeLoading(); +} + +function changePin1() +{ changePin( 1 ); } + +function changePin2() +{ changePin( 2 ); } + +function changePin( type ) +{ + var oldVal=document.getElementById('pin' + type + 'OldPin').value; + if (oldVal==null || oldVal.length < 4) + { + _alert( 'warning', _( 'PIN' + type + 'Enter' ) ); + document.getElementById('pin' + type + 'OldPin').focus(); + return; + } + if ( !eval("esteidData.validatePin" + type + "(oldVal)") ) + { + ret = eval("esteidData.getPin" + type + "RetryCount() "); + if ( ret == 0 || ret > 3 ) + { + document.getElementById('pin' + type + 'OldPin').value = ""; + document.getElementById('pin' + type + 'NewPin').value = ""; + document.getElementById('pin' + type + 'NewPin2').value = ""; + if ( ret == 0 ) + { + _alert( 'error', _("PIN" + type + "Blocked") ); + readCardData(); + setActive('cert',''); + } else + _alert( 'error', _("PIN" + type + "ValidateFailed") ); + return; + } + _alert( 'warning', _( 'PIN' + type + 'InvalidRetry' ).replace( /%d/, ret ) ); + document.getElementById('pin' + type + 'OldPin').focus(); + return; + } + + var newVal=document.getElementById('pin' + type + 'NewPin').value; + var newVal2=document.getElementById('pin' + type + 'NewPin2').value; + if (newVal==null || newVal == "") + { + _alert( 'warning', _( 'PIN' + type + 'EnterNew' ) ); + document.getElementById('pin' + type + 'NewPin').focus(); + return; + } + if ( oldVal == newVal ) + { + _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); + document.getElementById('pin' + type + 'NewPin').focus(); + return; + } + //PIN1 length 4-12, PIN2 5-12 + if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || + (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) + { + _alert( 'warning', _( 'PIN' + type + 'Length' ) ); + document.getElementById('pin' + type + 'NewPin').focus(); + return; + } + //check date of birth and birth year inside pin + if ( !esteidData.checkPin( newVal ) ) + { + _alert( 'warning', _( 'PINCheck' ) ); + document.getElementById('pin' + type + 'NewPin').focus(); + return; + } + if (newVal2==null || newVal2 == "" ) + { + _alert( 'warning', _( 'PIN' + type + 'Retry' ) ); + document.getElementById('pin' + type + 'NewPin2').focus(); + return; + } + if ( newVal != newVal2 ) + { + _alert( 'warning', _( 'PIN' + type + 'Different' ) ); + document.getElementById('pin' + type + 'NewPin2').focus(); + return; + } + if (eval("esteidData.changePin" + type + "(newVal, oldVal)")) + { + document.getElementById('pin' + type + 'OldPin').value = ""; + document.getElementById('pin' + type + 'NewPin').value = ""; + document.getElementById('pin' + type + 'NewPin2').value = ""; + _alert( 'notice', _( 'PIN' + type + 'Changed' ) ); + setActive('cert',''); + } else + _alert( 'error', _( 'PIN' + type + 'Unsuccess' ) ); +} + +function changePin1PUK() +{ changePinPUK( 1 ); } + +function changePin2PUK() +{ changePinPUK( 2 ); } + +function changePinPUK( type ) +{ + var oldVal=document.getElementById('ppin' + type + 'OldPin').value; + if (oldVal==null || oldVal.length < 4) + { + _alert( 'warning', _( 'PUKEnterOld' ) ); + document.getElementById('ppin' + type + 'OldPin').focus(); + return; + } + if ( !esteidData.validatePuk(oldVal) ) + { + ret = esteidData.getPukRetryCount(); + if ( ret == 0 || ret > 3 ) + { + document.getElementById('ppin' + type + 'OldPin').value = ""; + document.getElementById('ppin' + type + 'NewPin').value = ""; + document.getElementById('ppin' + type + 'NewPin2').value = ""; + if ( ret == 0 ) + { + _alert( 'error', _("PUKBlocked") ); + readCardData(); + setActive('cert',''); + } else + _alert( 'error', _("PUKValidateFailed") ); + return; + } + _alert( 'warning', _('PUKInvalidRetry').replace( /%d/, ret ) ); + document.getElementById('ppin' + type + 'OldPin').focus(); + return; + } + + var newVal=document.getElementById('ppin' + type + 'NewPin').value; + var newVal2=document.getElementById('ppin' + type + 'NewPin2').value; + if (newVal==null || newVal == "") + { + _alert( 'warning', _( 'PIN' + type + 'EnterNew' ) ); + document.getElementById('ppin' + type + 'NewPin').focus(); + return; + } + if ( oldVal == newVal ) + { + _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); + document.getElementById('ppin' + type + 'NewPin').focus(); + return; + } + //PIN1 length 4-12, PIN2 5-12 + if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || + (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) + { + _alert( 'warning', _( 'PIN' + type + 'Length' ) ); + document.getElementById('ppin' + type + 'NewPin').focus(); + return; + } + //check date of birth and birth year inside pin + if ( !esteidData.checkPin( newVal ) ) + { + _alert( 'warning', _( 'PINCheck' ) ); + document.getElementById('ppin' + type + 'NewPin').focus(); + return; + } + if (newVal2==null || newVal2 == "" ) + { + _alert( 'warning', _( 'PIN' + type + 'Retry' ) ); + document.getElementById('ppin' + type + 'NewPin2').focus(); + return; + } + if ( newVal != newVal2 ) + { + _alert( 'warning', _( 'PIN' + type + 'Different' ) ); + document.getElementById('ppin' + type + 'NewPin2').focus(); + return; + } + if ( eval("esteidData.validatePin" + type + "(newVal)") ) + { + _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); + document.getElementById('ppin' + type + 'NewPin').focus(); + return; + } + if ( eval('esteidData.unblockPin' + type + '(newVal, oldVal)') ) + { + document.getElementById('ppin' + type + 'OldPin').value = ""; + document.getElementById('ppin' + type + 'NewPin').value = ""; + document.getElementById('ppin' + type + 'NewPin2').value = ""; + _alert( 'notice', _( 'PIN' + type + 'Changed' ) ); + setActive('cert',''); + } else + _alert( 'error', _( 'PIN' + type + 'Unsuccess' ) ); +} + +function changePuk() +{ + var oldVal=document.getElementById('pukOldPin').value; + if (oldVal==null || oldVal == "") + { + _alert( 'warning', _('PUKEnterOld') ); + document.getElementById('pukOldPin').focus(); + return; + } + if ( !esteidData.validatePuk(oldVal) ) + { + ret = esteidData.getPukRetryCount(); + if ( ret == 0 || ret > 3 ) + { + document.getElementById('pukOldPin').value = ""; + document.getElementById('pukNewPin').value = ""; + document.getElementById('pukNewPin2').value = ""; + if ( ret == 0 ) + { + _alert( 'error', _("PUKBlocked") ); + readCardData(); + setActive('cert',''); + } else + _alert( 'error', _("PUKValidateFailed") ); + return; + } + _alert( 'warning', _('PUKInvalidRetry').replace( /%d/, ret ) ); + document.getElementById('pukOldPin').focus(); + return; + } + + var newVal=document.getElementById('pukNewPin').value; + var newVal2=document.getElementById('pukNewPin2').value; + if (newVal==null || newVal == "") + { + _alert( 'warning', _('PUKEnterNew') ); + document.getElementById('pukNewPin').focus(); + return; + } + if ( oldVal == newVal ) + { + _alert( 'warning', _( 'PUKNewOldSame' ) ); + document.getElementById('pin' + type + 'NewPin').focus(); + return; + } + //PUK length 8-12 + if ( newVal.length<8 || newVal.length > 12 ) + { + _alert( 'warning', _( 'PUKLength' ) ); + document.getElementById('pukNewPin').focus(); + return; + } + + if (newVal2==null || newVal2 == "") + { + _alert( 'warning', _('PUKRetry') ); + document.getElementById('pukNewPin2').focus(); + return; + } + if ( newVal != newVal2 ) + { + _alert( 'warning', _('PUKDifferent') ); + document.getElementById('pukNewPin2').focus(); + return; + } + if (esteidData.changePuk(newVal, oldVal)) + { + document.getElementById('pukOldPin').value = ""; + document.getElementById('pukNewPin').value = ""; + document.getElementById('pukNewPin2').value = ""; + _alert( 'notice', _('PUKChanged') ); + setActive('puk',''); + } else + _alert( 'error', _('PUKUnsuccess') ); +} + +function unblockPin1() +{ unblockPin( 1 ); } + +function unblockPin2() +{ unblockPin( 2 ); } + +function unblockPin( type ) +{ + var oldVal=document.getElementById('bpin' + type + 'OldPin').value; + if (oldVal==null || oldVal.length < 4) + { + _alert( 'warning', _('PUKEnter') ); + document.getElementById('bpin' + type + 'OldPin').focus(); + return; + } + if ( !esteidData.validatePuk(oldVal) ) + { + ret = esteidData.getPukRetryCount(); + if ( ret == 0 || ret > 3 ) + { + document.getElementById('bpin' + type + 'OldPin').value = ""; + document.getElementById('bpin' + type + 'NewPin').value = ""; + document.getElementById('bpin' + type + 'NewPin2').value = ""; + if ( ret == 0 ) + { + _alert( 'error', _("PUKBlocked") ); + readCardData(); + setActive('cert',''); + } else + _alert( 'error', _("PUKValidateFailed") ); + return; + } + _alert( 'warning', _("PUKInvalidRetry").replace( /%d/, ret ) ); + document.getElementById('bpin' + type + 'OldPin').focus(); + return; + } + + var newVal=document.getElementById('bpin' + type + 'NewPin').value; + var newVal2=document.getElementById('bpin' + type + 'NewPin2').value; + if (newVal==null || newVal == "") + { + _alert( 'warning', _('PIN' + type + 'EnterNew') ); + document.getElementById('bpin' + type + 'NewPin').focus(); + return; + } + //PIN1 length 4-12, PIN2 5-12 + if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || + (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) + { + _alert( 'warning', _( 'PIN' + type + 'Length' ) ); + document.getElementById('bpin' + type + 'NewPin').focus(); + return; + } + //check date of birth and birth year inside pin + if ( !esteidData.checkPin( newVal ) ) + { + _alert( 'warning', _( 'PINCheck' ) ); + document.getElementById('bpin' + type + 'NewPin').focus(); + return; + } + if (newVal2==null || newVal2 == "") + { + _alert( 'warning', _('PIN' + type + 'Retry') ); + document.getElementById('bpin' + type + 'NewPin2').focus(); + return; + } + if ( newVal != newVal2 ) + { + _alert( 'warning', _('PIN' + type + 'Different') ); + document.getElementById('bpin' + type + 'NewPin2').focus(); + return; + } + if (eval('esteidData.unblockPin' + type + '(newVal, oldVal)')) + { + document.getElementById('bpin' + type + 'OldPin').value = ""; + document.getElementById('bpin' + type + 'NewPin').value = ""; + document.getElementById('bpin' + type + 'NewPin2').value = ""; + _alert( 'notice', _('PIN' + type + 'UnblockSuccess') ); + readCardData(); + setActive('cert',''); + } else + _alert( 'error', _('PIN' + type + 'UnblockFailed') ); +} + +function _alert( type, text ) +{ extender.showMessage( type, text ); } diff -Nru qesteidutil-0.3.1/src/html/style.css qesteidutil-0.3.1/src/html/style.css --- qesteidutil-0.3.1/src/html/style.css 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/html/style.css 2010-09-16 13:38:20.000000000 +0000 @@ -0,0 +1,78 @@ +body { cursor: default; margin: 0px; } +input[type="button"] { cursor: hand; } + +#headerBackground {position: relative; background: #00355f; height: 45px;} +#headerLogo { float: left; margin: 8px 0px 0px 20px; background-image: url('qrc:/html/images/topLogo.png'); z-index: 20; width: 92px; height: 28px; } + +#readerSelectDiv { position: absolute; right: 100px; top: 10px; } +#headerSelectDiv { position: absolute; right: 5px; top: 10px; } +#readerSelect, #headerSelect { background: #00355f; border: 0px; -webkit-text-fill-color: #FFFFFF; font-family: "Arial, Liberation Sans"; font-size: 12px; } +#readerSelect:focus, #readerSelect:hover, #headerSelect:focus, #headerSelect:hover { text-decoration: underline; } + +#headerMenus { position: absolute; right: 100px; top: 14px; color: #afc6d1; font-family: "Arial, Liberation Sans"; font-size: 12px; } +#headerMenus ul { display: inline; } +#headerMenus ul li { list-style: none; padding: 0px 5px 0px 10px; margin: 0px; display: inline; border-left: 1px solid #325e80; font-weight: bold; } +#headerMenus ul li:first-child { border-left: none; padding-left: 0px;} +#headerMenus a:link, #headerMenus a:visited {color: #afc6d1; text-decoration: none;} +#headerMenus a:hover, #headerMenus a:focus {color: #afc6d1; text-decoration: underline;} + +#topBackground {position: relative; background: #c6ddfa; height: 200px; z-index: -10;} + +#linegray {position: absolute; top:145px; width:585; height:165px; background-image: url('qrc:/html/images/linegray.png'); z-index: -1;} + +#logo {position: absolute; top:65px; left:45px; width:90px; height:84px; background-image: url('qrc:/html/images/logo.png');} +#logotext {position: absolute; top:72px; left:155px; width:176px; height:35px; background-image: url('qrc:/html/images/logotext.png'); background-repeat: no-repeat;} + +#leftMenus { position: absolute; top:155px; left: 5px; width:146; z-index: 1; } +#leftMenus ul {list-style: none; text-indent:-1.7em; line-height: 31px; } +.buttonSelected, .button { width: 146px; height: 25px; text-align: left; -webkit-border-radius: 3px; font-family: "Arial, Liberation Sans"; font-weight: bold; font-size: 14px; } +.buttonSelected, .button:hover, .buttonBottom:hover , .button:focus, .buttonBottom:focus + { background-image: url('qrc:/html/images/buttonSelected.png'); border: 1px solid #ce911b; color: #00355f;} + +.button { background-image: url('qrc:/html/images/button.png'); border: 1px solid #1a4b79; color: #ffffff;} + +#personalInfo { position: absolute; top:81px; left:180px; width:385; height:138px; + background-color: rgba(255,255,255,0.7); border: 1px solid #cddbeb; z-index: 1;-webkit-border-radius: 5px; + color: #668696; font-weight: bold; font-family: "Arial, Liberation Sans"; font-size: 12px; line-height: 18px;} +#personalInfo ul {list-style: none; text-indent:-2.1em; margin-top: 5px; width:240; word-wrap: break-word; } + +#smobileContent ul {list-style: none; text-indent:-2.1em; margin-top: 5px; width:500px; word-wrap: break-word; } +#smobileContent {color: #355670; font-family: "Arial, Liberation Sans"; font-size: 12px;} + +#photo {position: absolute; top:90px; left:467px; width:90px; height:120px; border: 1px solid black; z-index:1; background: #FFFFFF; text-align: center;} +#savePhoto {position: absolute; top:194px; left:468px; width: 90px; height:16px; border-top: 1px solid black; z-index:2; background: rgba(255,255,255,0.8); text-align: center; display: none;} + +.cardInfo { position: absolute; top:226px; left:180px; width:385; height:72px; + background-color: rgba(255,255,255,0.7); border: 1px solid #cddbeb; z-index: 1;-webkit-border-radius: 5px; + color: #54859b; font-weight: bold; font-family: "Arial, Liberation Sans"; font-size: 16px;} +.cardInfo ul {list-style: none; text-indent:-1.7em; margin-top: 7px;} +.noCard { padding-top:5px; font-size:18px; font-weight: bold; color:#ec2b2b; } +.pukBlocked { padding-top:5px; font-size:16px; font-weight: bold; color:#ec2b2b; } + +.content {position: relative; top: 70px; padding-left: 35px; padding-right: 35px;} +.contentHeader {color: #54859b; font-family: "Arial, Liberation Sans"; font-weight: bold; font-size: 16px; } +.content p {color: #355670; font-family: "Arial, Liberation Sans"; font-size: 12px;} +.statusValid {color: #509b00; font-weight: bold;} +.statusBlocked, .certBlocked {color: #e80303; font-weight: bold; } +.certValid {font-weight: bold;} + +.leftContent {position: absolute; left: 40px; width: 240px; height: 180px; border-right: 1px solid #dfdfdf; margin-top: 10px; padding-right: 10px; } +.buttonSelectedBottom, .buttonBottom { height: 23px; -webkit-border-radius: 3px; font-family: "Arial, Liberation Sans"; font-size: 12px; margin-left: 0px;} +.buttonSelectedBottom { background-image: url('qrc:/html/images/buttonSelected.png'); border: 1px solid #ce911b; color: #00355f;} +.buttonBottom { background-image: url('qrc:/html/images/button.png'); border: 1px solid #1a4b79; color: #ffffff;} + +.rightContent {position: absolute; left: 290px; width: 245px; margin-top: 10px; height: 180px; padding-left: 30px;} +#signBottomButtons, #authBottomButtons { position: absolute; bottom:0px; left: 0px; height: 30px; width:250; z-index: 1; } +#signUpdateDiv, #authUpdateDiv { position: absolute; bottom:30px; left: 0px; height: 25px; width:250; z-index: 1; } + +.keyBlocked { position: absolute; bottom: 35px; width: 220px; padding: 5px; + font-family: "Arial, Liberation Sans"; font-size: 12px; font-weight: bold; color: #e80303; border: 1px solid #e80303; -webkit-border-radius: 5px; } + +a:link, a:visited {color: #509b00; text-decoration: none;} +a:hover, a:focus {color: #509b00; text-decoration: underline;} + +label {color: #355670; font-weight: bold;} + +#statusBar { position: absolute; left: 10px; bottom:5px; width: 500px; height: 20px; } + +#firstName, #middleName, #surName, #department, #id, #birthDate, #birthPlace, #citizen, #email { color: #355670; } diff -Nru qesteidutil-0.3.1/src/jscardmanager.cpp qesteidutil-0.3.1/src/jscardmanager.cpp --- qesteidutil-0.3.1/src/jscardmanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jscardmanager.cpp 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,310 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include + +#include "jscardmanager.h" +#include "DiagnosticsDialog.h" +#include + +using namespace std; + +JsCardManager::JsCardManager(JsEsteidCard *jsEsteidCard) +: QObject( jsEsteidCard ) +, cardMgr( 0 ) +, m_jsEsteidCard( jsEsteidCard ) +, readAllowed( true ) +{ + try { + cardMgr = new PCSCManager(); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } + + connect(&pollTimer, SIGNAL(timeout()), + this, SLOT(pollCard())); + + //wait javascript/html to initialize + QTimer::singleShot( 2000, this, SLOT(pollCard()) ); +} + +JsCardManager::~JsCardManager() +{ + if( cardMgr ) + delete cardMgr; +} + +void JsCardManager::pollCard() +{ + + if ( !pollTimer.isActive() ) + pollTimer.start( 500 ); + + if ( !readAllowed ) + return; + + int numReaders = 0; + try { + QString insert,remove; + bool foundConnected = false; + + if (!cardMgr) + cardMgr = new PCSCManager(); + + // Build current device list with statuses + QHash tmp; + numReaders = cardMgr->getReaderCount( true ); + for (int i = 0; i < numReaders; i++) { + ReaderState reader; + reader.id = i; + reader.name = QString::fromStdString(cardMgr->getReaderName(i)); + reader.state = QString::fromStdString( cardMgr->getReaderState( i ) ); + if ( reader.state.contains( "PRESENT" ) ) + reader.state = "PRESENT"; + reader.connected = false; + if ( !cardReaders.contains(reader.name) || ( cardReaders.contains(reader.name) && cardReaders.value(reader.name).state != reader.state ) ) + { + //card in use + if ( !reader.state.contains( "EMPTY" ) ) + { + EstEidCard card(*cardMgr); + if ( card.isInReader(i) ) + { + card.connect( i ); + reader.cardId = QString::fromStdString( card.readDocumentID() ); + reader.connected = true; + foundConnected = true; + insert = reader.name; + } + } else if ( !cardReaders.value(reader.name).cardId.isEmpty() && cardReaders.value(reader.name).connected ) + remove = reader.name; + } else if ( cardReaders.value(reader.name).connected ) { + foundConnected = true; + reader.connected = true; + reader.cardId = cardReaders.value(reader.name).cardId; + } + tmp[reader.name] = reader; + } + // check if connected card or reader has removed + if ( cardReaders.size() > tmp.size() ) + { + foreach( const ReaderState &r, cardReaders ) + { + if ( r.connected && ( !tmp.contains( r.name ) || tmp[r.name].cardId.isEmpty() ) ) + { + remove = r.name; + break; + } + } + if ( remove.isEmpty() ) + remove = "empty"; + } else if ( cardReaders.size() < tmp.size() && insert.isEmpty() ) + insert = "empty"; + + if ( !remove.isEmpty() ) + { + if ( m_jsEsteidCard->m_card && m_jsEsteidCard->getDocumentId() == cardReaders[remove].cardId ) + m_jsEsteidCard->setCard( 0 ); + cardReaders = tmp; + readAllowed = false; + emit cardEvent( "cardRemoved", remove != "empty" ? cardReaders[remove].id : -1 ); + } + cardReaders = tmp; + if ( !insert.isEmpty() ) + { + readAllowed = false; + emit cardEvent( "cardInserted", insert != "empty" ? cardReaders[insert].id : -1 ); + } else if ( !foundConnected ) {// Didn't find any connected reader, lets find one + findCard(); + } else if ( foundConnected && !m_jsEsteidCard->canReadCard() ) { //card connected but not fully readable, let's try again + findCard(); + if ( m_jsEsteidCard->canReadCard() ) + emit cardEvent( "cardInserted", activeReaderNum() ); + } + } catch (std::runtime_error &e) { + qDebug() << e.what(); + if ( cardReaders.size() > 0 && numReaders == 0 ) + { + cardReaders = QHash(); + emit cardEvent( "cardRemoved", cardReaders.value(0).id ); + } + // For now ignore any errors that might have happened during polling. + // We don't want to spam users too often. + } +} + +bool JsCardManager::isInReader( const QString &cardId ) +{ + if ( cardId == "" ) + return false; + foreach( const ReaderState &r, cardReaders ) + if ( r.cardId == cardId ) + return true; + return false; +} + +bool JsCardManager::isInReader( int readerNum ) +{ + foreach( const ReaderState &r, cardReaders ) + if ( r.id == readerNum && !r.state.contains( "EMPTY") ) + return true; + return false; +} + +QString JsCardManager::cardId( int readerNum ) +{ + foreach( const ReaderState &r, cardReaders ) + if ( r.id == readerNum && !r.state.contains( "EMPTY") ) + return r.cardId; + return ""; +} + +void JsCardManager::findCard() +{ + if ( !cardMgr ) + return; + + try { + if ( getReaderCount() < 1 ) + return; + } catch ( const std::runtime_error &e ) { + qDebug() << e.what(); + return; + } + + m_jsEsteidCard->setCard( 0 ); + QCoreApplication::processEvents(); + foreach( const ReaderState &reader, cardReaders ) + { + if( reader.connected && !reader.name.isEmpty() ) + { + selectReader( reader ); + return; + } + } +} + +bool JsCardManager::anyCardsInReader() +{ + if ( !cardMgr ) + return false; + + try { + if ( getReaderCount() < 1 ) + return false; + } catch ( const std::runtime_error &e ) { + qDebug() << e.what(); + return false; + } + + foreach( const ReaderState &reader, cardReaders ) + if( reader.connected && !reader.name.isEmpty() ) + return true; + return false; +} + +bool JsCardManager::selectReader(int i) +{ + QCoreApplication::processEvents(); + foreach( const ReaderState &reader, cardReaders ) + { + if( reader.id == i && reader.connected ) + return selectReader( reader ); + } + return false; +} + +bool JsCardManager::selectReader( const ReaderState &reader ) +{ + QCoreApplication::processEvents(); + EstEidCard *card = 0; + try { + if (!cardMgr) + cardMgr = new PCSCManager(); + card = new EstEidCard(*cardMgr); + card->connect( reader.id ); + QCoreApplication::processEvents(); + m_jsEsteidCard->setCard(card, reader.id); + return true; + } catch (std::runtime_error &err) { + //ignore Another application is using + if ( QString::fromStdString( err.what() ).contains( "Another " ) ) + return false; + handleError(err.what()); + } + return false; +} + +int JsCardManager::activeReaderNum() +{ + if ( !m_jsEsteidCard || !m_jsEsteidCard->m_card ) + return -1; + return m_jsEsteidCard->m_reader; +} + +int JsCardManager::getReaderCount() +{ + if (!cardMgr) + return 0; + + int readers = 0; + try { + readers = cardMgr->getReaderCount( true ); + } catch( std::runtime_error & ) {} + + return readers; +} + +QString JsCardManager::getReaderName(int i) +{ + if (!cardMgr) + return ""; + + return QString::fromStdString(cardMgr->getReaderName(i)); +} + +void JsCardManager::handleError(QString msg) +{ + qDebug() << "Error: " << msg << endl; + emit cardError( "handleError", msg); +} + +void JsCardManager::showDiagnostics() +{ + (new DiagnosticsDialog( qApp->activeWindow() ) )->exec(); + m_jsEsteidCard->reconnect(); +} + +void JsCardManager::allowRead() +{ readAllowed = true; } + +void JsCardManager::disableRead() +{ readAllowed = false; } + +void JsCardManager::newManager() +{ + m_jsEsteidCard->setCard( 0 ); + delete cardMgr; + cardMgr = 0; +} diff -Nru qesteidutil-0.3.1/src/jscardmanager.h qesteidutil-0.3.1/src/jscardmanager.h --- qesteidutil-0.3.1/src/jscardmanager.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jscardmanager.h 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include +#include +#include + +#include +#include "jsesteidcard.h" + +class JsCardManager : public QObject +{ + Q_OBJECT + + struct ReaderState { + QString name; + bool connected; + QString cardId; + int id; + QString state; + }; + +public: + JsCardManager(JsEsteidCard *jsEsteidCard); + ~JsCardManager(); + +private: + PCSCManager *cardMgr; + JsEsteidCard *m_jsEsteidCard; + QTimer pollTimer; + + QHash cardReaders; + + void handleError(QString msg); + bool readAllowed; + +public slots: + int getReaderCount(); + QString getReaderName( int i ); + bool selectReader( int i ); + bool selectReader( const ReaderState &reader ); + bool isInReader( const QString &cardId ); + bool isInReader( int readerNum ); + QString cardId( int readerNum ); + void showDiagnostics(); + void findCard(); + bool anyCardsInReader(); + int activeReaderNum(); + void allowRead(); + void disableRead(); + void newManager(); + +private slots: + void pollCard(); + +signals: + void cardEvent(QString func, int i); + void cardError(QString func, QString err); +}; diff -Nru qesteidutil-0.3.1/src/jscertdata.cpp qesteidutil-0.3.1/src/jscertdata.cpp --- qesteidutil-0.3.1/src/jscertdata.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jscertdata.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,214 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include + +#include "jscertdata.h" +#include "common/SslCertificate.h" + +JsCertData::JsCertData( QObject *parent ) +: QObject( parent ) +{ + m_card = NULL; + m_qcert = NULL; +} + +JsCertData::~JsCertData() +{ + if( m_qcert ) + delete m_qcert; +} + +QSslCertificate JsCertData::cert() const { return *m_qcert; } + +void JsCertData::loadCert(EstEidCard *card, CertType ct) +{ + m_card = card; + + if (!m_card) { + qDebug("No card"); + return; + } + + if( m_qcert ) + { + delete m_qcert; + m_qcert = 0; + } + + std::vector tmp; + ByteVec certBytes; + try { + // Read certificate + if (ct == AuthCert) + certBytes = m_card->getAuthCert(); + else + certBytes = m_card->getSignCert(); + + if( certBytes.size() ) + m_qcert = new QSslCertificate(QByteArray((char *)&certBytes[0], certBytes.size()), QSsl::Der); + else + m_qcert = new QSslCertificate(); + } catch ( std::runtime_error &err ) { +// doShowError(err); + qDebug() << "Error on loadCert: " << err.what(); + } +} + +QString JsCertData::toPem() +{ + if (!m_qcert) + return ""; + + return QString(m_qcert->toPem()); +} + +QString JsCertData::getEmail() +{ + if (!m_qcert) + return ""; + + if ( isTempel() ) + return m_qcert->subjectInfo( "emailAddress" ); + + QStringList mailaddresses = m_qcert->alternateSubjectNames().values(QSsl::EmailEntry); + + // return first email address + if (!mailaddresses.isEmpty()) + return mailaddresses.first(); + else + return ""; +} + +QString JsCertData::getSerialNum() +{ + if (!m_qcert) + return ""; + + return m_qcert->subjectInfo("serialNumber"); +} + +QString JsCertData::getSubjCN() +{ + if (!m_qcert) + return ""; + + return SslCertificate( *m_qcert ).subjectInfo(QSslCertificate::CommonName); +} + +QString JsCertData::getSubjSN() +{ + if (!m_qcert) + return ""; + + return m_qcert->subjectInfo("SN"); +} + +QString JsCertData::getSubjO() +{ + if (!m_qcert) + return ""; + + return m_qcert->subjectInfo(QSslCertificate::Organization); +} + +QString JsCertData::getSubjOU() +{ + if (!m_qcert) + return ""; + + return m_qcert->subjectInfo(QSslCertificate::OrganizationalUnitName); +} + +QString JsCertData::getValidFrom( const QString &locale ) +{ + if (!m_qcert) + return ""; + + return QLocale( locale ).toString( m_qcert->effectiveDate().toLocalTime(), "dd. MMMM yyyy" ); +} + +QString JsCertData::getValidTo( const QString &locale ) +{ + if (!m_qcert) + return ""; + + return QLocale( locale ).toString( m_qcert->expiryDate().toLocalTime(), "dd. MMMM yyyy" ); +} + +QString JsCertData::getIssuerCN() +{ + if (!m_qcert) + return ""; + + return m_qcert->issuerInfo(QSslCertificate::CommonName); +} + +QString JsCertData::getIssuerO() +{ + if (!m_qcert) + return ""; + + return m_qcert->issuerInfo(QSslCertificate::Organization); +} + +QString JsCertData::getIssuerOU() +{ + if (!m_qcert) + return ""; + + return m_qcert->issuerInfo(QSslCertificate::OrganizationalUnitName); +} + +bool JsCertData::isTempel() +{ + if (!m_qcert) + return false; + + return SslCertificate( *m_qcert ).isTempel(); +} + +bool JsCertData::isTest() +{ + if (!m_qcert) + return false; + + return SslCertificate( *m_qcert ).isTest(); +} + +bool JsCertData::isValid() +{ + if (!m_qcert) + return false; + + return m_qcert->expiryDate().toLocalTime() >= QDateTime::currentDateTime(); +} + +int JsCertData::validDays() +{ + if ( !m_qcert || !isValid() ) + return 0; + + return QDateTime::currentDateTime().daysTo( m_qcert->expiryDate().toLocalTime() ); +} diff -Nru qesteidutil-0.3.1/src/jscertdata.h qesteidutil-0.3.1/src/jscertdata.h --- qesteidutil-0.3.1/src/jscertdata.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jscertdata.h 2010-07-14 16:10:54.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include +#include +#include + +#include + +class JsCertData : public QObject +{ + Q_OBJECT + +public: + JsCertData( QObject *parent ); + ~JsCertData(); + + enum CertType { + AuthCert, + SignCert + }; + + QSslCertificate cert() const; + void loadCert(EstEidCard *card, CertType ct); + QSslCertificate *m_qcert; + +private: + EstEidCard *m_card; + +public slots: + QString toPem(); + QString getEmail(); + QString getSubjCN(); + QString getSubjSN(); + QString getSubjO(); + QString getSubjOU(); + QString getValidFrom( const QString &locale = "en" ); + QString getValidTo( const QString &locale = "en" ); + QString getIssuerCN(); + QString getIssuerO(); + QString getIssuerOU(); + QString getSerialNum(); + + bool isTempel(); + bool isTest(); + bool isValid(); + int validDays(); +}; diff -Nru qesteidutil-0.3.1/src/jsesteidcard.cpp qesteidutil-0.3.1/src/jsesteidcard.cpp --- qesteidutil-0.3.1/src/jsesteidcard.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jsesteidcard.cpp 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,513 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include "jsesteidcard.h" +#include "common/CertificateWidget.h" +#include "common/SslCertificate.h" + +using namespace std; + +static QString getName( const std::string &data ) +{ + QTextCodec *c = QTextCodec::codecForName("Windows-1252"); + return SslCertificate::formatName( c->toUnicode( data.c_str() ) ); +} + +JsEsteidCard::JsEsteidCard( QObject *parent ) +: QObject( parent ) +{ + m_card = NULL; + m_authCert = new JsCertData( this ); + m_signCert = new JsCertData( this ); + authUsageCount = 0; + signUsageCount = 0; + cardOK = false; +} + +void JsEsteidCard::setCard(EstEidCard *card, int reader) +{ + if ( m_card ) + { + delete m_card; + m_card = 0; + } + + if ( !card ) + return; + + cardOK = false; + m_reader = reader; + m_card = card; + m_authCert->loadCert(card, JsCertData::AuthCert); + m_signCert->loadCert(card, JsCertData::SignCert); + reloadData(); +} + +void JsEsteidCard::handleError(QString msg) +{ + qDebug() << "Error: " << msg << endl; + emit cardError("handleError", msg); +} + +void JsEsteidCard::reloadData() { + if (!m_card) { + qDebug("No card"); + return; + } + + std::vector tmp; + try { + // Read all personal data + m_card->readPersonalData(tmp,EstEidCard::SURNAME,EstEidCard::COMMENT4); + + surName = getName( tmp[EstEidCard::SURNAME] ); + firstName = getName( tmp[EstEidCard::FIRSTNAME] ); + middleName = getName( tmp[EstEidCard::MIDDLENAME] ); + sex = tmp[EstEidCard::SEX].c_str(); + citizen = tmp[EstEidCard::CITIZEN].c_str(); + birthDate = tmp[EstEidCard::BIRTHDATE].c_str(); + id = tmp[EstEidCard::ID].c_str(); + documentId = tmp[EstEidCard::DOCUMENTID].c_str(); + expiry = tmp[EstEidCard::EXPIRY].c_str(); + birthPlace = SslCertificate::formatName( tmp[EstEidCard::BIRTHPLACE].c_str() ); + issueDate = tmp[EstEidCard::ISSUEDATE].c_str(); + residencePermit = tmp[EstEidCard::RESIDENCEPERMIT].c_str(); + comment1 = tmp[EstEidCard::COMMENT1].c_str(); + comment2 = tmp[EstEidCard::COMMENT2].c_str(); + comment3 = tmp[EstEidCard::COMMENT3].c_str(); + comment4 = tmp[EstEidCard::COMMENT4].c_str(); + + m_card->getKeyUsageCounters( authUsageCount, signUsageCount); + + cardOK = true; + } catch (runtime_error &err ) { + cout << "Error on readPersonalData: " << err.what() << endl; + cardOK = false; + } +} + +bool JsEsteidCard::canReadCard() +{ + return m_card && m_authCert && m_signCert && m_authCert->m_qcert && m_signCert->m_qcert && cardOK; +} + +bool JsEsteidCard::validatePin1(QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->validateAuthPin( PinString( oldVal.toLatin1() ), retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::changePin1(QString newVal, QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->changeAuthPin( PinString( newVal.toLatin1() ), + PinString( oldVal.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::validatePin2(QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->validateSignPin( PinString( oldVal.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::changePin2(QString newVal, QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->changeSignPin( PinString( newVal.toLatin1() ), + PinString( oldVal.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::validatePuk(QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->validatePuk( PinString( oldVal.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::changePuk(QString newVal, QString oldVal) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->changePUK( PinString( newVal.toLatin1() ), + PinString( oldVal.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::unblockPin1(QString newVal, QString puk) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->unblockAuthPin( PinString( newVal.toLatin1() ), + PinString( puk.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +bool JsEsteidCard::unblockPin2(QString newVal, QString puk) +{ + if (!m_card) { + qDebug("No card"); + return false; + } + + byte retriesLeft = 0; + + int retry = 3; + while( retry > 0 ) + { + try { + return m_card->unblockSignPin( PinString( newVal.toLatin1() ), + PinString( puk.toLatin1() ), + retriesLeft); + } catch(AuthError &) { + return false; + } catch (std::runtime_error &err) { + handleError(err.what()); + m_card->reconnectWithT0(); + } + retry--; + } + return false; +} + +QString JsEsteidCard::getSurName() +{ + return surName; +} + +QString JsEsteidCard::getFirstName() +{ + return firstName; +} + +QString JsEsteidCard::getMiddleName() +{ + return middleName; +} + +QString JsEsteidCard::getSex() +{ + return sex; +} + +QString JsEsteidCard::getCitizen() +{ + return citizen; +} + +QString JsEsteidCard::getBirthDate( const QString &locale ) +{ + return QLocale( locale ).toString( QDate::fromString( birthDate, "dd.MM.yyyy" ), "dd. MMMM yyyy" ); +} + +QString JsEsteidCard::getId() +{ + return id; +} + +QString JsEsteidCard::getDocumentId() +{ + return documentId; +} + +QString JsEsteidCard::getExpiry( const QString &locale ) +{ + return QLocale( locale ).toString( QDate::fromString( expiry, "dd.MM.yyyy" ), "dd. MMMM yyyy" ); +} + +QString JsEsteidCard::getBirthPlace() +{ + return birthPlace; +} + +QString JsEsteidCard::getIssueDate() +{ + return QDate::fromString( issueDate, "dd.MM.yyyy" ).toString( "dd. MMMM yyyy" ); +} + +QString JsEsteidCard::getResidencePermit() +{ + return residencePermit; +} + +QString JsEsteidCard::getComment1() +{ + return comment1; +} + +QString JsEsteidCard::getComment2() +{ + return comment2; +} + +QString JsEsteidCard::getComment3() +{ + return comment3; +} + +QString JsEsteidCard::getComment4() +{ + return comment4; +} + +int JsEsteidCard::getPin1RetryCount( bool connect ) +{ + if (!m_card) + return -1; + + byte puk = -1; + byte pinAuth = -1; + byte pinSign = -1; + + try { + if ( connect ) + m_card->connect( m_reader ); + m_card->getRetryCounts(puk,pinAuth,pinSign); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } + + return pinAuth; +} + +int JsEsteidCard::getPin2RetryCount() +{ + if (!m_card) + return -1; + + byte puk = -1; + byte pinAuth = -1; + byte pinSign = -1; + + try { + m_card->getRetryCounts(puk,pinAuth,pinSign); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } + + return pinSign; +} + +int JsEsteidCard::getPukRetryCount() +{ + if (!m_card) + return -1; + + byte puk = -1; + byte pinAuth = -1; + byte pinSign = -1; + + try { + m_card->getRetryCounts(puk,pinAuth,pinSign); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } + return puk; +} + +int JsEsteidCard::getAuthUsageCount() +{ + return authUsageCount; +} + +int JsEsteidCard::getSignUsageCount() +{ + return signUsageCount; +} + +bool JsEsteidCard::isValid() +{ + if (!m_card) + return false; + + return QDateTime::fromString( expiry, "dd.MM.yyyy" ) >= QDateTime::currentDateTime(); +} + +bool JsEsteidCard::checkPin( const QString &pin ) +{ + QDate date( QDate::fromString( birthDate, "dd.MM.yyyy" ) ); + if ( pin.contains( date.toString( "yyyy" ) ) || + pin.contains( date.toString( "ddMM" ) ) || + pin.contains( date.toString( "MMdd" ) ) ) + return false; + return true; +} + +void JsEsteidCard::showCert( int type ) +{ + CertificateDialog *c = new CertificateDialog; + if( type == 1 ) + c->setCertificate( m_authCert->cert() ); + else + c->setCertificate( m_signCert->cert() ); + c->show(); +} + +void JsEsteidCard::reconnect() +{ + if (!m_card) + return; + + try { + m_card->connect( m_reader ); + } catch ( std::runtime_error &e ) { + qDebug() << e.what(); + } +} diff -Nru qesteidutil-0.3.1/src/jsesteidcard.h qesteidutil-0.3.1/src/jsesteidcard.h --- qesteidutil-0.3.1/src/jsesteidcard.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jsesteidcard.h 2011-07-01 07:38:25.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include +#include + +#include +#include +#include "jscertdata.h" + +class JsEsteidCard : public QObject +{ + Q_OBJECT + +public: + JsEsteidCard( QObject *parent ); + + void setCard(EstEidCard *card, int reader = 0); + void reloadData(); + void reconnect(); + + EstEidCard *m_card; + int m_reader; + + JsCertData *m_authCert; + Q_PROPERTY(QObject* authCert READ getAuthCert) + QObject *getAuthCert() { return m_authCert; } + + JsCertData *m_signCert; + Q_PROPERTY(QObject* signCert READ getSignCert) + QObject *getSignCert() { return m_signCert; } + +public slots: + QString getSurName(); + QString getFirstName(); + QString getMiddleName(); + QString getSex(); + QString getCitizen(); + QString getBirthDate( const QString &locale = "en" ); + QString getId(); + QString getDocumentId(); + QString getExpiry( const QString &locale = "en" ); + QString getBirthPlace(); + QString getIssueDate(); + QString getResidencePermit(); + QString getComment1(); + QString getComment2(); + QString getComment3(); + QString getComment4(); + + bool canReadCard(); + bool isValid(); + + int getPin1RetryCount( bool connect = false ); + int getPin2RetryCount(); + int getPukRetryCount(); + + int getAuthUsageCount(); + int getSignUsageCount(); + + bool changePin1(QString newVal, QString oldVal); + bool changePin2(QString newVal, QString oldVal); + bool changePuk(QString newVal, QString oldVal); + bool unblockPin1(QString newVal, QString puk); + bool unblockPin2(QString newVal, QString puk); + bool validatePin1(QString oldVal); + bool validatePin2(QString oldVal); + bool validatePuk(QString oldVal); + bool checkPin( const QString &pin ); + + void showCert( int type ); + +signals: + void cardError(QString func, QString err); + +private: + PCSCManager *m_cardManager; + void handleError(QString msg); + dword authUsageCount; + dword signUsageCount; + + QString surName; + QString firstName; + QString middleName; + QString sex; + QString citizen; + QString birthDate; + QString id; + QString documentId; + QString expiry; + QString birthPlace; + QString issueDate; + QString residencePermit; + QString comment1; + QString comment2; + QString comment3; + QString comment4; + + bool cardOK; +}; diff -Nru qesteidutil-0.3.1/src/jsextender.cpp qesteidutil-0.3.1/src/jsextender.cpp --- qesteidutil-0.3.1/src/jsextender.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jsextender.cpp 2010-10-28 18:17:57.000000000 +0000 @@ -0,0 +1,484 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "CertUpdate.h" +#include "mainwindow.h" +#include "jsextender.h" +#include "common/Settings.h" +#include "SettingsDialog.h" + +JsExtender::JsExtender( MainWindow *main ) +: QObject( main ) +, m_mainWindow( main ) +, m_loading( 0 ) +{ + QString deflang; + switch( QLocale().language() ) + { + case QLocale::English: deflang = "en"; break; + case QLocale::Russian: deflang = "ru"; break; + case QLocale::Estonian: + default: deflang = "et"; break; + } + m_locale = Settings().value( "Main/Language", deflang ).toString(); + if ( m_locale.isEmpty() ) + m_locale = QLocale::system().name().left( 2 ); + setLanguage( m_locale ); + + connect( m_mainWindow->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), + this, SLOT(javaScriptWindowObjectCleared())); +} + +JsExtender::~JsExtender() +{ + if ( m_loading ) + m_loading->deleteLater(); + if ( QFile::exists( m_tempFile ) ) + QFile::remove( m_tempFile ); +} + +void JsExtender::setLanguage( const QString &lang ) +{ + m_locale = lang; + if ( m_locale == "C" ) + m_locale = "en"; + Settings().setValue( "Main/Language", m_locale ); + m_mainWindow->retranslate( m_locale ); +} + +void JsExtender::registerObject( const QString &name, QObject *object ) +{ + m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( name, object ); + + m_registeredObjects[name] = object; +} + +void JsExtender::javaScriptWindowObjectCleared() +{ + for (QMap::Iterator it = m_registeredObjects.begin(); it != m_registeredObjects.end(); ++it) + m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( it.key(), it.value() ); + + m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( "extender", this ); +} + +QVariant JsExtender::jsCall( const QString &function, int argument ) +{ + return m_mainWindow->page()->mainFrame()->evaluateJavaScript( + QString( "%1(%2)" ).arg( function ).arg( argument ) ); +} + +QVariant JsExtender::jsCall( const QString &function, const QString &argument ) +{ + return m_mainWindow->page()->mainFrame()->evaluateJavaScript( + QString( "%1(\"%2\")" ).arg( function ).arg( argument ) ); +} + +QVariant JsExtender::jsCall( const QString &function, const QString &argument, const QString &argument2 ) +{ + return m_mainWindow->page()->mainFrame()->evaluateJavaScript( + QString( "%1(\"%2\",\"%3\")" ).arg( function ).arg( argument ).arg( argument2 ) ); +} + +void JsExtender::openUrl( const QString &url ) +{ QDesktopServices::openUrl( QUrl( url ) ); } + +QString JsExtender::checkPin() +{ + if ( !m_mainWindow->eidCard() || !m_mainWindow->eidCard()->m_card ) + throw std::runtime_error( "noCard" ); + if ( activeDocument.isEmpty() || activeDocument != m_mainWindow->eidCard()->getDocumentId() || pin.isEmpty() || + Settings().value( "Util/sessionTime").toInt() == 0 || + !m_dateTime.isValid() || m_dateTime.addSecs( Settings().value( "Util/sessionTime").toInt() * 60 ) < QDateTime::currentDateTime() ) + { + activeDocument = m_mainWindow->eidCard()->getDocumentId(); + m_dateTime = QDateTime::currentDateTime(); + return QString(); + } + return pin; +} + +QByteArray JsExtender::getUrl( SSLConnect::RequestType type, const QString &def ) +{ + QByteArray buffer; + + try { + SSLConnect sslConnect; + sslConnect.setPin( checkPin() ); + sslConnect.setCard( m_mainWindow->cardManager()->cardId( + m_mainWindow->cardManager()->activeReaderNum() ) ); + buffer = sslConnect.getUrl( type, def ); + pin = Settings().value( "Util/sessionTime").toInt() ? sslConnect.pin() : QString(); + } catch( const std::runtime_error &e ) { + throw std::runtime_error( e ); + } + m_mainWindow->eidCard()->reconnect(); + return buffer; +} + +void JsExtender::activateEmail( const QString &email ) +{ + QByteArray buffer; + try { + buffer = getUrl( SSLConnect::ActivateEmails, email ); + } catch( std::runtime_error &e ) { + jsCall( "handleError", e.what() ); + jsCall( "setEmails", "forwardFailed", "" ); + return; + } + if ( !buffer.size() ) + { + jsCall( "setEmails", "forwardFailed", "" ); + return; + } + xml.clear(); + xml.addData( buffer ); + QString result = "forwardFailed"; + while ( !xml.atEnd() ) + { + xml.readNext(); + if ( xml.isStartElement() && xml.name() == "fault_code" ) + { + result = xml.readElementText(); + break; + } + } + jsCall( "setEmailActivate", result ); +} + +void JsExtender::loadEmails() +{ + QByteArray buffer; + try { + buffer = getUrl( SSLConnect::EmailInfo, "" ); + } catch( std::runtime_error &e ) { + jsCall( "handleError", e.what() ); + jsCall( "setEmails", "loadFailed", "" ); + return; + } + + if ( !buffer.size() ) + { + jsCall( "setEmails", "loadFailed", "" ); + return; + } + xml.clear(); + xml.addData( buffer ); + QString result = "loadFailed", emails; + while ( !xml.atEnd() ) + { + xml.readNext(); + if ( xml.isStartElement() ) + { + if ( xml.name() == "fault_code" ) + { + result = xml.readElementText(); + continue; + } + if ( xml.name() == "ametlik_aadress" ) + emails += readEmailAddresses(); + } + } + if ( emails.length() > 4 ) + emails = emails.right( emails.length() - 4 ); + jsCall( "setEmails", result, emails ); +} + +QString JsExtender::readEmailAddresses() +{ + Q_ASSERT( xml.isStartElement() && xml.name() == "ametlik_aadress" ); + + QString emails; + + while ( !xml.atEnd() ) + { + xml.readNext(); + if ( xml.isStartElement() ) + { + if ( xml.name() == "epost" ) + emails += "
" + xml.readElementText(); + else if ( xml.name() == "suunamine" ) + emails += readForwards(); + } + } + return emails; +} + +QString JsExtender::readForwards() +{ + Q_ASSERT( xml.isStartElement() && xml.name() == "suunamine" ); + + bool emailActive = false, forwardActive = false; + QString email; + + while ( !xml.atEnd() ) + { + xml.readNext(); + if ( xml.isEndElement() ) + break; + if ( xml.isStartElement() ) + { + if ( xml.name() == "epost" ) + email = xml.readElementText(); + else if ( xml.name() == "aktiivne" && xml.readElementText() == "true" ) + emailActive = true; + else if ( xml.name() == "aktiiveeritud" && xml.readElementText() == "true" ) + forwardActive = true; + } + } + return (emailActive && forwardActive ) ? tr( " - %1 (active)" ).arg( email ) : tr( " - %1 (not active)" ).arg( email ); +} + +void JsExtender::loadPicture() +{ + QString result = "loadPicFailed"; + QByteArray buffer; + try { + buffer = getUrl( SSLConnect::PictureInfo, "" ); + } catch( std::runtime_error &e ) { + jsCall( "handleError", e.what() ); + jsCall( "setPicture", "", result ); + return; + } + if ( !buffer.size() ) + { + jsCall( "setPicture", "", result ); + return; + } + + QPixmap pix; + if ( pix.loadFromData( buffer ) ) + { + QTemporaryFile file( QString( "%1%2XXXXXX.jpg" ) + .arg( QDir::tempPath() ).arg( QDir::separator() ) ); + file.setAutoRemove( false ); + if ( file.open() ) + { + m_tempFile = file.fileName(); + if ( pix.save( &file ) ) + { + jsCall( "setPicture", QUrl::fromLocalFile(m_tempFile).toString(), "" ); + return; + } + } + jsCall( "setPicture", "", QString( "loadPicFailed3|%1" ).arg( file.errorString() ) ); + } else { //probably got xml error string + QString result2 = "loadPicFailed2"; + xml.clear(); + xml.addData( buffer ); + while ( !xml.atEnd() ) + { + xml.readNext(); + if ( xml.isStartElement() && xml.name() == "fault_code" ) + { + result2 = xml.readElementText(); + break; + } + } + jsCall( "setPicture", "", result2 ); + } +} + +void JsExtender::savePicture() +{ + if ( !QFile::exists( m_tempFile ) ) + { + jsCall( "handleError", "savePicFailed" ); + return; + } + QString pFile = QDesktopServices::storageLocation( QDesktopServices::PicturesLocation ); + if ( m_mainWindow->eidCard() ) + pFile += QString( "%1%2.jpg" ).arg( QDir::separator() ).arg( m_mainWindow->eidCard()->getId() ); + QString file = QFileDialog::getSaveFileName( m_mainWindow, tr( "Save picture" ), pFile, tr( "JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp)" ) ); + if( file.isEmpty() ) + return; + QString ext = QFileInfo( file ).suffix(); + if( ext != "png" && ext != "jpg" && ext != "jpeg" && ext != "tiff" && ext != "bmp" ) + file.append( ".jpg" ); + QPixmap pix; + if ( !pix.load( m_tempFile ) ) + { + jsCall( "handleError", "savePicFailed" ); + return; + } + pix.save( file ); +} + +void JsExtender::getMidStatus() +{ + QString result = "mobileFailed"; + QByteArray buffer; + + QString data = "" + "" + "" + "" + ""; + QString header = "POST /id/midstatusinfolive/ HTTP/1.1\r\n" + "Host: " + QString(SK) + "\r\n" + "Content-Type: text/xml\r\n" + "Content-Length: " + QString::number( data.size() ) + "\r\n" + "SOAPAction: \"\"\r\n" + "Connection: close\r\n\r\n"; + try { + buffer = getUrl( SSLConnect::MobileInfo, header + data ); + } catch( std::runtime_error &e ) { + jsCall( "handleError", e.what() ); + jsCall( "setMobile", "", result ); + return; + } + if ( !buffer.size() ) + { + jsCall( "setMobile", "", result ); + return; + } + //qDebug() << buffer; + if ( !buffer.isEmpty() ) + { + QDomDocument doc; + if ( !doc.setContent( buffer ) ) + { + jsCall( "handleError", result ); + return; + } + QDomElement e = doc.documentElement(); + if ( !e.elementsByTagName( "ResponseStatus" ).size() ) + { + jsCall( "handleError", result ); + return; + } + MobileResult mRes = (MobileResult)e.elementsByTagName( "ResponseStatus" ).item(0).toElement().text().toInt(); + QString mResString, mNotice; + switch( mRes ) + { + case NoCert: mNotice = "mobileNoCert"; break; + case NotActive: mNotice = "mobileNotActive"; break; + case NoIDCert: mResString = "noIDCert"; break; + case InternalError: mResString = "mobileInternalError"; break; + case InterfaceNotReady: mResString = "mobileInterfaceNotReady"; break; + case OK: + default: break; + } + if ( !mResString.isEmpty() ) + { + jsCall( "handleError", mResString ); + return; + } + if ( !mNotice.isEmpty() ) + { + jsCall( "handleNotice", mNotice ); + return; + } + mResString = QString( "%1;%2;%3;%4" ) + .arg( e.elementsByTagName( "MSISDN" ).item(0).toElement().text() ) + .arg( e.elementsByTagName( "Operator" ).item(0).toElement().text() ) + .arg( e.elementsByTagName( "Status" ).item(0).toElement().text() ) + .arg( e.elementsByTagName( "URL" ).item(0).toElement().text() ); + jsCall( "setMobile", mResString ); + } +} + +void JsExtender::httpRequestFinished( int, bool error ) +{ + if ( error) + qDebug() << "Download failed: " << m_http.errorString(); + + QByteArray result = m_http.readAll(); +} + +void JsExtender::showSettings() +{ (new SettingsDialog( m_mainWindow ) )->show(); } + +void JsExtender::showLoading( const QString &str ) +{ + bool wide = (str.size() > 20); + if ( !m_loading ) + { + m_loading = new QLabel( m_mainWindow ); + m_loading->setStyleSheet( "background-color: rgba(255,255,255,200); border: 1px solid #cddbeb; border-radius: 5px;" + "color: #509b00; font-weight: bold; font-family: Arial; font-size: 18px;" ); + m_loading->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); + } + m_loading->setFixedSize( wide ? 300 : 250, 100 ); + m_loading->move( wide ? 155 : 180, 305 ); + m_loading->setText( str ); + m_loading->show(); + QCoreApplication::processEvents(); +} + +void JsExtender::closeLoading() +{ + if ( m_loading ) + m_loading->close(); +} + +void JsExtender::showMessage( const QString &type, const QString &message, const QString &title ) +{ + if ( type == "warning" ) + QMessageBox::warning( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); + else if ( type == "error" ) + QMessageBox::critical( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); + else + QMessageBox::information( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); +} + +bool JsExtender::updateCertAllowed() +{ + QMessageBox::StandardButton b = QMessageBox::warning( m_mainWindow, tr("Certificate update"), + tr("For updating certificates please close all programs which are interacting with smartcard " + "(qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)
" + "After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.
" + "Do you want to continue?"), + QMessageBox::Yes|QMessageBox::No, QMessageBox::No ); + if( b == QMessageBox::No ) + return false; + bool result = false; + try { + CertUpdate *c = new CertUpdate( m_mainWindow->cardManager()->activeReaderNum(), this ); + result = c->checkUpdateAllowed(); + } catch ( std::runtime_error &e ) { + QMessageBox::warning( m_mainWindow, tr( "Certificate update" ), tr("Certificate update failed:
%1").arg( QString::fromUtf8( e.what() ) ), QMessageBox::Ok ); + } + return result; +} + +bool JsExtender::updateCert() +{ + bool result = false; + try { + CertUpdate *c = new CertUpdate( m_mainWindow->cardManager()->activeReaderNum(), this ); + if ( c->checkUpdateAllowed() && m_mainWindow->eidCard()->m_authCert ) + { + c->startUpdate(); + result = true; + } + } catch ( std::runtime_error &e ) { + QMessageBox::warning( m_mainWindow, tr( "Certificate update" ), tr("Certificate update failed: %1").arg( QString::fromUtf8( e.what() ) ), QMessageBox::Ok ); + } + return result; +} diff -Nru qesteidutil-0.3.1/src/jsextender.h qesteidutil-0.3.1/src/jsextender.h --- qesteidutil-0.3.1/src/jsextender.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/jsextender.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "../common/sslConnect.h" + +#include +#include +#include +#include +#include +#include + +class MainWindow; +class SettingsDialog; + +class JsExtender : public QObject +{ + Q_OBJECT + +public: + enum MobileResult { + OK = 0, + NoCert = 1, + NotActive = 2, + NoIDCert = 3, + InternalError = 100, + InterfaceNotReady = 101 + }; + JsExtender( MainWindow* ); + ~JsExtender(); + void registerObject( const QString &name, QObject *object ); + +private: + MainWindow *m_mainWindow; + QMap m_registeredObjects; + QString m_tempFile; + QXmlStreamReader xml; + QString m_locale; + QDateTime m_dateTime; + QLabel *m_loading; + QByteArray getUrl( SSLConnect::RequestType, const QString &def ); + QString pin; + QString activeDocument; + QHttp m_http; + +public slots: + void setLanguage( const QString &lang ); + void javaScriptWindowObjectCleared(); + QVariant jsCall( const QString &function, int argument ); + QVariant jsCall( const QString &function, const QString &argument ); + QVariant jsCall( const QString &function, const QString &argument, const QString &argument2 ); + QString checkPin(); + void openUrl( const QString &url ); + + void loadEmails(); + void activateEmail( const QString &email ); + QString readEmailAddresses(); + QString readForwards(); + + void loadPicture(); + void savePicture(); + + QString locale() { return m_locale; } + void showSettings(); + + void showLoading( const QString & ); + void closeLoading(); + + void getMidStatus(); + void httpRequestFinished( int, bool error ); + + void showMessage( const QString &type, const QString &message, const QString &title = "" ); + + bool updateCertAllowed(); + bool updateCert(); +}; diff -Nru qesteidutil-0.3.1/src/main.cpp qesteidutil-0.3.1/src/main.cpp --- qesteidutil-0.3.1/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/main.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include + +#include "mainwindow.h" +#include "version.h" + +int main(int argc, char *argv[]) +{ + QtSingleApplication app(argc, argv); + app.setApplicationName( APP ); + app.setApplicationVersion( VER_STR( FILE_VER_DOT ) ); + app.setOrganizationDomain( DOMAINURL ); + app.setOrganizationName( ORG ); + + if( app.isRunning() ) + { + app.activateWindow(); + return 0; + } + + SSL_load_error_strings(); + SSL_library_init(); + + MainWindow w; + app.setActivationWindow( &w ); + w.show(); + return app.exec(); +} diff -Nru qesteidutil-0.3.1/src/mainwindow.cpp qesteidutil-0.3.1/src/mainwindow.cpp --- qesteidutil-0.3.1/src/mainwindow.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/mainwindow.cpp 2010-10-19 16:39:28.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "mainwindow.h" + +#include "jsextender.h" +#include "jscardmanager.h" + +#include +#include +#include +#include + +MainWindow::MainWindow( QWidget *parent ) +: QWebView( parent ) +{ + setWindowFlags( Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowTitleHint ); +#if QT_VERSION >= 0x040500 + setWindowFlags( windowFlags() | Qt::WindowCloseButtonHint ); +#else + setWindowFlags( windowFlags() | Qt::WindowSystemMenuHint ); +#endif + page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff ); + page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff ); + setContextMenuPolicy(Qt::PreventContextMenu); + setWindowIcon( QIcon( ":/html/images/id_icon_48x48.png" ) ); + setFixedSize( 585, 535 ); + + appTranslator = new QTranslator( this ); + qtTranslator = new QTranslator( this ); + commonTranslator = new QTranslator( this ); + QApplication::instance()->installTranslator( appTranslator ); + QApplication::instance()->installTranslator( qtTranslator ); + QApplication::instance()->installTranslator( commonTranslator ); + + m_jsExtender = new JsExtender( this ); + + jsEsteidCard = new JsEsteidCard( this ); + jsCardManager = new JsCardManager( jsEsteidCard ); + + connect(jsCardManager, SIGNAL(cardEvent(QString, int)), + m_jsExtender, SLOT(jsCall(QString, int))); + connect(jsCardManager, SIGNAL(cardError(QString, QString)), + m_jsExtender, SLOT(jsCall(QString, QString))); + connect(jsEsteidCard, SIGNAL(cardError(QString, QString)), + m_jsExtender, SLOT(jsCall(QString, QString))); + + m_jsExtender->registerObject("esteidData", jsEsteidCard); + m_jsExtender->registerObject("cardManager", jsCardManager); + +#if defined(Q_OS_MAC) + QMenuBar *bar = new QMenuBar; + QMenu *menu = bar->addMenu( tr("&File") ); + QAction *pref = menu->addAction( tr("Settings"), m_jsExtender, SLOT(showSettings()) ); + QAction *close = menu->addAction( tr("Close"), qApp, SLOT(quit()) ); + pref->setMenuRole( QAction::PreferencesRole ); + close->setShortcut( Qt::CTRL + Qt::Key_W ); +#endif + + load(QUrl("qrc:/html/index.html")); +} + +void MainWindow::retranslate( const QString &lang ) +{ + appTranslator->load( ":/translations/" + lang ); + qtTranslator->load( ":/translations/qt_" + lang ); + commonTranslator->load( ":/translations/common_" + lang ); + setWindowTitle(QApplication::translate("MainWindow", "ID-card utility", 0, QApplication::UnicodeUTF8)); +} diff -Nru qesteidutil-0.3.1/src/mainwindow.h qesteidutil-0.3.1/src/mainwindow.h --- qesteidutil-0.3.1/src/mainwindow.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/mainwindow.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include + +class JsCardManager; +class JsEsteidCard; +class JsExtender; +class QTranslator; + +class MainWindow : public QWebView +{ + Q_OBJECT + +public: + MainWindow( QWidget *parent = 0 ); + JsEsteidCard* eidCard() { return jsEsteidCard; } + JsCardManager* cardManager() { return jsCardManager; } + void retranslate( const QString &lang ); + +private: + JsExtender *m_jsExtender; + JsCardManager *jsCardManager; + JsEsteidCard *jsEsteidCard; + QTranslator *appTranslator, *qtTranslator, *commonTranslator; +}; diff -Nru qesteidutil-0.3.1/src/qesteidutil.qrc qesteidutil-0.3.1/src/qesteidutil.qrc --- qesteidutil-0.3.1/src/qesteidutil.qrc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/qesteidutil.qrc 2009-07-12 22:27:38.000000000 +0000 @@ -0,0 +1,19 @@ + + + html/index.html + html/lang.js + html/script.js + html/style.css + html/images/button.png + html/images/buttonSelected.png + html/images/linegray.png + html/images/logo.png + html/images/topLogo.png + html/images/logotext.png + html/images/id_icon_48x48.png + html/images/flag_estonian.png + html/images/flag_english.png + html/images/flag_russian.png + ../common/images/ico_stamp_blue_75.png + + diff -Nru qesteidutil-0.3.1/src/qesteidutil.rc qesteidutil-0.3.1/src/qesteidutil.rc --- qesteidutil-0.3.1/src/qesteidutil.rc 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/qesteidutil.rc 2009-09-23 08:53:23.000000000 +0000 @@ -0,0 +1,40 @@ +#ifndef Q_CC_BOR +# if defined(UNDER_CE) && UNDER_CE >= 400 +# include +# else +# include +# endif +#endif + +#include "version.h" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION FILE_VER +PRODUCTVERSION FILE_VER +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#else +FILEFLAGS 0x0L +#endif +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE VFT_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", ORG "\0" + VALUE "FileDescription", APP "\0" + VALUE "FileVersion", VER_STR(FILE_VER) "\0" + VALUE "InternalName", "QEstEidUtil\0" + VALUE "OriginalFilename", "QEstEidUtil.exe\0" + VALUE "ProductName", APP "\0" + VALUE "ProductVersion", VER_STR(FILE_VER) "\0" + END + END +END +/* End of Version info */ + +IDI_ICON1 ICON DISCARDABLE "html/images/id_icon_48x48.ico" diff -Nru qesteidutil-0.3.1/src/SettingsDialog.cpp qesteidutil-0.3.1/src/SettingsDialog.cpp --- qesteidutil-0.3.1/src/SettingsDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/SettingsDialog.cpp 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "SettingsDialog.h" +#include "common/Settings.h" + +#include + +SettingsDialog::SettingsDialog( QWidget *parent ) +: QDialog( parent ) +{ + setupUi( this ); + setAttribute( Qt::WA_DeleteOnClose, true ); + + Settings s; + s.beginGroup( "Util" ); + sessionTime->setValue( s.value( "sessionTime", 0 ).toInt() ); + +#ifdef WIN32 + updateInterval->addItem( tr("Once a day"), "-daily" ); + updateInterval->addItem( tr("Once a week"), "-weekly" ); + updateInterval->addItem( tr("Once a month"), "-monthly" ); + updateInterval->addItem( tr("Never"), "-remove" ); + int interval = updateInterval->findText( s.value( "updateInterval" ).toString() ); + if ( interval == -1 ) + interval = 0; + updateInterval->setCurrentIndex( interval ); + autoUpdate->setChecked( s.value( "autoUpdate", true ).toBool() ); +#else + updateInterval->hide(); + updateIntervalLabel->hide(); + autoUpdate->hide(); + autoUpdateLabel->hide(); +#endif +} + +void SettingsDialog::accept() +{ + Settings s; + s.beginGroup( "Util" ); + s.setValue( "sessionTime", sessionTime->value() ); + + s.setValue( "updateInterval", updateInterval->currentText() ); + s.setValue( "autoUpdate", autoUpdate->isChecked() ); + +#ifdef WIN32 + QStringList list; + if ( !autoUpdate->isChecked() ) + list << "-remove"; + else + list << updateInterval->itemData( updateInterval->currentIndex() ).toString(); + QProcess::startDetached( "id-updater.exe", list ); +#endif + + done( 1 ); +} diff -Nru qesteidutil-0.3.1/src/SettingsDialog.h qesteidutil-0.3.1/src/SettingsDialog.h --- qesteidutil-0.3.1/src/SettingsDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/SettingsDialog.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "ui_SettingsDialog.h" + +class SettingsDialog: public QDialog, private Ui::SettingsDialog +{ + Q_OBJECT +public: + SettingsDialog( QWidget *parent = 0 ); + +public slots: + void accept(); +}; diff -Nru qesteidutil-0.3.1/src/translations/en.ts qesteidutil-0.3.1/src/translations/en.ts --- qesteidutil-0.3.1/src/translations/en.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/translations/en.ts 2011-05-26 08:56:30.000000000 +0000 @@ -0,0 +1,193 @@ + + + + + CertUpdate + + update not allowed! + update not allowed! + + + Check internet connection + Check internet connection + + + Server sai vale arvu baite, samm: %1 + + + + Serveri töös tekkisid vead, samm: %1 + + + + Kaardi vastuse parsimisel tekkis viga, samm: %1 + Failed to parse responce from card, step: %1 + + + Sertifitseerimiskeskus ei vasta, samm: %1 + + + + + DiagnosticsDialog + + Diagnostics + Diagnostics + + + ID-card utility version: + ID-card utility version: + + + Library paths: + Library paths: + + + Card readers + Card readers + + + ID - %1 + ID - %1 + + + Error reading card data: + Error reading card data: + + + Save as + Save as + + + Text files (*.txt) + Text files (*.txt) + + + Error occurred + Error occurred + + + Failed write to file! + Failed write to file! + + + OS: + OS: + + + Libraries + Libraries + + + Smart Card service status: + Smart Card service status: + + + PCSC service status: + PCSC service status: + + + Running + Running + + + Not running + Not running + + + %1 - failed to get version info + %1 - failed to get version info + + + + JsExtender + + - %1 (active) + - %1 (active) + + + - %1 (not active) + - %1 (not active) + + + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + + + Save picture + Save picture + + + Certificate update + Certificate update + + + Certificate update failed: %1 + Certificate update failed: %1 + + + Certificate update failed:<br />%1 + Certificate update failed:<br />%1 + + + For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? + For updating certificates please close all programs which are interacting with smartcard (Client, Crypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? + + + + MainWindow + + ID-card utility + ID-card utility + + + &File + &File + + + Settings + Settings + + + Close + Close + + + + SettingsDialog + + Settings + Settings + + + Check updates + Check updates + + + Update automatically + Update automatically + + + Once a day + Once a day + + + Once a week + Once a week + + + Once a month + Once a month + + + Never + Never + + + Save PIN1 for specified period in minutes +0 - always ask + Save PIN1 for specified period in minutes +0 - always ask + + + diff -Nru qesteidutil-0.3.1/src/translations/et.ts qesteidutil-0.3.1/src/translations/et.ts --- qesteidutil-0.3.1/src/translations/et.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/translations/et.ts 2011-05-26 08:56:30.000000000 +0000 @@ -0,0 +1,193 @@ + + + + + CertUpdate + + update not allowed! + uuendamine ei ole lubatud! + + + Check internet connection + kontrollige interneti ühendust + + + Server sai vale arvu baite, samm: %1 + Server sai vale arvu baite, samm: %1 + + + Serveri töös tekkisid vead, samm: %1 + Serveri töös tekkisid vead, samm: %1 + + + Kaardi vastuse parsimisel tekkis viga, samm: %1 + Kaardi vastuse parsimisel tekkis viga, samm: %1 + + + Sertifitseerimiskeskus ei vasta, samm: %1 + Sertifitseerimiskeskus ei vasta, samm: %1 + + + + DiagnosticsDialog + + Diagnostics + Diagnostika + + + ID-card utility version: + ID-kaardi haldusvahendi versioon: + + + Library paths: + Teegi otsing: + + + Card readers + Kaardilugejad + + + ID - %1 + ID - %1 + + + Error reading card data: + Kaardilt andmete lugemine ebaõnnestus: + + + Save as + Salvesta + + + Text files (*.txt) + Teksti failid (*.txt) + + + Error occurred + Tekkis viga + + + Failed write to file! + Faili kirjutamine ebaõnnestus! + + + OS: + Operatsioonisüsteem: + + + Libraries + Teegid + + + Smart Card service status: + Smart Card teenuse staatus: + + + PCSC service status: + PCSC teenuse staatus: + + + Running + Töötab + + + Not running + Ei tööta + + + %1 - failed to get version info + %1 - viga versiooniinfo lugemisel + + + + JsExtender + + - %1 (active) + - %1 (aktiivne) + + + - %1 (not active) + - %1 (mitteaktiivne) + + + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + + + Save picture + Salvesta pilt + + + Certificate update + Sertifikaatide uuendus + + + Certificate update failed: %1 + Sertifikaatide uuendamine ebaõnnestus: %1 + + + Certificate update failed:<br />%1 + Sertifikaatide uuendamine ebaõnnestus:<br />%1 + + + For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? + Sertifikaatite uuendamiseks palun sulgege kõik rakendused, mis kasutavad ID-kaarti (Klient, Krüpto, Firefox, Safari, Internet Explorer...)<br />Pärast sertifikaatide uuendamist ei ole võimalik enam dekrüpteerida vana sertifikaadiga krüpteeritud dokumente!< br />Kas soovite jätkata sertifikaatide uuendamisega? + + + + MainWindow + + ID-card utility + ID-kaardi haldusvahend + + + &File + &Fail + + + Settings + Seaded + + + Close + Sulge + + + + SettingsDialog + + Settings + Seaded + + + Check updates + Kontrolli uuendusi + + + Update automatically + Uuenda automaatselt + + + Once a day + Kord päevas + + + Once a week + Kord nädalas + + + Once a month + Kord kuus + + + Never + Mitte kunagi + + + Save PIN1 for specified period in minutes +0 - always ask + Salvesta PIN1 määratud minutiteks +0 - küsi iga kord + + + diff -Nru qesteidutil-0.3.1/src/translations/ru.ts qesteidutil-0.3.1/src/translations/ru.ts --- qesteidutil-0.3.1/src/translations/ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/translations/ru.ts 2011-05-26 08:56:30.000000000 +0000 @@ -0,0 +1,193 @@ + + + + + CertUpdate + + update not allowed! + oбновление не разрешено! + + + Check internet connection + Проверте подключение к интернету + + + Server sai vale arvu baite, samm: %1 + Сервер получил неправильное количество байтов, шаг: %1 + + + Serveri töös tekkisid vead, samm: %1 + В работе сервера произошла ошибка, шаг: %1 + + + Kaardi vastuse parsimisel tekkis viga, samm: %1 + + + + Sertifitseerimiskeskus ei vasta, samm: %1 + Центр сертифицирования не отвечает, шаг: %1 + + + + DiagnosticsDialog + + ID-card utility version: + Версия: + + + OS: + Оп. система: + + + Library paths: + Поиск по тэгам: + + + Libraries + Тэги + + + Smart Card service status: + Статус Smart Card сервиса: + + + PCSC service status: + Статус PCSC сервиса: + + + Running + Работает + + + Not running + Не работает + + + Card readers + Считыватели карт + + + %1 - failed to get version info + %1 - ошибка при чтении версии + + + ID - %1 + ID - %1 + + + Error reading card data: + Ошибка при чтении с карты: + + + Save as + Сохранить + + + Text files (*.txt) + Текстовые файлы (*.txt) + + + Error occurred + Возникла ошибка + + + Failed write to file! + Запись файла неудачна! + + + Diagnostics + Диагностика + + + + JsExtender + + - %1 (active) + - %1 (активно) + + + - %1 (not active) + - %1 (неактивно) + + + Save picture + Cохранить картинку + + + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) + + + Certificate update + Обновление сертификата + + + Certificate update failed: %1 + Неудачное обновление сертификата: %1 + + + Certificate update failed:<br />%1 + Неудачное обновление сертификата:<br />%1 + + + For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? + Для обновления сертификата пожалуйста закройте все приложения, которые используют ID-карту (Клиент, Crypto, Firefox, Safari, Internet Explorer...)<br />После обновления сертификатов шифровка документов будет невозможна!<br />Хотите продолжить? + + + + MainWindow + + ID-card utility + Oбсуживание ID-карты + + + &File + &Файл + + + Settings + Настройки + + + Close + Закрыть + + + + SettingsDialog + + Settings + Настройки + + + Save PIN1 for specified period in minutes +0 - always ask + Сохранять PIN1 на обозначенный период в минутах +0 - всегда спрашивать + + + Check updates + Проверить на обновления + + + Update automatically + Обновлять автоматически + + + Once a day + Раз в день + + + Once a week + Раз в неделю + + + Once a month + Раз в месяц + + + Never + Никогда + + + diff -Nru qesteidutil-0.3.1/src/translations/tr.qrc.cmake qesteidutil-0.3.1/src/translations/tr.qrc.cmake --- qesteidutil-0.3.1/src/translations/tr.qrc.cmake 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/translations/tr.qrc.cmake 2009-12-29 13:11:47.000000000 +0000 @@ -0,0 +1,7 @@ + + + @QM_DIR@/en.qm + @QM_DIR@/et.qm + @QM_DIR@/ru.qm + + diff -Nru qesteidutil-0.3.1/src/ui/DiagnosticsDialog.ui qesteidutil-0.3.1/src/ui/DiagnosticsDialog.ui --- qesteidutil-0.3.1/src/ui/DiagnosticsDialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/ui/DiagnosticsDialog.ui 2009-05-25 00:31:14.000000000 +0000 @@ -0,0 +1,95 @@ + + + DiagnosticsDialog + + + + 0 + 0 + 400 + 300 + + + + + 400 + 300 + + + + + 400 + 300 + + + + Diagnostics + + + #DiagnosticsDialog { background: #F5F5F5; } + +QPushButton { height: 25px; border-radius: 3px; font-family: Arial; font-size: 12px; width: 80px; border: 1px solid #1a4b79; color: #ffffff; background-image: url(:/html/images/button.png); } +QPushButton::hover, QPushButton::focus { background-image: url(:/html/images/buttonSelected.png); border: 1px solid #ce911b; color: #00355f } + + + + + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Save + + + + + + + + + + + buttonBox + rejected() + DiagnosticsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + buttonBox + accepted() + DiagnosticsDialog + save() + + + 248 + 254 + + + 157 + 274 + + + + + + save() + + diff -Nru qesteidutil-0.3.1/src/ui/SettingsDialog.ui qesteidutil-0.3.1/src/ui/SettingsDialog.ui --- qesteidutil-0.3.1/src/ui/SettingsDialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/ui/SettingsDialog.ui 2009-10-31 11:02:10.000000000 +0000 @@ -0,0 +1,157 @@ + + + SettingsDialog + + + + 0 + 0 + 398 + 155 + + + + Settings + + + #SettingsDialog { background: #F5F5F5; } +QLabel { color: #355670; font-family: Arial; font-size: 14px; } +QSpinBox { border: 1px solid #cddbeb; } + +QPushButton { height: 25px; border-radius: 3px; font-family: Arial; font-size: 12px; width: 80px; border: 1px solid #1a4b79; color: #ffffff; background-image: url(:/html/images/button.png); } +QPushButton::hover, QPushButton::focus { background-image: url(:/html/images/buttonSelected.png); border: 1px solid #ce911b; color: #00355f } + + + + + + + + Save PIN1 for specified period in minutes +0 - always ask + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Check updates + + + + + + + Qt::Vertical + + + + 20 + 56 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Save + + + + + + + Update automatically + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + buttonBox + accepted() + SettingsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + SettingsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru qesteidutil-0.3.1/src/version.h qesteidutil-0.3.1/src/version.h --- qesteidutil-0.3.1/src/version.h 1970-01-01 00:00:00.000000000 +0000 +++ qesteidutil-0.3.1/src/version.h 2010-03-25 13:28:17.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * QEstEidUtil + * + * Copyright (C) 2009-2010 Estonian Informatics Centre + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#define MAJOR_VER 0 +#define MINOR_VER 1 +#define RELEASE_VER 0 + +#ifndef BUILD_VER +#define BUILD_VER 0 +#endif + +#define FILE_VER MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER +#define FILE_VER_DOT MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER +#define VER_STR_HELPER(x) #x +#define VER_STR(x) VER_STR_HELPER(x) + +#define ORG "Estonian ID Card" +#define APP "ID kaardi haldusvahend" +#define DOMAINURL "eesti.ee" diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/AUTHORS qesteidutil-0.3.1/=unpacked-tar1=/AUTHORS --- qesteidutil-0.3.1/=unpacked-tar1=/AUTHORS 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/AUTHORS 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -Jargo Kõster -Raul Metsma -Kalev Lember diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/build.bat qesteidutil-0.3.1/=unpacked-tar1=/build.bat --- qesteidutil-0.3.1/=unpacked-tar1=/build.bat 2009-04-25 19:54:10.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/build.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -@echo off - -set target_dir=target - -IF EXIST build GOTO :BuildExists -md build -cd build -cmake .. -G "NMake Makefiles" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_INSTALL_PREFIX="" -nmake -nmake install DESTDIR="%target_dir%" - -goto :EOF - -:BuildExists -echo Directory "build" already exists, quitting. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/COPYING-CMAKE-SCRIPTS qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/COPYING-CMAKE-SCRIPTS --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/COPYING-CMAKE-SCRIPTS 2010-06-21 15:41:48.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindCppUnit.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindCppUnit.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindCppUnit.cmake 2009-03-20 18:50:08.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindCppUnit.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find cppunit -# Find the native cppunit includes and library -# -# CPPUNIT_INCLUDE_DIR - where to find cppunit/Test.h, etc. -# CPPUNIT_LIBRARIES - List of libraries when using cppunit. -# CPPUNIT_FOUND - True if cppunit found. - - -IF (CPPUNIT_INCLUDE_DIR) - # Already in cache, be silent - SET(CPPUNIT_FIND_QUIETLY TRUE) -ENDIF (CPPUNIT_INCLUDE_DIR) - -FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h) - -SET(CPPUNIT_NAMES cppunit) -FIND_LIBRARY(CPPUNIT_LIBRARY NAMES ${CPPUNIT_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit DEFAULT_MSG CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR) - -IF(CPPUNIT_FOUND) - SET( CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ) -ELSE(CPPUNIT_FOUND) - SET( CPPUNIT_LIBRARIES ) -ENDIF(CPPUNIT_FOUND) - -MARK_AS_ADVANCED( CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindGecko.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindGecko.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindGecko.cmake 2010-01-29 18:47:14.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindGecko.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -# - Try to find Gecko -# Once done this will define -# -# GECKO_FOUND - System has Gecko -# GECKO_INCLUDE_DIR - The Gecko include directory -# GECKO_IDL_DIR - The Gecko idl include directory -# GECKO_DEFINITIONS - Compiler switches required for using Gecko -# GECKO_XPIDL_EXECUTABLE - The idl compiler xpidl coming with Gecko - - -IF (GECKO_INCLUDE_DIR AND GECKO_IDL_DIR AND GECKO_XPIDL_EXECUTABLE) - # in cache already - SET(Gecko_FIND_QUIETLY TRUE) -ENDIF (GECKO_INCLUDE_DIR AND GECKO_IDL_DIR AND GECKO_XPIDL_EXECUTABLE) - -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_LIBXUL libxul) - SET(GECKO_DEFINITIONS ${PC_LIBXUL_CFLAGS_OTHER}) - - # Use FindPkgConfig internal function _pkgconfig_invoke to get sdkdir - _pkgconfig_invoke(libxul "PC_LIBXUL" SDKDIR "" --variable=sdkdir) -ENDIF (NOT WIN32) - -IF (MSVC) - SET(GECKO_DEFINITIONS "/Zc:wchar_t-") -ENDIF (MSVC) - -SET(XULRUNNER_SDK_SEARCH_DIRS - /build/Win32/xulrunner-sdk - ${PROJECT_SOURCE_DIR}/xulrunner-sdk - ${PROJECT_SOURCE_DIR}/../xulrunner-sdk - ) - -FIND_PATH(GECKO_STABLE_INCLUDE_DIR nsISupports.h - HINTS - ${PC_LIBXUL_INCLUDE_DIRS} - ${XULRUNNER_SDK_SEARCH_DIRS} - PATH_SUFFIXES sdk/include - ) - -FIND_PATH(GECKO_NSPR4_INCLUDE_DIR prcpucfg.h - HINTS - ${PC_LIBXUL_INCLUDE_DIRS} - ${XULRUNNER_SDK_SEARCH_DIRS} - PATH_SUFFIXES sdk/include nspr4 - ) - -FIND_PATH(GECKO_XPCOM_INCLUDE_DIR xpcom-config.h - HINTS - ${PC_LIBXUL_SDKDIR} - ${XULRUNNER_SDK_SEARCH_DIRS} - PATH_SUFFIXES sdk/include - ) - -SET(GECKO_INCLUDE_DIR ${GECKO_STABLE_INCLUDE_DIR} ${GECKO_NSPR4_INCLUDE_DIR} ${GECKO_XPCOM_INCLUDE_DIR}) -LIST(REMOVE_DUPLICATES GECKO_INCLUDE_DIR) - - -FIND_PATH(GECKO_IDL_DIR nsIDOMWindow.idl - HINTS - ${PC_LIBXUL_SDKDIR} - ${XULRUNNER_SDK_SEARCH_DIRS} - PATH_SUFFIXES idl - ) - -FIND_PROGRAM(GECKO_XPIDL_EXECUTABLE xpidl - HINTS - ${PC_LIBXUL_LIBDIR} - ${PC_LIBXUL_SDKDIR} - ${XULRUNNER_SDK_SEARCH_DIRS} - PATH_SUFFIXES bin - ) - -INCLUDE(FindPackageHandleStandardArgs) - -# handle the QUIETLY and REQUIRED arguments and set GECKO_FOUND to TRUE if -# all listed variables are TRUE -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gecko DEFAULT_MSG GECKO_INCLUDE_DIR GECKO_IDL_DIR GECKO_XPIDL_EXECUTABLE) - -MARK_AS_ADVANCED(GECKO_INCLUDE_DIR GECKO_IDL_DIR GECKO_XPIDL_EXECUTABLE) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindIconv.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindIconv.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindIconv.cmake 2009-05-20 10:32:06.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindIconv.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -# /kde/kdesupport/strigi/cmake -# - Try to find Iconv -# Once done this will define -# -# ICONV_FOUND - system has Iconv -# ICONV_INCLUDE_DIR - the Iconv include directory -# ICONV_LIBRARIES - Link these to use Iconv -# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const -# -include(CheckCXXSourceCompiles) - -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -FIND_PATH(ICONV_INCLUDE_DIR iconv.h) - -FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) - -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) -set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) -IF(ICONV_FOUND) - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0; - } -" ICONV_SECOND_ARGUMENT_IS_CONST ) -ENDIF(ICONV_FOUND) -set(CMAKE_REQUIRED_INCLUDES) -set(CMAKE_REQUIRED_LIBRARIES) - -IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) -ENDIF(ICONV_FOUND) - -MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST -) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLdap.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLdap.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLdap.cmake 2009-12-02 16:26:10.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLdap.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -# - Try to find the LDAP client libraries -# Once done this will define -# -# LDAP_FOUND - system has libldap -# LDAP_INCLUDE_DIR - the ldap include directory -# LDAP_LIBRARIES - libldap + liblber (if found) library -# LBER_LIBRARIES - liblber library - -if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) - # Already in cache, be silent - set(Ldap_FIND_QUIETLY TRUE) -endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) - -if(UNIX) - FIND_PATH(LDAP_INCLUDE_DIR ldap.h) - if(APPLE) - FIND_LIBRARY(LDAP_LIBRARIES NAMES LDAP - PATHS - /System/Library/Frameworks - /Library/Frameworks - ) - else(APPLE) - FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) - FIND_LIBRARY(LBER_LIBRARIES NAMES lber) - endif(APPLE) -else(UNIX) - FIND_PATH(LDAP_INCLUDE_DIR winldap.h) - FIND_LIBRARY(LDAP_LIBRARIES NAMES wldap32) -endif(UNIX) - -if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) - set(LDAP_FOUND TRUE) - if(LBER_LIBRARIES) - set(LDAP_LIBRARIES ${LDAP_LIBRARIES} ${LBER_LIBRARIES}) - endif(LBER_LIBRARIES) -endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) - -if(LDAP_FOUND) - if(NOT Ldap_FIND_QUIETLY) - message(STATUS "Found ldap: ${LDAP_LIBRARIES}") - endif(NOT Ldap_FIND_QUIETLY) -else(LDAP_FOUND) - if (Ldap_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find ldap") - endif (Ldap_FIND_REQUIRED) -endif(LDAP_FOUND) - -MARK_AS_ADVANCED(LDAP_INCLUDE_DIR LDAP_LIBRARIES LBER_LIBRARIES) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDoc.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDoc.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDoc.cmake 2009-06-08 11:36:43.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -# - Find LibDigiDoc -# Find the native LibDigiDoc includes and library -# -# LIBDIGIDOC_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. -# LIBDIGIDOC_LIBRARIES - List of libraries when using LibDigiDoc. -# LIBDIGIDOC_FOUND - True if LibDigiDoc found. - - -IF (LIBDIGIDOC_INCLUDE_DIR) - # Already in cache, be silent - SET(LIBDIGIDOC_FIND_QUIETLY TRUE) -ENDIF (LIBDIGIDOC_INCLUDE_DIR) - -FIND_PATH(LIBDIGIDOC_INCLUDE_DIR libdigidoc/DigiDocDefs.h) -FIND_LIBRARY(LIBDIGIDOC_LIBRARY NAMES digidoc) - -# handle the QUIETLY and REQUIRED arguments and set LIBDIGIDOC_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDigiDoc DEFAULT_MSG LIBDIGIDOC_LIBRARY LIBDIGIDOC_INCLUDE_DIR) - -IF(LIBDIGIDOC_FOUND) - SET( LIBDIGIDOC_LIBRARIES ${LIBDIGIDOC_LIBRARY} ) -ELSE(LIBDIGIDOC_FOUND) - SET( LIBDIGIDOC_LIBRARIES ) -ENDIF(LIBDIGIDOC_FOUND) - -MARK_AS_ADVANCED(LIBDIGIDOC_LIBRARY LIBDIGIDOC_INCLUDE_DIR) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDocpp.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDocpp.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDocpp.cmake 2009-10-21 16:56:37.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDigiDocpp.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find LibDigiDocpp -# Find the native LibDigiDocpp includes and library -# -# LIBDIGIDOCPP_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. -# LIBDIGIDOCPP_CONF - where is digidocpp.conf file -# LIBDIGIDOCPP_LIBRARIES - List of libraries when using LibDigiDocpp. -# LIBDIGIDOCPP_FOUND - True if LibDigiDocpp found. - - -IF (LIBDIGIDOCPP_INCLUDE_DIR) - # Already in cache, be silent - SET(LIBDIGIDOCPP_FIND_QUIETLY TRUE) -ENDIF (LIBDIGIDOCPP_INCLUDE_DIR) - -FIND_PATH(LIBDIGIDOCPP_INCLUDE_DIR digidocpp/BDoc.h /usr/include /usr/local/include) -FIND_FILE(LIBDIGIDOCPP_CONF digidocpp.conf /etc/digidocpp /usr/local/etc/digidocpp) -FIND_LIBRARY(LIBDIGIDOCPP_LIBRARY NAMES digidocpp) - -# handle the QUIETLY and REQUIRED arguments and set LIBDIGIDOCPP_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDigiDocpp DEFAULT_MSG LIBDIGIDOCPP_LIBRARY LIBDIGIDOCPP_INCLUDE_DIR) - -IF(LIBDIGIDOCPP_FOUND) - SET( LIBDIGIDOCPP_LIBRARIES ${LIBDIGIDOCPP_LIBRARY} ) -ELSE(LIBDIGIDOCPP_FOUND) - SET( LIBDIGIDOCPP_LIBRARIES ) -ENDIF(LIBDIGIDOCPP_FOUND) - -MARK_AS_ADVANCED(LIBDIGIDOCPP_LIBRARY LIBDIGIDOCPP_INCLUDE_DIR LIBDIGIDOCPP_CONF) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDL.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDL.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDL.cmake 2009-10-21 17:09:24.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibDL.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find libdl -# Find the native LIBDL includes and library -# -# LIBDL_INCLUDE_DIR - where to find dlfcn.h, etc. -# LIBDL_LIBRARIES - List of libraries when using libdl. -# LIBDL_FOUND - True if libdl found. - - -IF (LIBDL_INCLUDE_DIR) - # Already in cache, be silent - SET(LIBDL_FIND_QUIETLY TRUE) -ENDIF (LIBDL_INCLUDE_DIR) - -FIND_PATH(LIBDL_INCLUDE_DIR dlfcn.h) - -SET(LIBDL_NAMES dl libdl ltdl libltdl) -FIND_LIBRARY(LIBDL_LIBRARY NAMES ${LIBDL_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set LIBDL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDL DEFAULT_MSG LIBDL_LIBRARY LIBDL_INCLUDE_DIR) - -IF(LIBDL_FOUND) - SET( LIBDL_LIBRARIES ${LIBDL_LIBRARY} ) -ELSE(LIBDL_FOUND) - SET( LIBDL_LIBRARIES ) -ENDIF(LIBDL_FOUND) - -MARK_AS_ADVANCED( LIBDL_LIBRARY LIBDL_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibP11.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibP11.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibP11.cmake 2009-03-13 13:06:53.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibP11.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find libp11 -# Find the native LIBP11 includes and library -# -# LIBP11_INCLUDE_DIR - where to find libp11.h, etc. -# LIBP11_LIBRARIES - List of libraries when using libp11. -# LIBP11_FOUND - True if libp11 found. - - -IF (LIBP11_INCLUDE_DIR) - # Already in cache, be silent - SET(LIBP11_FIND_QUIETLY TRUE) -ENDIF (LIBP11_INCLUDE_DIR) - -FIND_PATH(LIBP11_INCLUDE_DIR libp11.h) - -SET(LIBP11_NAMES p11 libp11) -FIND_LIBRARY(LIBP11_LIBRARY NAMES ${LIBP11_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set LIBP11_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibP11 DEFAULT_MSG LIBP11_LIBRARY LIBP11_INCLUDE_DIR) - -IF(LIBP11_FOUND) - SET( LIBP11_LIBRARIES ${LIBP11_LIBRARY} ) -ELSE(LIBP11_FOUND) - SET( LIBP11_LIBRARIES ) -ENDIF(LIBP11_FOUND) - -MARK_AS_ADVANCED( LIBP11_LIBRARY LIBP11_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibPython.py qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibPython.py --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibPython.py 2010-06-21 15:31:45.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindLibPython.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - -# Copyright (c) 2007, Simon Edwards -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -import sys -import distutils.sysconfig - -print("exec_prefix:%s" % sys.exec_prefix) -print("short_version:%s" % sys.version[:3]) -print("long_version:%s" % sys.version.split()[0]) -print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) -print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindMiniZip.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindMiniZip.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindMiniZip.cmake 2009-12-06 17:43:46.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindMiniZip.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find minizip -# Find the native MINIZIP includes and library -# -# MINIZIP_INCLUDE_DIR - where to find minizip.h, etc. -# MINIZIP_LIBRARIES - List of libraries when using minizip. -# MINIZIP_FOUND - True if minizip found. - - -IF (MINIZIP_INCLUDE_DIR) - # Already in cache, be silent - SET(MINIZIP_FIND_QUIETLY TRUE) -ENDIF (MINIZIP_INCLUDE_DIR) - -FIND_PATH(MINIZIP_INCLUDE_DIR zip.h PATH_SUFFIXES minizip) - -SET(MINIZIP_NAMES minizip) -FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set MINIZIP_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MiniZip DEFAULT_MSG MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR) - -IF(MINIZIP_FOUND) - SET( MINIZIP_LIBRARIES ${MINIZIP_LIBRARY} ) -ELSE(MINIZIP_FOUND) - SET( MINIZIP_LIBRARIES ) -ENDIF(MINIZIP_FOUND) - -MARK_AS_ADVANCED( MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSC.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSC.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSC.cmake 2009-10-21 17:09:24.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSC.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -# - Find opensc -# Find the native OPENSC includes -# -# OPENSC_INCLUDE_DIR - where to find pkcs11.h -# OPENSC_FOUND - True if opensc found. - - -IF (OPENSC_INCLUDE_DIR) - # Already in cache, be silent - SET(OPENSC_FIND_QUIETLY TRUE) -ENDIF (OPENSC_INCLUDE_DIR) - -FIND_PATH(OPENSC_INCLUDE_DIR opensc/pkcs11.h) - -IF(WIN32 AND MSVC) - SET(OPENSC_NAMES libpkcs11MD libpkcs11) -ELSE(WIN32 AND MSVC) - SET(OPENSC_NAMES libpkcs11 libpkcs11MD) -ENDIF(WIN32 AND MSVC) - -FIND_LIBRARY(OPENSC_LIBRARY NAMES ${OPENSC_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set OPENSCSC_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSc DEFAULT_MSG OPENSC_LIBRARY OPENSC_INCLUDE_DIR) - -IF(OPENSC_FOUND) - SET( OPENSC_LIBRARIES ${OPENSC_LIBRARY} ) -ELSE(OPENSC_FOUND) - SET( OPENSC_LIBRARIES ) -ENDIF(OPENSC_FOUND) - -MARK_AS_ADVANCED( OPENSC_LIBRARY OPENSC_INCLUDE_DIR ) - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSSLCrypto.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSSLCrypto.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSSLCrypto.cmake 2009-03-13 13:06:53.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindOpenSSLCrypto.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -# - Find OpenSSL crypto library -# Find OpenSSL crypto includes and library -# -# OPENSSLCRYPTO_INCLUDE_DIR - OpenSSL include directory -# OPENSSLCRYPTO_LIBRARIES - OpenSSL crypto libraries -# OPENSSLCRYPTO_FOUND - True if OpenSSL crypto library was found - - -IF (OPENSSLCRYPTO_LIBRARIES) - # Already in cache, be silent. - SET(OPENSSLCRYPTO_FIND_QUIETLY TRUE) -ENDIF (OPENSSLCRYPTO_LIBRARIES) - -FIND_PATH(OPENSSLCRYPTO_INCLUDE_DIR openssl/ssl.h) - -IF(WIN32 AND MSVC) - SET(OPENSSLCRYPTO_NAMES libeay32MD eay libeay32) -ELSE(WIN32 AND MSVC) - SET(OPENSSLCRYPTO_NAMES crypto eay libeay32 libeay32MD) -ENDIF(WIN32 AND MSVC) - -FIND_LIBRARY(OPENSSLCRYPTO_LIBRARY NAMES ${OPENSSLCRYPTO_NAMES} ) - -# Handle the QUIETLY and REQUIRED arguments and set OPENSSLCRYPTO_FOUND to -# TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSSLCrypto DEFAULT_MSG OPENSSLCRYPTO_LIBRARY OPENSSLCRYPTO_INCLUDE_DIR) - -IF(OPENSSLCRYPTO_FOUND) - SET( OPENSSLCRYPTO_LIBRARIES ${OPENSSLCRYPTO_LIBRARY} ) -ELSE(OPENSSLCRYPTO_FOUND) - SET( OPENSSLCRYPTO_LIBRARIES ) -ENDIF(OPENSSLCRYPTO_FOUND) - -MARK_AS_ADVANCED( OPENSSLCRYPTO_LIBRARY OPENSSLCRYPTO_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPCSCLite.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPCSCLite.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPCSCLite.cmake 2009-10-21 16:47:02.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPCSCLite.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# - Find PCSC-Lite -# Find the native PCSC-Lite includes and library -# -# PCSCLITE_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc. -# PCSCLITE_LIBRARIES - List of libraries when using PCSC-Lite. -# PCSCLITE_FOUND - True if PCSC-Lite found. - - -IF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES) - # Already in cache, be silent - SET(PCSCLITE_FIND_QUIETLY TRUE) -ENDIF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES) - -IF (NOT WIN32) - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_PCSCLITE libpcsclite) -ENDIF (NOT WIN32) - -FIND_PATH(PCSCLITE_INCLUDE_DIR winscard.h - HINTS - ${PC_PCSCLITE_INCLUDEDIR} - ${PC_PCSCLITE_INCLUDE_DIRS} - ${PC_PCSCLITE_INCLUDE_DIRS}/PCSC - ) - -FIND_LIBRARY(PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC - HINTS - ${PC_PCSCLITE_LIBDIR} - ${PC_PCSCLITE_LIBRARY_DIRS} - ) - -# handle the QUIETLY and REQUIRED arguments and set PCSCLITE_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC-Lite DEFAULT_MSG PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR) - -IF(PCSCLITE_FOUND) - SET( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} ) -ELSE(PCSCLITE_FOUND) - SET( PCSCLITE_LIBRARIES ) -ENDIF(PCSCLITE_FOUND) - -MARK_AS_ADVANCED( PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPHPLibs.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPHPLibs.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPHPLibs.cmake 2010-06-21 15:32:18.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPHPLibs.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -# - FindPHPLibs -# Find PHP interpreter includes and library -# -# PHPLIBS_FOUND - True if PHP libs found -# PHP_VERSION_STRING - The version of PHP found (x.y.z) -# PHP_LIBRARIES - Libaries (standard variable) -# PHP_INCLUDE_DIRS - List of include directories -# PHP_INCLUDE_DIR - Main include directory prefix -# PHP_EXTENSION_DIR - Location of PHP extension DSO-s -# PHP_EXECUTABLE - PHP executable -# PHP_INSTALL_PREFIX - PHP install prefix, as reported - -INCLUDE(CMakeFindFrameworks) - -IF( NOT PHP_CONFIG_EXECUTABLE ) -FIND_PROGRAM(PHP_CONFIG_EXECUTABLE - NAMES php5-config php-config - ) -ENDIF( NOT PHP_CONFIG_EXECUTABLE ) - -MACRO(GET_FROM_PHP_CONFIG args variable) - EXECUTE_PROCESS(COMMAND ${PHP_CONFIG_EXECUTABLE} ${args} - OUTPUT_VARIABLE ${variable}) - STRING(REPLACE "\n" "" ${variable} "${${variable}}") -ENDMACRO(GET_FROM_PHP_CONFIG cmd variable) - -IF(PHP_CONFIG_EXECUTABLE) - GET_FROM_PHP_CONFIG("--version" PHP_VERSION_STRING) - GET_FROM_PHP_CONFIG("--php-binary" PHP_EXECUTABLE) - GET_FROM_PHP_CONFIG("--include-dir" PHP_INCLUDE_DIR) - GET_FROM_PHP_CONFIG("--extension-dir" PHP_EXTENSION_DIR) - GET_FROM_PHP_CONFIG("--includes" PHP_INCLUDE_DIRS) - GET_FROM_PHP_CONFIG("--prefix" PHP_INSTALL_PREFIX) - STRING(REPLACE "-I" "" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}") - STRING(REPLACE " " ";" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}") -ENDIF(PHP_CONFIG_EXECUTABLE) - -# FIXME: Maybe we need all this crap that php-config --libs puts out, -# however after building a few swig bindings without them, -# I seriously doubt it. -SET(PHP_LIBRARIES "") - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHPLibs DEFAULT_MSG PHP_INCLUDE_DIRS) - -MARK_AS_ADVANCED(PHP_LIBRARIES PHP_INCLUDE_DIRS) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPKCS11H.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPKCS11H.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPKCS11H.cmake 2009-06-22 20:49:35.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPKCS11H.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -# - Find PKCS11-Helper -# Find the native PKCS11-Helper includes and library -# -# PKCS11H_INCLUDE_DIR - where to find pkcs11.h, etc. -# PKCS11H_LIBRARIES - List of libraries when using PKCS11-Helper. -# PKCS11H_FOUND - True if PKCS11-Helper found. - - -IF (PKCS11H_INCLUDE_DIR AND PKCS11H_LIBRARIES) - # Already in cache, be silent - SET(PKCS11H_FIND_QUIETLY TRUE) -ENDIF (PKCS11H_INCLUDE_DIR AND PKCS11H_LIBRARIES) - -IF (NOT WIN32) - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_PKCSH11 libpkcs11-helper-1) -ENDIF (NOT WIN32) - -FIND_PATH(PKCS11H_INCLUDE_DIR pkcs11.h - HINTS - ${PC_PKCSH11_INCLUDEDIR} - ${PC_PKCSH11_INCLUDEDIR}/pkcs11-helper-1.0 - ${PC_PKCSH11_INCLUDE_DIRS} - ${PC_PKCSH11_INCLUDE_DIRS}/pkcs11-helper-1.0 - ) - -FIND_LIBRARY(PKCS11H_LIBRARY NAMES pkcs11-helper libpkcs11-helper - HINTS - ${PC_PKCS11H_LIBDIR} - ${PC_PKCS11H_LIBRARY_DIRS} - ) - -# handle the QUIETLY and REQUIRED arguments and set PKCS11H_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PKCS11H DEFAULT_MSG PKCS11H_INCLUDE_DIR PKCS11H_LIBRARY) - -IF(PKCS11H_FOUND) - SET( PKCS11H_LIBRARIES ${PKCS11H_LIBRARY} ) -ELSE(PKCS11H_FOUND) - SET( PKCS11H_LIBRARIES ) -ENDIF(PKCS11H_FOUND) - -MARK_AS_ADVANCED( PKCS11H_LIBRARY PKCS11H_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPythonLibrary.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPythonLibrary.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPythonLibrary.cmake 2010-06-21 15:31:45.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindPythonLibrary.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -# Find Python -# ~~~~~~~~~~~ -# Find the Python interpreter and related Python directories. -# -# This file defines the following variables: -# -# PYTHON_EXECUTABLE - The path and filename of the Python interpreter. -# -# PYTHON_SHORT_VERSION - The version of the Python interpreter found, -# excluding the patch version number. (e.g. 2.5 and not 2.5.1)) -# -# PYTHON_LONG_VERSION - The version of the Python interpreter found as a human -# readable string. -# -# PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory. -# -# PYTHON_INCLUDE_PATH - Directory holding the python.h include file. -# -# PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library. - -# Copyright (c) 2007, Simon Edwards -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - - -INCLUDE(CMakeFindFrameworks) - -if(EXISTS PYTHON_LIBRARY) - # Already in cache, be silent - set(PYTHONLIBRARY_FOUND TRUE) -else(EXISTS PYTHON_LIBRARY) - - FIND_PACKAGE(PythonInterp) - - if(PYTHONINTERP_FOUND) - - FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH}) - - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_lib_python_py} OUTPUT_VARIABLE python_config) - if(python_config) - STRING(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config}) - STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config}) - STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config}) - STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" PYTHON_INCLUDE_PATH ${python_config}) - if(NOT PYTHON_SITE_PACKAGES_DIR) - if(NOT PYTHON_LIBS_WITH_KDE_LIBS) - STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config}) - else(NOT PYTHON_LIBS_WITH_KDE_LIBS) - set(PYTHON_SITE_PACKAGES_DIR ${KDE4_LIB_INSTALL_DIR}/python${PYTHON_SHORT_VERSION}/site-packages) - endif(NOT PYTHON_LIBS_WITH_KDE_LIBS) - endif(NOT PYTHON_SITE_PACKAGES_DIR) - STRING(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) - set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) - if(WIN32) - STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) - endif(WIN32) - FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH) - set(PYTHONLIBRARY_FOUND TRUE) - endif(python_config) - - # adapted from cmake's builtin FindPythonLibs - if(APPLE) - CMAKE_FIND_FRAMEWORKS(Python) - set(PYTHON_FRAMEWORK_INCLUDES) - if(Python_FRAMEWORKS) - # If a framework has been selected for the include path, - # make sure "-framework" is used to link it. - if("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") - set(PYTHON_LIBRARY "") - set(PYTHON_DEBUG_LIBRARY "") - endif("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") - if(NOT PYTHON_LIBRARY) - set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) - endif(NOT PYTHON_LIBRARY) - set(PYTHONLIBRARY_FOUND TRUE) - endif(Python_FRAMEWORKS) - endif(APPLE) - endif(PYTHONINTERP_FOUND) - - if(PYTHONLIBRARY_FOUND) - set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) - if(NOT PYTHONLIBRARY_FIND_QUIETLY) - message(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}") - message(STATUS "Found Python version: ${PYTHON_LONG_VERSION}") - message(STATUS "Found Python library: ${PYTHON_LIBRARY}") - endif(NOT PYTHONLIBRARY_FIND_QUIETLY) - else(PYTHONLIBRARY_FOUND) - if(PYTHONLIBRARY_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Python") - endif(PYTHONLIBRARY_FIND_REQUIRED) - endif(PYTHONLIBRARY_FOUND) - -endif (EXISTS PYTHON_LIBRARY) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindSmartCardpp.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindSmartCardpp.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindSmartCardpp.cmake 2011-06-27 06:57:01.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindSmartCardpp.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -# - Find smartcardpp -# Find the native SMARTCARDPP includes and library -# -# SMARTCARDPP_INCLUDE_DIR - where to find smartcardpp.h, etc. -# SMARTCARDPP_LIBRARIES - List of libraries when using smartcardpp. -# SMARTCARDPP_FOUND - True if smartcardpp found. - - -IF (SMARTCARDPP_INCLUDE_DIR) - # Already in cache, be silent - SET(SMARTCARDPP_FIND_QUIETLY TRUE) -ENDIF (SMARTCARDPP_INCLUDE_DIR) - -IF (NOT WIN32) - # try using pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_SMARTCARDPP smartcardpp) -ENDIF (NOT WIN32) - -FIND_PATH(SMARTCARDPP_INCLUDE_DIR smartcardpp/smartcardpp.h - HINTS - ${PC_SMARTCARDPP_INCLUDEDIR} - ${PC_SMARTCARDPP_INCLUDE_DIRS} - ) - -SET(SMARTCARDPP_NAMES smartcardpp) -FIND_LIBRARY(SMARTCARDPP_LIBRARY NAMES ${SMARTCARDPP_NAMES} - HINTS - ${PC_SMARTCARDPP_LIBDIR} - ${PC_SMARTCARDPP_LIBRARY_DIRS} - ) - -# handle the QUIETLY and REQUIRED arguments and set SMARTCARDPP_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SmartCardpp DEFAULT_MSG SMARTCARDPP_LIBRARY SMARTCARDPP_INCLUDE_DIR) - -IF(SMARTCARDPP_FOUND) - SET( SMARTCARDPP_INCLUDE_DIRS ${SMARTCARDPP_INCLUDE_DIR} ${PC_SMARTCARDPP_INCLUDE_DIRS}) - SET( SMARTCARDPP_LIBRARIES ${SMARTCARDPP_LIBRARY} ) -ELSE(SMARTCARDPP_FOUND) - SET( SMARTCARDPP_INCLUDE_DIRS ) - SET( SMARTCARDPP_LIBRARIES ) -ENDIF(SMARTCARDPP_FOUND) - -MARK_AS_ADVANCED( SMARTCARDPP_LIBRARY SMARTCARDPP_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXercesC.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXercesC.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXercesC.cmake 2009-03-13 13:06:53.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXercesC.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find Xerces-C -# Find the Xerces-C includes and library -# -# XERCESC_INCLUDE_DIR - Where to find xercesc include sub-directory. -# XERCESC_LIBRARIES - List of libraries when using Xerces-C. -# XERCESC_FOUND - True if Xerces-C found. - - -IF (XERCESC_INCLUDE_DIR) - # Already in cache, be silent. - SET(XERCESC_FIND_QUIETLY TRUE) -ENDIF (XERCESC_INCLUDE_DIR) - -FIND_PATH(XERCESC_INCLUDE_DIR xercesc/dom/DOM.hpp) - -SET(XERCESC_NAMES xerces-c xerces-c_3 xerces-c_2) -FIND_LIBRARY(XERCESC_LIBRARY NAMES ${XERCESC_NAMES} ) - -# Handle the QUIETLY and REQUIRED arguments and set XERCESC_FOUND to -# TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC DEFAULT_MSG XERCESC_LIBRARY XERCESC_INCLUDE_DIR) - -IF(XERCESC_FOUND) - SET( XERCESC_LIBRARIES ${XERCESC_LIBRARY} ) -ELSE(XERCESC_FOUND) - SET( XERCESC_LIBRARIES ) -ENDIF(XERCESC_FOUND) - -MARK_AS_ADVANCED( XERCESC_LIBRARY XERCESC_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXmlSecurityC.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXmlSecurityC.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXmlSecurityC.cmake 2009-03-13 13:06:53.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXmlSecurityC.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# - Find XML-Security-C -# Find the XML-Security-C includes and library -# -# XMLSECURITYC_INCLUDE_DIR - Where to find xsec include sub-directory. -# XMLSECURITYC_LIBRARIES - List of libraries when using XML-Security-C. -# XMLSECURITYC_FOUND - True if XML-Security-C found. - - -IF (XMLSECURITYC_INCLUDE_DIR) - # Already in cache, be silent. - SET(XMLSECURITYC_FIND_QUIETLY TRUE) -ENDIF (XMLSECURITYC_INCLUDE_DIR) - -FIND_PATH(XMLSECURITYC_INCLUDE_DIR xsec/utils/XSECPlatformUtils.hpp) - -SET(XMLSECURITYC_NAMES xml-security-c xsec_1) -FIND_LIBRARY(XMLSECURITYC_LIBRARY NAMES ${XMLSECURITYC_NAMES} ) - -# Handle the QUIETLY and REQUIRED arguments and set XMLSECURITYC_FOUND to -# TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(XmlSecurityC DEFAULT_MSG XMLSECURITYC_LIBRARY XMLSECURITYC_INCLUDE_DIR) - -IF(XMLSECURITYC_FOUND) - SET( XMLSECURITYC_LIBRARIES ${XMLSECURITYC_LIBRARY} ) -ELSE(XMLSECURITYC_FOUND) - SET( XMLSECURITYC_LIBRARIES ) -ENDIF(XMLSECURITYC_FOUND) - -MARK_AS_ADVANCED( XMLSECURITYC_LIBRARY XMLSECURITYC_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXSD.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXSD.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXSD.cmake 2009-03-13 13:06:53.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/FindXSD.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# - Find XSD -# Find XSD includes and executable -# -# XSD_INCLUDE_DIR - Where to find xsd include sub-directory. -# XSD_EXECUTABLE - XSD compiler. -# XSD_FOUND - True if XSD found. - - -IF (XSD_INCLUDE_DIR) - # Already in cache, be silent. - SET(XSD_FIND_QUIETLY TRUE) -ENDIF (XSD_INCLUDE_DIR) - -FIND_PATH(XSD_INCLUDE_DIR xsd/cxx/parser/elements.hxx) - -SET(XSD_NAMES xsdcxx xsdgen xsd) -FIND_PROGRAM(XSD_EXECUTABLE NAMES ${XSD_NAMES} ) - -# Handle the QUIETLY and REQUIRED arguments and set XSD_FOUND to -# TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(XSD DEFAULT_MSG XSD_EXECUTABLE XSD_INCLUDE_DIR) - -MARK_AS_ADVANCED( XSD_EXECUTABLE XSD_INCLUDE_DIR ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/InstallSettings.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/InstallSettings.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/InstallSettings.cmake 2009-06-16 08:02:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/InstallSettings.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ -# Copyright (c) 2008 Kevin Krammer -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) - -if (WIN32) -# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files - - set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) - - set(EXEC_INSTALL_PREFIX "" ) # Base directory for executables and libraries - set(SHARE_INSTALL_PREFIX "share" ) # Base directory for files which go to share/ - set(BIN_INSTALL_DIR "bin" ) # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin) - set(SBIN_INSTALL_DIR "sbin" ) # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin) - - set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}" ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR}) - set(INCLUDE_INSTALL_DIR "include" ) # The subdirectory to the header prefix - - set(PLUGIN_INSTALL_DIR "lib${LIB_SUFFIX}/kde4" ) # "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4) - set(CONFIG_INSTALL_DIR "share/config" ) # The config file install dir - set(DATA_INSTALL_DIR "share/apps" ) # The parent directory where applications can install their data - set(HTML_INSTALL_DIR "share/doc/HTML" ) # The HTML install dir for documentation - set(ICON_INSTALL_DIR "share/icons" ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/) - set(KCFG_INSTALL_DIR "share/config.kcfg" ) # The install dir for kconfig files - set(LOCALE_INSTALL_DIR "share/locale" ) # The install dir for translations - set(MIME_INSTALL_DIR "share/mimelnk" ) # The install dir for the mimetype desktop files - set(SERVICES_INSTALL_DIR "share/kde4/services" ) # The install dir for service (desktop, protocol, ...) files - set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files - set(SOUND_INSTALL_DIR "share/sounds" ) # The install dir for sound files - set(TEMPLATES_INSTALL_DIR "share/templates" ) # The install dir for templates (Create new file...) - set(WALLPAPER_INSTALL_DIR "share/wallpapers" ) # The install dir for wallpapers - set(DEMO_INSTALL_DIR "share/demos" ) # The install dir for demos - set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir - set(AUTOSTART_INSTALL_DIR "share/autostart" ) # The install dir for autostart files - - set(XDG_APPS_INSTALL_DIR "share/applications/kde4" ) # The XDG apps dir - set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory - set(XDG_MIME_INSTALL_DIR "share/mime/packages" ) # The install dir for the xdg mimetypes - - set(SYSCONF_INSTALL_DIR "etc" ) # The kde sysconfig install dir (default /etc) - set(MAN_INSTALL_DIR "share/man" ) # The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/) - set(INFO_INSTALL_DIR "share/info" ) # The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") - set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") - set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services" ) # The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") - -else (WIN32) - - # this macro implements some very special logic how to deal with the cache - # by default the various install locations inherit their value from theit "parent" variable - # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will - # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX - # this would work completely without using the cache. - # but if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into - # the cache, otherwise it will be forgotten on the next cmake run. - # Once a variable is in the cache, it doesn't depend on its "parent" variables - # anymore and you can only change it by editing it directly. - # this macro helps in this regard, because as long as you don't set one of the - # variables explicitely to some location, it will always calculate its value from its - # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect. - # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location - # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX. - macro(_SET_FANCY _var _value _comment) - set(predefinedvalue "${_value}") - - if (NOT DEFINED ${_var}) - set(${_var} ${predefinedvalue}) - else (NOT DEFINED ${_var}) - set(${_var} "${${_var}}" CACHE PATH "${_comment}") - endif (NOT DEFINED ${_var}) - endmacro(_SET_FANCY) - - - _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") - _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") - _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") - _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") - _set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})") - _set_fancy(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/kde4/libexec)") - _set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") - - _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") - _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") - _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") - _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") - _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") - _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") - _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") - _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") - _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") - _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") - _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") - _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") - _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") - _set_fancy(DEMO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/demos" "The install dir for demos") - _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") - _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") - - _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") - _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") - _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") - - _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)") - _set_fancy(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" "The kde man install dir (default ${SHARE_INSTALL_PREFIX}/man/)") - _set_fancy(INFO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/info" "The kde info install dir (default ${SHARE_INSTALL_PREFIX}/info)") - _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") - _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") - -endif (WIN32) - -# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed. -# The arguments are also ok for regular executables, i.e. executables which don't go -# into sbin/ or libexec/, but for installing executables the basic syntax -# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}") -# is enough, so using this variable there doesn't help a lot. -# The variable must not be used for installing plugins. -# Usage is like this: -# install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} ) -# -# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go -# into bin/. -# Later on it will be possible to extend this for installing OSX frameworks -# The COMPONENT Devel argument has the effect that static libraries belong to the -# "Devel" install component. If we use this also for all install() commands -# for header files, it will be possible to install -# -everything: make install OR cmake -P cmake_install.cmake -# -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake -# -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake -# This can then also be used for packaging with cpack. - -set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" - LIBRARY DESTINATION "${LIB_INSTALL_DIR}" - ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonCompile.py qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonCompile.py --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonCompile.py 2010-06-21 15:31:45.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonCompile.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# By Simon Edwards -# This file is in the public domain. -import py_compile -py_compile.main() diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonMacros.cmake qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonMacros.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonMacros.cmake 2010-06-21 15:31:45.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/cmake/modules/PythonMacros.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -# Python macros -# ~~~~~~~~~~~~~ -# Copyright (c) 2007, Simon Edwards -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -# This file defines the following macros: -# -# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR) -# Install the SOURCE_FILE, which is a Python .py file, into the -# destination directory during install. The file will be byte compiled -# and both the .py file and .pyc file will be installed. - -GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) - -MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) - - FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) - - ADD_CUSTOM_TARGET(compile_python_files ALL) - - # Install the source file. - INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) - - # Byte compile and install the .pyc file. - GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) - GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) - GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) - GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) - - if(WIN32) - string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") - endif(WIN32) - - SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) - SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) - - FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) - - SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") - - GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) - IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. - ADD_CUSTOM_COMMAND( - TARGET compile_python_files - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} - DEPENDS ${_absfilename} - ) - ELSE(_abs_bin_py STREQUAL ${_absfilename}) - ADD_CUSTOM_COMMAND( - TARGET compile_python_files - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} - COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} - DEPENDS ${_absfilename} - ) - ENDIF(_abs_bin_py STREQUAL ${_absfilename}) - - INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) -ENDMACRO(PYTHON_INSTALL) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/CMakeLists.txt qesteidutil-0.3.1/=unpacked-tar1=/CMakeLists.txt --- qesteidutil-0.3.1/=unpacked-tar1=/CMakeLists.txt 2011-07-06 16:50:13.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(qesteidutil) - -# Custom cmake modules -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") - -include(InstallSettings) - -if(PKCS11_MODULE) - add_definitions(-DPKCS11_MODULE="${PKCS11_MODULE}") -endif(PKCS11_MODULE) - -find_package(Qt4 4.4.0 COMPONENTS QtCore QtGui QtNetwork QtWebkit QtXml REQUIRED) -find_package(OpenSSL REQUIRED) -find_package(OpenSSLCrypto REQUIRED) -find_package(LibP11 REQUIRED) -find_package(SmartCardpp REQUIRED) -if(UNIX) - find_package(PCSCLite) -endif() - -if(WIN32) - add_definitions(-DWIN32_LEAN_AND_MEAN) -endif(WIN32) - -if(MSVC) - # Needed for smartcardpp - add_definitions(-D_SECURE_SCL=0) -endif(MSVC) - -set(QT_USE_QTNETWORK true) -set(QT_USE_QTWEBKIT true) -set(QT_USE_QTXML true) - -include(${QT_USE_FILE}) - -# try to find system copy of qtsingleapplication -find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES QtSolutions) -find_library(QTSINGLEAPPLICATION_LIBRARIES QtSolutions_SingleApplication-2.6) -if(QTSINGLEAPPLICATION_INCLUDE_DIRS AND QTSINGLEAPPLICATION_LIBRARIES) - message(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARIES}") -else() - message(STATUS "QtSingleApplication not found; using bundled copy") - add_subdirectory(qtsingleapplication) - set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/qtsingleapplication/src) - set(QTSINGLEAPPLICATION_LIBRARIES qtsingleapplication) -endif() - -set(qesteidutil_MOC_HDRS - common/CertificateWidget.h - common/PinDialog.h - common/Settings.h - common/sslConnect.h - common/sslConnect_p.h - src/CertUpdate.h - src/DiagnosticsDialog.h - src/SettingsDialog.h - src/jscardmanager.h - src/jscertdata.h - src/jsesteidcard.h - src/jsextender.h - src/mainwindow.h -) - -set(qesteidutil_HDRS - ${qesteidutil_MOC_HDRS} - common/SslCertificate.h - src/version.h -) - -QT4_WRAP_CPP(qesteidutil_MOC_SRCS ${qesteidutil_MOC_HDRS}) -set(qesteidutil_SRCS - ${qesteidutil_HDRS} - ${qesteidutil_MOC_SRCS} - common/CertificateWidget.cpp - common/PinDialog.cpp - common/SslCertificate.cpp - common/sslConnect.cpp - src/CertUpdate.cpp - src/DiagnosticsDialog.cpp - src/SettingsDialog.cpp - src/jscardmanager.cpp - src/jscertdata.cpp - src/jsesteidcard.cpp - src/jsextender.cpp - src/main.cpp - src/mainwindow.cpp -) - -QT4_WRAP_UI( UI_HEADERS - common/ui/CertificateWidget.ui - src/ui/DiagnosticsDialog.ui - src/ui/SettingsDialog.ui -) - -set(QM_DIR ${CMAKE_BINARY_DIR}) -configure_file(common/translations/common_tr.qrc.cmake ${QM_DIR}/common_tr.qrc) -configure_file(src/translations/tr.qrc.cmake ${QM_DIR}/tr.qrc) - -QT4_ADD_RESOURCES( qesteidutil_RCC_SRCS - ${QM_DIR}/common_tr.qrc - ${QM_DIR}/tr.qrc - src/qesteidutil.qrc -) - -QT4_ADD_TRANSLATION( QM_FILES - common/translations/common_en.ts - common/translations/common_et.ts - common/translations/common_ru.ts - common/translations/qt_et.ts - common/translations/qt_ru.ts - src/translations/en.ts - src/translations/et.ts - src/translations/ru.ts -) - -find_package(Subversion) -if (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) - Subversion_WC_INFO(${PROJECT_SOURCE_DIR} PROJECT) - message(STATUS "Current SVN revision is ${PROJECT_WC_REVISION}") - add_definitions(-DBUILD_VER=${PROJECT_WC_REVISION}) -else (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) - add_definitions(-DBUILD_VER=0) -endif (Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn) - -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${LIBP11_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} - ${PCSCLITE_INCLUDE_DIR} - ${QTSINGLEAPPLICATION_INCLUDE_DIRS} - ${SMARTCARDPP_INCLUDE_DIRS} -) - -if(APPLE) - set(APP_CONTENTS_DIR "${CMAKE_SOURCE_DIR}/mac") - set(LIBQJPEG_FILE "${QT_PLUGINS_DIR}/imageformats/libqjpeg.dylib") - - # xCode hacks - include_directories(/usr/local/include/../include) - - # Bundle resources - file(GLOB_RECURSE RESOURCE_FILES ${APP_CONTENTS_DIR}/Resources/*.icns ${APP_CONTENTS_DIR}/Resources/**/*.strings) - - foreach(_file ${RESOURCE_FILES}) - get_filename_component(_file_dir ${_file} PATH) - file(RELATIVE_PATH _file_dir ${APP_CONTENTS_DIR}/Resources ${_file_dir}) - set_source_files_properties(${_file} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${_file_dir}" ) - endforeach(_file) - - # Qt jpeg plugin - set(RESOURCE_FILES ${RESOURCE_FILES} ${LIBQJPEG_FILE}) - set_source_files_properties(${LIBQJPEG_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/imageformats" ) - - find_library(CARBON_LIBRARY Carbon) -endif(APPLE) - -IF(WIN32) - SET(qesteidutil_SRCS ${qesteidutil_SRCS} src/qesteidutil.rc) - SET(WIN_LIBRARIES ws2_32) -ENDIF(WIN32) - -add_executable(qesteidutil WIN32 MACOSX_BUNDLE - ${qesteidutil_SRCS} - ${QM_FILES} - ${qesteidutil_RCC_SRCS} - ${UI_HEADERS} - ${RESOURCE_FILES} -) - -if(APPLE) - configure_file( - ${APP_CONTENTS_DIR}/Info.plist.cmake - ${APP_CONTENTS_DIR}/Info.plist - @ONLY) - - set_target_properties(qesteidutil - PROPERTIES - MACOSX_BUNDLE_INFO_PLIST ${APP_CONTENTS_DIR}/Info.plist - ) -endif(APPLE) - -target_link_libraries(qesteidutil - ${QT_QTMAIN_LIBRARY} - ${QT_LIBRARIES} - ${LIBP11_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${OPENSSLCRYPTO_LIBRARIES} - ${QTSINGLEAPPLICATION_LIBRARIES} - ${SMARTCARDPP_LIBRARIES} - ${WIN_LIBRARIES} - ${CARBON_LIBRARY} -) - -if(UNIX AND NOT APPLE) - INSTALL(FILES qesteidutil.desktop DESTINATION ${SHARE_INSTALL_PREFIX}/applications) - - # Install icons - foreach(RES 16x16 32x32 48x48) - install( - FILES src/html/images/id_icon_${RES}.png - DESTINATION ${SHARE_INSTALL_PREFIX}/icons/hicolor/${RES}/apps/ - RENAME qesteidutil.png - ) - endforeach(RES) -endif(UNIX AND NOT APPLE) - -install(TARGETS qesteidutil DESTINATION ${BIN_INSTALL_DIR}) -install(FILES qesteidutil.1 DESTINATION ${MAN_INSTALL_DIR}/man1) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,176 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "CertificateWidget.h" - -#include "ui_CertificateWidget.h" -#include "SslCertificate.h" - -#include -#include -#include -#include -#include -#include - -class CertificateDialogPrivate: public Ui::CertificateDialog -{ -public: - QSslCertificate cert; -}; - -CertificateDialog::CertificateDialog( QWidget *parent ) -: QDialog( parent ) -, d( new CertificateDialogPrivate ) -{ - d->setupUi( this ); - d->tabWidget->removeTab( 2 ); -} - -CertificateDialog::CertificateDialog( const QSslCertificate &cert, QWidget *parent ) -: QDialog( parent ) -, d( new CertificateDialogPrivate ) -{ - d->setupUi( this ); - setCertificate( cert ); - d->tabWidget->removeTab( 2 ); -} - -CertificateDialog::~CertificateDialog() { delete d; } - -void CertificateDialog::addItem( const QString &variable, const QString &value, const QVariant &valueext ) -{ - QTreeWidgetItem *t = new QTreeWidgetItem( d->parameters ); - t->setText( 0, variable ); - t->setText( 1, value ); - t->setData( 1, Qt::UserRole, valueext ); - d->parameters->addTopLevelItem( t ); -} - -void CertificateDialog::on_parameters_itemSelectionChanged() -{ - if ( !d->parameters->selectionModel()->hasSelection() || !d->parameters->selectedItems().size() ) - return; - if( !d->parameters->selectedItems().value(0)->data( 1, Qt::UserRole ).toString().isEmpty() ) - d->parameterContent->setPlainText( d->parameters->selectedItems().value(0)->data( 1, Qt::UserRole ).toString() ); - else - d->parameterContent->setPlainText( d->parameters->selectedItems().value(0)->text( 1 ) ); -} - -void CertificateDialog::save() -{ - QString file = QFileDialog::getSaveFileName( this, - tr("Save certificate"), - QString( "%1%2%3.cer" ) - .arg( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) ) - .arg( QDir::separator() ) - .arg( d->cert.subjectInfo( "serialNumber" ) ), - tr("Certificates (*.cer *.crt *.pem)") ); - if( file.isEmpty() ) - return; - - QFile f( file ); - if( f.open( QIODevice::WriteOnly ) ) - { - f.write( QFileInfo( file ).suffix().toLower() == "pem" ? d->cert.toPem() : d->cert.toDer() ); - f.close(); - } - else - QMessageBox::warning( this, tr("Save certificate"), tr("Failed to save file") ); -} - -void CertificateDialog::setCertificate( const QSslCertificate &cert ) -{ - d->cert = cert; - SslCertificate c = cert; - QString i; - QTextStream s( &i ); - s << "" << tr("Certificate Information") << "
"; - s << "
"; - s << "" << tr("This certificate is intended for following purpose(s):") << ""; - s << "
    "; - Q_FOREACH( const QString &ext, c.enhancedKeyUsage() ) - s << "
  • " << ext << "
  • "; - s << "
"; - s << "



"; - //s << tr("* Refer to the certification authority's statement for details.") << "
"; - s << "
"; - s << "

"; - s << "" << tr("Issued to:") << " " << c.subjectInfo( QSslCertificate::CommonName ); - s << "


"; - s << "" << tr("Issued by:") << " " << c.issuerInfo( QSslCertificate::CommonName ); - s << "


"; - s << "" << tr("Valid from") << " " << c.effectiveDate().toLocalTime().toString( "dd.MM.yyyy" ) << " "; - s << "" << tr("to") << " "<< c.expiryDate().toLocalTime().toString( "dd.MM.yyyy" ); - s << "

"; - d->info->setHtml( i ); - - addItem( tr("Version"), "V" + c.version() ); - addItem( tr("Serial number"), QString( "%1 (0x%2)" ) - .arg( c.serialNumber().constData() ) - .arg( QString::number( c.serialNumber().toInt(), 16 ) ) ); - addItem( tr("Signature algorithm"), "sha1RSA" ); - - QStringList text, textExt; - QList subjects; - subjects << "CN" << "OU" << "O" << "C"; - Q_FOREACH( const QByteArray &subject, subjects ) - { - const QString &data = c.issuerInfo( subject ); - if( data.isEmpty() ) - continue; - text << data; - textExt << QString( "%1 = %2" ).arg( subject.constData() ).arg( data ); - } - addItem( tr("Issuer"), text.join( ", " ), textExt.join( "\n" ) ); - addItem( tr("Valid from"), c.effectiveDate().toLocalTime().toString( "dd.MM.yyyy hh:mm:ss" ) ); - addItem( tr("Vaild to"), c.expiryDate().toLocalTime().toString( "dd.MM.yyyy hh:mm:ss" ) ); - - subjects.clear(); - text.clear(); - textExt.clear(); - subjects << "serialNumber" << "GN" << "SN" << "CN" << "OU" << "O" << "C"; - Q_FOREACH( const QByteArray &subject, subjects ) - { - const QString &data = c.subjectInfo( subject ); - if( data.isEmpty() ) - continue; - text << data; - textExt << QString( "%1 = %2" ).arg( subject.constData() ).arg( data ); - } - addItem( tr("Subject"), text.join( ", " ), textExt.join( "\n" ) ); - addItem( tr("Public key"), QString("%1 (%2)") - .arg( c.publicKey().algorithm() == QSsl::Rsa ? "RSA" : "DSA" ) - .arg( c.publicKey().length() ), - c.toHex( c.publicKey().toDer() ) ); - - QStringList enhancedKeyUsage = c.enhancedKeyUsage(); - if( !enhancedKeyUsage.isEmpty() ) - addItem( tr("Enhanched key usage"), enhancedKeyUsage.join( ", " ), enhancedKeyUsage.join( "\n" ) ); - QStringList policies = c.policies(); - if( !policies.isEmpty() ) - addItem( tr("Certificate policies"), policies.join( ", " ) ); - addItem( tr("Authority key identifier"), c.toHex( c.authorityKeyIdentifier() ) ); - addItem( tr("Subject key identifier"), c.toHex( c.subjectKeyIdentifier() ) ); - QStringList keyUsage = c.keyUsage().values(); - if( !keyUsage.isEmpty() ) - addItem( tr("Key usage"), keyUsage.join( ", " ), keyUsage.join( "\n" ) ); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.h qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/CertificateWidget.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -#include - -class CertificateDialogPrivate; -class QSslCertificate; - -class CertificateDialog: public QDialog -{ - Q_OBJECT -public: - CertificateDialog( QWidget *parent = 0 ); - CertificateDialog( const QSslCertificate &cert, QWidget *parent = 0 ); - ~CertificateDialog(); - - void setCertificate( const QSslCertificate &cert ); - -private Q_SLOTS: - void on_parameters_itemSelectionChanged(); - void save(); - -private: - void addItem( const QString &variable, const QString &value, const QVariant &valueext = QVariant() ); - QByteArray addHexSeparators( const QByteArray &data ) const; - - CertificateDialogPrivate *d; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "CheckConnection.h" - -#include "Settings.h" - -#include -#include -#include -#include - -CheckConnection::CheckConnection( QObject *parent ) -: QNetworkAccessManager( parent ) -{ - connect( this, SIGNAL(finished(QNetworkReply*)), SLOT(stop(QNetworkReply*)) ); - Settings s; - s.beginGroup( "Client" ); - if( !s.value( "proxyHost" ).toString().isEmpty() ) - { - setProxy( QNetworkProxy( - QNetworkProxy::HttpProxy, - s.value( "proxyHost" ).toString(), - s.value( "proxyPort" ).toInt(), - s.value( "proxyUser" ).toString(), - s.value( "proxyPass" ).toString() ) ); - } -} - -bool CheckConnection::check( const QString &url ) -{ - running = true; - QNetworkReply *reply = get( QNetworkRequest( QUrl( url ) ) ); - - while( running ) - qApp->processEvents(); - - switch( reply->error() ) - { - case QNetworkReply::NoError: - return true; - case QNetworkReply::ProxyConnectionRefusedError: - case QNetworkReply::ProxyConnectionClosedError: - case QNetworkReply::ProxyNotFoundError: - case QNetworkReply::ProxyTimeoutError: - m_error = tr("Check proxy settings"); - return false; - case QNetworkReply::ProxyAuthenticationRequiredError: - m_error = tr("Check proxy username and password"); - return false; - default: - m_error = tr("Check internet connection"); - return false; - } -} - -QString CheckConnection::error() const { return m_error; } - -void CheckConnection::stop( QNetworkReply * ) { running = false; } diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.h qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/CheckConnection.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class QNetworkReply; - -class CheckConnection: public QNetworkAccessManager -{ - Q_OBJECT - -public: - CheckConnection( QObject *parent = 0 ); - - bool check( const QString &url ); - QString error() const; - -private Q_SLOTS: - void stop( QNetworkReply *reply ); - -private: - QString m_error; - bool running; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/CMakeLists.txt qesteidutil-0.3.1/=unpacked-tar1=/common/CMakeLists.txt --- qesteidutil-0.3.1/=unpacked-tar1=/common/CMakeLists.txt 2010-01-05 10:58:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -set( MOC_HEADERS - CheckConnection.h - CertificateWidget.h - ComboBox.h - Common.h - IKValidator.h - PinDialog.h - Settings.h - sslConnect.h - sslConnect_p.h - ) -QT4_WRAP_UI( UI_HEADERS - ui/CertificateWidget.ui - ) -set( HEADERS - ${MOC_HEADERS} - ${UI_HEADERS} - SslCertificate.h - ) -QT4_WRAP_CPP( MOC_SOURCES ${MOC_HEADERS} ) -set( SOURCES - ${HEADERS} - ${MOC_SOURCES} - CheckConnection.cpp - CertificateWidget.cpp - ComboBox.cpp - Common.cpp - IKValidator.cpp - PinDialog.cpp - SslCertificate.cpp - sslConnect.cpp - ) - -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${OPENSSL_INCLUDE_DIR} - ${LIBP11_INCLUDE_DIR} - ) - -if(APPLE) - # xCode hacks - include_directories(/usr/local/include/../include) -endif(APPLE) - -ADD_LIBRARY( - qdigidoccommon - STATIC - ${SOURCES} - ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* - * QDigiDocClient - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "ComboBox.h" - -#include - -ComboBox::ComboBox( QWidget *parent ) -: QComboBox( parent ) -{} - -void ComboBox::hack() -{ - QListView *v = new QListView( this ); - v->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); - v->setMinimumHeight( 50 ); - v->setModel( model() ); - setView( v ); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.h qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/ComboBox.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * QDigiDocClient - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class ComboBox: public QComboBox -{ - Q_OBJECT -public: - ComboBox( QWidget *parent = 0 ); - - void hack(); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/Common.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/Common.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/Common.cpp 2010-09-29 21:18:24.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/Common.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "Common.h" - -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_WIN32 -#include -#include -#include - -#include -#include -#endif - -#ifdef Q_OS_MAC -#include -#endif - -#include "SslCertificate.h" - -Common::Common( QObject *parent ): QObject( parent ) {} - -bool Common::canWrite( const QString &filename ) -{ -#ifdef Q_OS_WIN32 - return QTemporaryFile( QFileInfo( filename ).absolutePath().append( "/XXXXXX" ) ).open(); -#else - QFileInfo file( filename ); - return file.isFile() ? file.isWritable() : QFileInfo( file.absolutePath() ).isWritable(); -#endif -} - -void Common::browse( const QUrl &url ) -{ - QUrl u = url; - u.setScheme( "file" ); - bool started = false; -#if defined(Q_OS_WIN32) - started = QProcess::startDetached( "explorer", QStringList() << "/select," << - QDir::toNativeSeparators( u.toLocalFile() ) ); -#elif defined(Q_OS_MAC) - started = QProcess::startDetached("/usr/bin/osascript", QStringList() << - "-e" << "on run argv" << - "-e" << "set vfile to POSIX file (item 1 of argv)" << - "-e" << "tell application \"Finder\"" << - "-e" << "select vfile" << - "-e" << "activate" << - "-e" << "end tell" << - "-e" << "end run" << - // Commandline arguments - u.toLocalFile()); -#endif - if( started ) - return; - QDesktopServices::openUrl( QUrl::fromLocalFile( QFileInfo( u.toLocalFile() ).absolutePath() ) ); -} - -QString Common::fileSize( quint64 bytes ) -{ - const quint64 kb = 1024; - const quint64 mb = 1024 * kb; - const quint64 gb = 1024 * mb; - const quint64 tb = 1024 * gb; - if( bytes >= tb ) - return QString( "%1 TB" ).arg( qreal(bytes) / tb, 0, 'f', 3 ); - if( bytes >= gb ) - return QString( "%1 GB" ).arg( qreal(bytes) / gb, 0, 'f', 2 ); - if( bytes >= mb ) - return QString( "%1 MB" ).arg( qreal(bytes) / mb, 0, 'f', 1 ); - if( bytes >= kb ) - return QString( "%1 KB" ).arg( bytes / kb ); - return QString( "%1 B" ).arg( bytes ); -} - -void Common::mailTo( const QUrl &url ) -{ -#if defined(Q_OS_WIN32) - QString file = url.queryItemValue( "attachment" ); - QByteArray filePath = QDir::toNativeSeparators( file ).toLatin1(); - QByteArray fileName = QFileInfo( file ).fileName().toLatin1(); - QByteArray subject = url.queryItemValue( "subject" ).toLatin1(); - - MapiFileDesc doc[1]; - doc[0].ulReserved = 0; - doc[0].flFlags = 0; - doc[0].nPosition = -1; - doc[0].lpszPathName = const_cast(filePath.constData()); - doc[0].lpszFileName = const_cast(fileName.constData()); - doc[0].lpFileType = NULL; - - // Create message - MapiMessage message; - message.ulReserved = 0; - message.lpszSubject = const_cast(subject.constData()); - message.lpszNoteText = ""; - message.lpszMessageType = NULL; - message.lpszDateReceived = NULL; - message.lpszConversationID = NULL; - message.flFlags = 0; - message.lpOriginator = NULL; - message.nRecipCount = 0; - message.lpRecips = NULL; - message.nFileCount = 1; - message.lpFiles = (lpMapiFileDesc)&doc; - - QLibrary lib("mapi32"); - typedef ULONG (PASCAL *SendMail)(ULONG,ULONG,MapiMessage*,FLAGS,ULONG); - SendMail mapi = (SendMail)lib.resolve("MAPISendMail"); - if( mapi ) - { - mapi( NULL, 0, &message, MAPI_LOGON_UI|MAPI_DIALOG, 0 ); - return; - } -#elif defined(Q_OS_MAC) - CFURLRef emailUrl = CFURLCreateWithString(kCFAllocatorDefault, CFSTR("mailto:info@example.com"), NULL), appUrl = NULL; - bool started = false; - if(LSGetApplicationForURL(emailUrl, kLSRolesEditor, NULL, &appUrl) == noErr) - { - CFStringRef appPath = CFURLCopyFileSystemPath(appUrl, kCFURLPOSIXPathStyle); - if(appPath != NULL) - { - if(CFStringCompare(appPath, CFSTR("/Applications/Mail.app"), 0) == kCFCompareEqualTo) - { - started = QProcess::startDetached("/usr/bin/osascript", QStringList() << - "-e" << "on run argv" << - "-e" << "set vattachment to (item 1 of argv)" << - "-e" << "set vsubject to (item 2 of argv)" << - "-e" << "tell application \"Mail\"" << - "-e" << "set composeMessage to make new outgoing message at beginning with properties {visible:true}" << - "-e" << "tell composeMessage" << - "-e" << "set subject to vsubject" << - "-e" << "set content to \" \"" << - "-e" << "tell content" << - "-e" << "make new attachment with properties {file name: vattachment} at after the last word of the last paragraph" << - "-e" << "end tell" << - "-e" << "end tell" << - "-e" << "activate" << - "-e" << "end tell" << - "-e" << "end run" << - // Commandline arguments - url.queryItemValue("attachment") << - url.queryItemValue("subject")); - } - else if(CFStringFind(appPath, CFSTR("Entourage"), 0).location != kCFNotFound) - { - started = QProcess::startDetached("/usr/bin/osascript", QStringList() << - "-e" << "on run argv" << - "-e" << "set vattachment to (item 1 of argv)" << - "-e" << "set vsubject to (item 2 of argv)" << - "-e" << "tell application \"Microsoft Entourage\"" << - "-e" << "set vmessage to make new outgoing message with properties" << - "-e" << "{subject:vsubject, attachments:vattachment}" << - "-e" << "open vmessage" << - "-e" << "activate" << - "-e" << "end tell" << - "-e" << "end run" << - // Commandline arguments - url.queryItemValue("attachment") << - url.queryItemValue("subject")); - } - else if(CFStringCompare(appPath, CFSTR("/Applications/Thunderbird.app"), 0) == kCFCompareEqualTo) - { - // TODO: Handle Thunderbird here? Impossible? - } - CFRelease(appPath); - } - CFRelease(appUrl); - } - CFRelease(emailUrl); - if( started ) - return; -#elif defined(Q_OS_LINUX) - QByteArray thunderbird; - QProcess p; - QStringList env = QProcess::systemEnvironment(); - if( env.indexOf( QRegExp("KDE_FULL_SESSION.*") ) != -1 ) - { - p.start( "kreadconfig", QStringList() - << "--file" << "emaildefaults" - << "--group" << "PROFILE_Default" - << "--key" << "EmailClient" ); - p.waitForFinished(); - QByteArray data = p.readAllStandardOutput().trimmed(); - if( data.contains("thunderbird") ) - thunderbird = data; - } - else if( env.indexOf( QRegExp("GNOME_DESKTOP_SESSION_ID.*") ) != -1 ) - { - p.start( "gconftool-2", QStringList() - << "--get" << "/desktop/gnome/url-handlers/mailto/command" ); - p.waitForFinished(); - QByteArray data = p.readAllStandardOutput(); - if( data.contains("thunderbird") ) - thunderbird = data.split(' ').value(0); - } - /* - else - { - p.start( "xprop", QStringList() << "-root" << "_DT_SAVE_MODE" ); - p.waitForFinished(); - if( p.readAllStandardOutput().contains("xfce4") ) - {} - }*/ - - if( !thunderbird.isEmpty() ) - { - if( p.startDetached( thunderbird, QStringList() << "-compose" - << QString( "subject='%1',attachment='%2,'" ) - .arg( url.queryItemValue( "subject" ) ) - .arg( QUrl::fromLocalFile( url.queryItemValue( "attachment" ) ).toString() ) ) ); - return; - } - else - { - if( p.startDetached( "xdg-email", QStringList() - << "--subject" << url.queryItemValue( "subject" ) - << "--attach" << url.queryItemValue( "attachment" ) ) ) - return; - } -#endif - QDesktopServices::openUrl( url ); -} - -void Common::showHelp( const QString &msg ) -{ - QUrl u( "http://code.google.com/p/esteid/" ); - u.addQueryItem( "searchquery", msg ); - u.addQueryItem( "searchtype", "all" ); - u.addQueryItem( "_m", "core" ); - u.addQueryItem( "_a", "searchclient" ); - QDesktopServices::openUrl( u ); -} - -bool Common::startDetached( const QString &program ) -{ return startDetached( program, QStringList() ); } - -bool Common::startDetached( const QString &program, const QStringList &arguments ) -{ -#ifdef Q_OS_MAC - return QProcess::startDetached( "/usr/bin/open", QStringList() << "-a" << program << arguments ); -#else - return QProcess::startDetached( program, arguments ); -#endif -} - -QString Common::tokenInfo( CertType type, const QString &card, const QSslCertificate &cert ) -{ - QString content; - QTextStream s( &content ); - SslCertificate c( cert ); - - s << "
"; - if( c.isTempel() ) - { - s << tr("Company") << ": " - << c.toString( "CN" ) << "
"; - s << tr("Register code") << ": " - << c.subjectInfo( "serialNumber" ) << "
"; - } - else - { - s << tr("Name") << ": " - << c.toString( "GN SN" ) << "
"; - s << tr("Personal code") << ": " - << c.subjectInfo( "serialNumber" ) << "
"; - } - s << tr("Card in reader") << ": " << card << "
"; - - bool willExpire = c.expiryDate().toLocalTime() <= QDateTime::currentDateTime().addDays( 105 ); - s << (type == AuthCert ? tr("Auth certificate is") : tr("Sign certificate is") ) << " "; - if( c.isValid() ) - { - s << "" << tr("valid") << ""; - if( willExpire ) - s << "
" << tr("Your certificates will expire soon") << ""; - } - else - s << "" << tr("expired") << ""; - - s << "
"; - if( !c.isValid() || willExpire ) - { - s << "
" - "" << tr("Open utility") << "
"; - } - else if( c.isTempel() ) - s << ""; - else - s << ""; - s << "
"; - - return content; -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/Common.h qesteidutil-0.3.1/=unpacked-tar1=/common/Common.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/Common.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/Common.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class QSslCertificate; -class QStringList; -class QUrl; - -class Common: public QObject -{ - Q_OBJECT -public: - enum CertType - { - AuthCert, - SignCert, - }; - Common( QObject *parent = 0 ); - - static bool canWrite( const QString &filename ); - static QString fileSize( quint64 bytes ); - static void showHelp( const QString &msg ); - static bool startDetached( const QString &program ); - static bool startDetached( const QString &program, const QStringList &arguments ); - static QString tokenInfo( CertType type, const QString &card, const QSslCertificate &cert ); - -public Q_SLOTS: - void browse( const QUrl &url ); - void mailTo( const QUrl &url ); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "IKValidator.h" - -#include - -IKValidator::IKValidator( QObject *parent ) -: QValidator( parent ) -{} - -bool IKValidator::isValid( const QString &ik ) -{ - if( ik.size() != 11 ) return false; - - // Validate date - int year = 0; - switch( ik.left( 1 ).toUInt() ) - { - case 1: case 2: year = 1800; break; - case 3: case 4: year = 1900; break; - case 5: case 6: year = 2000; break; - case 7: case 8: year = 2100; break; - default: return false; - } - - if( !QDate::isValid( - ik.mid( 1, 2 ).toUInt() + year, - ik.mid( 3, 2 ).toUInt(), - ik.mid( 5, 2 ).toUInt() ) ) - return false; - - // Validate checksum - int sum1 = 0, sum2 = 0, pos1 = 1, pos2 = 3; - for( int i = 0; i < 10; ++i ) - { - sum1 += ik.mid( i, 1 ).toUInt() * pos1; - sum2 += ik.mid( i, 1 ).toUInt() * pos2; - pos1 = pos1 == 9 ? 1 : pos1 + 1; - pos2 = pos2 == 9 ? 1 : pos2 + 1; - } - - int result; - if( (result = sum1 % 11) >= 10 && - (result = sum2 % 11) >= 10 ) - result = 0; - - return ik.right( 1 ).toInt() == result; -} - -QValidator::State IKValidator::validate( QString &input, int &pos ) const -{ - if( input.size() > 11 || !QRegExp( "\\d{0,11}" ).exactMatch( input ) ) - return Invalid; - else if( input.size() == 11 ) - return isValid( input ) ? Acceptable : Invalid; - else - return Intermediate; -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.h qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/IKValidator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class IKValidator: public QValidator -{ - Q_OBJECT - -public: - IKValidator( QObject *parent ); - - static bool isValid( const QString &ik ); - State validate( QString &input, int &pos ) const; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/images/common_images.qrc qesteidutil-0.3.1/=unpacked-tar1=/common/images/common_images.qrc --- qesteidutil-0.3.1/=unpacked-tar1=/common/images/common_images.qrc 2009-07-03 15:39:47.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/images/common_images.qrc 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - ico_delete.png - ico_person_blue_16.png - ico_person_blue_75.png - ico_save.png - ico_stamp_blue_16.png - ico_stamp_blue_75.png - languages_button.png - warning.png - - Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_delete.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_delete.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_person_blue_16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_person_blue_16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_person_blue_75.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_person_blue_75.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_save.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_save.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_stamp_blue_16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_stamp_blue_16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_stamp_blue_75.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/ico_stamp_blue_75.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/languages_button.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/languages_button.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/common/images/warning.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/common/images/warning.png differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "PinDialog.h" - -#include "SslCertificate.h" - -#include -#include -#include -#include -#include -#include - -PinDialog::PinDialog( QWidget *parent ) -: QDialog( parent ) -{} - -PinDialog::PinDialog( PinType type, const QSslCertificate &cert, QWidget *parent ) -: QDialog( parent ) -{ - SslCertificate c = cert; - init( type, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); -} - -PinDialog::PinDialog( PinType type, const QString &title, QWidget *parent ) -: QDialog( parent ) -{ init( type, title ); } - -void PinDialog::init( PinType type, const QString &title ) -{ - setWindowModality( Qt::ApplicationModal ); - setWindowTitle( title ); - - QLabel *label = new QLabel( this ); - QVBoxLayout *l = new QVBoxLayout( this ); - l->addWidget( label ); - - switch( type ) - { - case Pin1Type: - label->setText( QString( "%1
%2
%3" ) - .arg( title ) - .arg( tr("Selected action requires auth certificate.") ) - .arg( tr("For using auth certificate enter PIN1") ) ); - regexp.setPattern( "\\d{4,12}" ); - break; - case Pin2Type: - label->setText( QString( "%1
%2
%3" ) - .arg( title ) - .arg( tr("Selected action requires sign certificate.") ) - .arg( tr("For using sign certificate enter PIN2") ) ); - regexp.setPattern( "\\d{5,12}" ); - break; - case Pin1PinpadType: -#if QT_VERSION >= 0x040500 - setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint ); -#endif - label->setText( QString( "%1
%2
%3" ) - .arg( title ) - .arg( tr("Selected action requires auth certificate.") ) - .arg( tr("For using auth certificate enter PIN1 with pinpad") ) ); - return; - case Pin2PinpadType: -#if QT_VERSION >= 0x040500 - setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint ); -#endif - label->setText( QString( "%1
%2
%3" ) - .arg( title ) - .arg( tr("Selected action requires sign certificate.") ) - .arg( tr("For using sign certificate enter PIN2 with pinpad") ) ); - return; - } - - m_text = new QLineEdit( this ); - m_text->setEchoMode( QLineEdit::Password ); - m_text->setFocus(); - m_text->setValidator( new QRegExpValidator( regexp, m_text ) ); - connect( m_text, SIGNAL(textEdited(QString)), SLOT(textEdited(QString)) ); - l->addWidget( m_text ); - - QDialogButtonBox *buttons = new QDialogButtonBox( - QDialogButtonBox::Ok|QDialogButtonBox::Cancel, Qt::Horizontal, this ); - ok = buttons->button( QDialogButtonBox::Ok ); - ok->setAutoDefault( true ); - connect( buttons, SIGNAL(accepted()), SLOT(accept()) ); - connect( buttons, SIGNAL(rejected()), SLOT(reject()) ); - l->addWidget( buttons ); - - textEdited( QString() ); -} - -QString PinDialog::text() const { return m_text->text(); } - -void PinDialog::textEdited( const QString &text ) -{ ok->setEnabled( regexp.exactMatch( text ) ); } diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.h qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/PinDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -#include - -class QLineEdit; -class QSslCertificate; - -class PinDialog: public QDialog -{ - Q_OBJECT -public: - enum PinType - { - Pin1Type, - Pin2Type, - Pin1PinpadType, - Pin2PinpadType, - }; - PinDialog( QWidget *parent = 0 ); - PinDialog( PinType type, const QSslCertificate &cert, QWidget *parent = 0 ); - PinDialog( PinType type, const QString &title, QWidget *parent = 0 ); - void init( PinType type, const QString &title ); - - QString text() const; - -private Q_SLOTS: - void textEdited( const QString &text ); - -private: - - QLineEdit *m_text; - QPushButton *ok; - QRegExp regexp; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/Settings.h qesteidutil-0.3.1/=unpacked-tar1=/common/Settings.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/Settings.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/Settings.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class Settings : public QSettings -{ - Q_OBJECT - -public: - Settings( QObject *parent = 0 ) - : QSettings( "Estonian ID Card", QString(), parent ) {} -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,436 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "SslCertificate.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static QByteArray ASN_STRING_to_QByteArray( ASN1_OCTET_STRING *str ) -{ return QByteArray( (const char *)ASN1_STRING_data(str), ASN1_STRING_length(str) ); } - - - -SslCertificate::SslCertificate( const QSslCertificate &cert ) -: QSslCertificate( cert ) {} - -QByteArray SslCertificate::authorityKeyIdentifier() const -{ - AUTHORITY_KEYID *id = (AUTHORITY_KEYID *)getExtension( NID_authority_key_identifier ); - QByteArray out; - if( id && id->keyid ) - out = ASN_STRING_to_QByteArray( id->keyid ); - AUTHORITY_KEYID_free( id ); - return out; -} - -QStringList SslCertificate::enhancedKeyUsage() const -{ - EXTENDED_KEY_USAGE *usage = (EXTENDED_KEY_USAGE*)getExtension( NID_ext_key_usage ); - if( !usage ) - return QStringList() << QCoreApplication::translate("SslCertificate", "All application policies"); - - QStringList list; - for( int i = 0; i < sk_ASN1_OBJECT_num( usage ); ++i ) - { - ASN1_OBJECT *obj = sk_ASN1_OBJECT_value( usage, i ); - switch( OBJ_obj2nid( obj ) ) - { - case NID_client_auth: - list << QCoreApplication::translate("SslCertificate", "Proves your identity to a remote computer"); break; - case NID_email_protect: - list << QCoreApplication::translate("SslCertificate", "Protects e-mail messages"); break; - case NID_OCSP_sign: - list << QCoreApplication::translate("SslCertificate", "OCSP signing"); break; - default: break; - } - } - sk_ASN1_OBJECT_pop_free( usage, ASN1_OBJECT_free ); - return list; -} - -QString SslCertificate::formatDate( const QDateTime &date, const QString &format ) -{ - int pos = format.indexOf( "MMMM" ); - if( pos == -1 ) - return date.toString( format ); - QString d = date.toString( QString( format ).remove( pos, 4 ) ); - return d.insert( pos, QLocale().monthName( date.date().month() ) ); -} - -QString SslCertificate::formatName( const QString &name ) -{ - QString ret = name.toLower(); - bool firstChar = true; - for( QString::iterator i = ret.begin(); i != ret.end(); ++i ) - { - if( !firstChar && !i->isLetter() ) - firstChar = true; - - if( firstChar && i->isLetter() ) - { - *i = i->toUpper(); - firstChar = false; - } - } - return ret; -} - -QSslCertificate SslCertificate::fromX509( Qt::HANDLE x509 ) -{ - unsigned char *cert = NULL; - int len = i2d_X509( (X509*)x509, &cert ); - QByteArray der; - if( len >= 0 ) - der = QByteArray( (char*)cert, len ); - OPENSSL_free( cert ); - return QSslCertificate( der, QSsl::Der ); -} - -QSslKey SslCertificate::keyFromEVP( Qt::HANDLE evp ) -{ - EVP_PKEY *key = (EVP_PKEY*)evp; - unsigned char *data = NULL; - int len = 0; - QSsl::KeyAlgorithm alg; - QSsl::KeyType type; - - switch( EVP_PKEY_type( key->type ) ) - { - case EVP_PKEY_RSA: - { - RSA *rsa = EVP_PKEY_get1_RSA( key ); - alg = QSsl::Rsa; - type = rsa->d ? QSsl::PrivateKey : QSsl::PublicKey; - len = rsa->d ? i2d_RSAPrivateKey( rsa, &data ) : i2d_RSAPublicKey( rsa, &data ); - RSA_free( rsa ); - break; - } - case EVP_PKEY_DSA: - { - DSA *dsa = EVP_PKEY_get1_DSA( key ); - alg = QSsl::Dsa; - type = dsa->priv_key ? QSsl::PrivateKey : QSsl::PublicKey; - len = dsa->priv_key ? i2d_DSAPrivateKey( dsa, &data ) : i2d_DSAPublicKey( dsa, &data ); - DSA_free( dsa ); - break; - } - default: break; - } - - QSslKey k; - if( len > 0 ) - k = QSslKey( QByteArray( (char*)data, len ), alg, QSsl::Der, type ); - OPENSSL_free( data ); - - return k; -} - -void* SslCertificate::getExtension( int nid ) const -{ - if( !handle() ) - return NULL; - return X509_get_ext_d2i( (X509*)handle(), nid, NULL, NULL ); -} - -QString SslCertificate::issuerInfo( SubjectInfo subject ) const -{ return issuerInfo( subjectInfoToString( subject ) ); } - -QString SslCertificate::issuerInfo( const QByteArray &tag ) const -{ - if( !handle() ) - return QString(); - - BIO *bio = BIO_new( BIO_s_mem() ); - X509_NAME_print_ex( bio, X509_get_issuer_name((X509*)handle()), 0, - ASN1_STRFLGS_UTF8_CONVERT | - ASN1_STRFLGS_DUMP_UNKNOWN | - ASN1_STRFLGS_DUMP_DER | - XN_FLAG_SEP_MULTILINE | - XN_FLAG_DUMP_UNKNOWN_FIELDS | - XN_FLAG_FN_SN ); - - char *data = NULL; - long len = BIO_get_mem_data( bio, &data ); - QString string = QString::fromUtf8( data, len ); - BIO_free( bio ); - return mapFromOnlineName( string ).value( tag ); -} - -bool SslCertificate::isTempel() const -{ - Q_FOREACH( const QString &p, policies() ) - if( p.left( 19 ) == "1.3.6.1.4.1.10015.7" ) - return true; - return false; -} - -bool SslCertificate::isTest() const -{ - Q_FOREACH( const QString &p, policies() ) - if( p.left( 19 ) == "1.3.6.1.4.1.10015.3" ) - return true; - return false; -} - -QHash SslCertificate::keyUsage() const -{ - ASN1_BIT_STRING *keyusage = (ASN1_BIT_STRING*)getExtension( NID_key_usage ); - if( !keyusage ) - return QHash(); - - QHash list; - for( int n = 0; n < 9; ++n ) - { - if( ASN1_BIT_STRING_get_bit( keyusage, n ) ) - { - switch( n ) - { - case DigitalSignature: list[n] = QCoreApplication::translate("SslCertificate", "Digital signature"); break; - case NonRepudiation: list[n] = QCoreApplication::translate("SslCertificate", "Non repudiation"); break; - case KeyEncipherment: list[n] = QCoreApplication::translate("SslCertificate", "Key encipherment"); break; - case DataEncipherment: list[n] = QCoreApplication::translate("SslCertificate", "Data encipherment"); break; - case KeyAgreement: list[n] = QCoreApplication::translate("SslCertificate", "Key agreement"); break; - case KeyCertificateSign: list[n] = QCoreApplication::translate("SslCertificate", "Key certificate sign"); break; - case CRLSign: list[n] = QCoreApplication::translate("SslCertificate", "CRL sign"); break; - case EncipherOnly: list[n] = QCoreApplication::translate("SslCertificate", "Encipher only"); break; - case DecipherOnly: list[n] = QCoreApplication::translate("SslCertificate", "Decipher only"); break; - default: break; - } - } - } - ASN1_BIT_STRING_free( keyusage ); - return list; -} - -QMap SslCertificate::mapFromOnlineName( const QString &name ) const -{ - QMap info; - Q_FOREACH( const QString item, name.split( "\n" ) ) - { - QStringList split = item.split( "=" ); - info[split.value(0)] = split.value(1); - } - return info; -} - -QStringList SslCertificate::policies() const -{ - CERTIFICATEPOLICIES *cp = (CERTIFICATEPOLICIES*)getExtension( NID_certificate_policies ); - if( !cp ) - return QStringList(); - - QStringList list; - for( int i = 0; i < sk_POLICYINFO_num( cp ); ++i ) - { - POLICYINFO *pi = sk_POLICYINFO_value( cp, i ); - char buf[50]; - memset( buf, 0, 50 ); - int len = OBJ_obj2txt( buf, 50, pi->policyid, 1 ); - if( len != NID_undef ) - list << buf; - } - sk_POLICYINFO_pop_free( cp, POLICYINFO_free ); - return list; -} - -QString SslCertificate::policyInfo( const QString &index ) const -{ -#if 0 - for( int j = 0; j < sk_POLICYQUALINFO_num( pi->qualifiers ); ++j ) - { - POLICYQUALINFO *pqi = sk_POLICYQUALINFO_value( pi->qualifiers, j ); - - memset( buf, 0, 50 ); - int len = OBJ_obj2txt( buf, 50, pqi->pqualid, 1 ); - qDebug() << buf; - } -#endif - return QString(); -} - -QString SslCertificate::subjectInfo( SubjectInfo subject ) const -{ return subjectInfo( subjectInfoToString( subject ) ); } - -QString SslCertificate::subjectInfo( const QByteArray &tag ) const -{ - if( !handle() ) - return QString(); - - BIO *bio = BIO_new( BIO_s_mem() ); - X509_NAME_print_ex( bio, X509_get_subject_name((X509*)handle()), 0, - ASN1_STRFLGS_UTF8_CONVERT | - ASN1_STRFLGS_DUMP_UNKNOWN | - ASN1_STRFLGS_DUMP_DER | - XN_FLAG_SEP_MULTILINE | - XN_FLAG_DUMP_UNKNOWN_FIELDS | - XN_FLAG_FN_SN ); - - char *data = NULL; - long len = BIO_get_mem_data( bio, &data ); - QString string = QString::fromUtf8( data, len ); - BIO_free( bio ); - return mapFromOnlineName( string ).value( tag ); -} - -QByteArray SslCertificate::subjectInfoToString( SubjectInfo info ) const -{ - switch( info ) - { - case QSslCertificate::Organization: return "O"; - case QSslCertificate::CommonName: return "CN"; - case QSslCertificate::LocalityName: return "L"; - case QSslCertificate::OrganizationalUnitName: return "OU"; - case QSslCertificate::CountryName: return "C"; - case QSslCertificate::StateOrProvinceName: return "ST"; - default: return ""; - } -} - -QByteArray SslCertificate::subjectKeyIdentifier() const -{ - ASN1_OCTET_STRING *id = (ASN1_OCTET_STRING *)getExtension( NID_subject_key_identifier ); - if( !id ) - return QByteArray(); - QByteArray out = ASN_STRING_to_QByteArray( id ); - ASN1_OCTET_STRING_free( id ); - return out; -} - -QByteArray SslCertificate::toHex( const QByteArray &in, QChar separator ) -{ - QByteArray ret = in.toHex().toUpper(); - for( int i = 2; i < ret.size(); i += 3 ) - ret.insert( i, separator ); - return ret; -} - -QString SslCertificate::toString( const QString &format ) const -{ - QRegExp r( "[a-zA-Z]+" ); - QString ret = format; - int pos = 0; - while( (pos = r.indexIn( format, pos )) != -1 ) - { - ret.replace( r.cap(0), subjectInfo( r.cap(0).toLatin1() ) ); - pos += r.matchedLength(); - } - return formatName( ret ); -} - -#if QT_VERSION < 0x040600 -// Workaround qt bugs < 4.6 -QByteArray SslCertificate::serialNumber() const -{ - if( !handle() ) - return QByteArray(); - return QByteArray::number( qlonglong(ASN1_INTEGER_get( ((X509*)handle())->cert_info->serialNumber )) ); -} - -QByteArray SslCertificate::version() const -{ - if( !handle() ) - return QByteArray(); - return QByteArray::number( qlonglong(ASN1_INTEGER_get( ((X509*)handle())->cert_info->version )) + 1 ); -} - -#endif - - - -class PKCS12CertificatePrivate -{ -public: - PKCS12CertificatePrivate(): error(PKCS12Certificate::Unknown) {} - void init( const QByteArray &data, const QByteArray &pin ); - void setLastError(); - - QSslCertificate cert; - QSslKey key; - PKCS12Certificate::ErrorType error; - QString errorString; -}; - -void PKCS12CertificatePrivate::init( const QByteArray &data, const QByteArray &pin ) -{ - BIO *bio = BIO_new_mem_buf( const_cast(data.constData()), data.size() ); - if( !bio ) - return setLastError(); - - PKCS12 *p12 = d2i_PKCS12_bio( bio, NULL ); - BIO_free( bio ); - if( !p12 ) - return setLastError(); - - X509 *c = NULL; - EVP_PKEY *k = NULL; - int ret = PKCS12_parse( p12, pin.constData(), &k, &c, NULL ); - PKCS12_free( p12 ); - if( !ret ) - return setLastError(); - - cert = SslCertificate::fromX509( Qt::HANDLE(c) ); - key = SslCertificate::keyFromEVP( Qt::HANDLE(k) ); - - X509_free( c ); - EVP_PKEY_free( k ); -} - -void PKCS12CertificatePrivate::setLastError() -{ - unsigned long err = ERR_get_error(); - if( ERR_GET_LIB(err) == ERR_LIB_PKCS12 ) - { - switch( ERR_GET_REASON(err) ) - { - case PKCS12_R_MAC_VERIFY_FAILURE: error = PKCS12Certificate::InvalidPassword; break; - default: error = PKCS12Certificate::Unknown; break; - } - } - else - error = PKCS12Certificate::Unknown; - errorString = ERR_error_string( err, NULL ); -} - - - -PKCS12Certificate::PKCS12Certificate( QIODevice *device, const QByteArray &pin ) -: d(new PKCS12CertificatePrivate) -{ if( device ) d->init( device->readAll(), pin ); } - -PKCS12Certificate::PKCS12Certificate( const QByteArray &data, const QByteArray &pin ) -: d(new PKCS12CertificatePrivate) -{ d->init( data, pin ); } - -PKCS12Certificate::~PKCS12Certificate() { delete d; } -QSslCertificate PKCS12Certificate::certificate() const { return d->cert; } -PKCS12Certificate::ErrorType PKCS12Certificate::error() const { return d->error; } -QString PKCS12Certificate::errorString() const { return d->errorString; } -bool PKCS12Certificate::isNull() const { return d->cert.isNull() && d->key.isNull(); } -QSslKey PKCS12Certificate::key() const { return d->key; } diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.h qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/SslCertificate.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -#include - -class SslCertificate: public QSslCertificate -{ -public: - enum KeyUsage - { - DigitalSignature = 0, - NonRepudiation, - KeyEncipherment, - DataEncipherment, - KeyAgreement, - KeyCertificateSign, - CRLSign, - EncipherOnly, - DecipherOnly, - }; - - SslCertificate( const QSslCertificate &cert ); - - QByteArray authorityKeyIdentifier() const; - QStringList enhancedKeyUsage() const; - static QString formatDate( const QDateTime &date, const QString &format ); - static QString formatName( const QString &name ); - static QSslCertificate fromX509( Qt::HANDLE x509 ); - static QSslKey keyFromEVP( Qt::HANDLE evp ); - QString issuerInfo( SubjectInfo info ) const; - QString issuerInfo( const QByteArray &tag ) const; - bool isTempel() const; - bool isTest() const; - QHash keyUsage() const; - QStringList policies() const; - QString policyInfo( const QString &oid ) const; - QString subjectInfo( SubjectInfo subject ) const; - QString subjectInfo( const QByteArray &tag ) const; - QByteArray subjectKeyIdentifier() const; - static QByteArray toHex( const QByteArray &in, QChar separator = ' ' ); - QString toString( const QString &format ) const; - -#if QT_VERSION < 0x040600 - QByteArray serialNumber() const; - QByteArray version() const; -#endif - -private: - void* getExtension( int nid ) const; - QByteArray subjectInfoToString( SubjectInfo info ) const; - QMap mapFromOnlineName( const QString &name ) const; -}; - -class PKCS12CertificatePrivate; -class PKCS12Certificate -{ -public: - enum ErrorType - { - InvalidPassword = 1, - Unknown = -1, - }; - PKCS12Certificate( QIODevice *device, const QByteArray &pin ); - PKCS12Certificate( const QByteArray &data, const QByteArray &pin ); - ~PKCS12Certificate(); - - QSslCertificate certificate() const; - ErrorType error() const; - QString errorString() const; - bool isNull() const; - QSslKey key() const; - -private: - PKCS12CertificatePrivate *d; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.cpp qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.cpp 2010-09-30 15:15:55.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,420 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "sslConnect_p.h" - -#include "PinDialog.h" -#include "Settings.h" -#include "SslCertificate.h" - -#include -#include -#include -#include -#include - -#ifndef PKCS11_MODULE -# if defined(_WIN32) -# define PKCS11_MODULE "opensc-pkcs11.dll" -# elif defined(__APPLE__) -# define PKCS11_MODULE "/Library/OpenSC/lib/opensc-pkcs11.so" -# else -# define PKCS11_MODULE "opensc-pkcs11.so" -# endif -#endif - -// PKCS#11 -#define CKR_OK (0) -#define CKR_CANCEL (1) -#define CKR_FUNCTION_CANCELED (0x50) -#define CKR_PIN_INCORRECT (0xa0) -#define CKR_PIN_LOCKED (0xa4) - - - -class sslError: public std::runtime_error -{ -public: - sslError() : std::runtime_error("openssl error") - { - unsigned long err = ERR_get_error(); - std::ostringstream buf; - buf << ERR_func_error_string( err ) << " (" << ERR_reason_error_string( err ) << ")"; - desc = buf.str(); - } - ~sslError() throw () {} - - virtual const char *what() const throw() { return desc.c_str(); } - void static check( bool result ) { if( !result ) throw sslError(); } - - std::string desc; -}; - - - -SSLThread::SSLThread( PKCS11_SLOT *slot, QObject *parent ) -: QThread(parent), loginResult(CKR_OK), m_slot(slot) {} - -SSLThread::~SSLThread() { wait(); } - -void SSLThread::run() -{ - if( PKCS11_login( m_slot, 0, NULL ) < 0 ) - loginResult = ERR_GET_REASON( ERR_get_error() ); -} - - - -SSLConnectPrivate::SSLConnectPrivate() -: unload( true ) -, p11( PKCS11_CTX_new() ) -, p11loaded( false ) -, sctx( NULL ) -, ssl( NULL ) -, reader( -1 ) -, nslots( 0 ) -, error( SSLConnect::UnknownError ) -{} - -SSLConnectPrivate::~SSLConnectPrivate() -{ - if( ssl ) - { - SSL_shutdown( ssl ); - SSL_free( ssl ); - } - SSL_CTX_free( sctx ); - if( nslots ) - PKCS11_release_all_slots( p11, pslots, nslots ); - if( unload ) - PKCS11_CTX_unload( p11 ); - PKCS11_CTX_free( p11 ); - - ERR_remove_state(0); -} - -bool SSLConnectPrivate::connectToHost( SSLConnect::RequestType type ) -{ - if( !p11loaded ) - throw std::runtime_error( errorString.toStdString() ); - - if( PKCS11_enumerate_slots( p11, &pslots, &nslots ) || !nslots ) - throw std::runtime_error( SSLConnect::tr( "failed to list slots" ).toStdString() ); - - // Find token - PKCS11_SLOT *slot = 0; - if( reader >= 0 ) - { - if ( (unsigned int)reader*4 > nslots ) - throw std::runtime_error( SSLConnect::tr( "token failed" ).toStdString() ); - slot = &pslots[reader*4]; - } - else - { - for( unsigned int i = 0; i < nslots; ++i ) - { - if( (&pslots[i])->token && - card.contains( (&pslots[i])->token->serialnr ) ) - { - slot = &pslots[i]; - break; - } - } - } - if( !slot || !slot->token ) - throw std::runtime_error( SSLConnect::tr("no token available").toStdString() ); - - // Find token cert - PKCS11_CERT *certs; - unsigned int ncerts; - if( PKCS11_enumerate_certs(slot->token, &certs, &ncerts) || !ncerts ) - throw std::runtime_error( SSLConnect::tr("no certificate available").toStdString() ); - PKCS11_CERT *authcert = &certs[0]; - if( !SslCertificate::fromX509( Qt::HANDLE(authcert->x509) ).isValid() ) - throw std::runtime_error( SSLConnect::tr("Certificate is not valid").toStdString() ); - - // Login token - if( slot->token->loginRequired ) - { - PinDialog *p = new PinDialog( - slot->token->secureLogin ? PinDialog::Pin1PinpadType : PinDialog::Pin1Type, - SslCertificate::fromX509( Qt::HANDLE(authcert->x509) ), qApp->activeWindow() ); - p->setWindowModality( Qt::ApplicationModal ); - unsigned long err = CKR_OK; - if( !slot->token->secureLogin ) - { - QString validatePin; - if( pin.isNull() ) - { - if( !p->exec() ) - { - p->deleteLater(); - throw std::runtime_error( "" ); - } - validatePin = p->text(); - p->deleteLater(); - QCoreApplication::processEvents(); - } - else - validatePin = pin; - if( PKCS11_login(slot, 0, validatePin.toUtf8()) < 0 ) - { - pin = QString(); - err = ERR_GET_REASON( ERR_get_error() ); - } - else - pin = validatePin; - } - else - { - pin.clear(); - p->show(); - SSLThread *t = new SSLThread( slot ); - t->start(); - do - { - QCoreApplication::processEvents(); - t->wait( 1 ); - } - while( t->isRunning() ); - delete p; - err = t->loginResult; - delete t; - } - switch( err ) - { - case CKR_OK: break; - case CKR_CANCEL: - case CKR_FUNCTION_CANCELED: - throw std::runtime_error( "" ); break; - case CKR_PIN_INCORRECT: - throw std::runtime_error( "PIN1Invalid" ); break; - case CKR_PIN_LOCKED: - throw std::runtime_error( "PINLocked" ); break; - default: - throw std::runtime_error( "PIN1Invalid" ); break; - } - } - - // Find token key - PKCS11_KEY *authkey = PKCS11_find_key( authcert ); - if ( !authkey ) - throw std::runtime_error( SSLConnect::tr("no key matching certificate available").toStdString() ); - EVP_PKEY *pkey = PKCS11_get_private_key( authkey ); - - sctx = SSL_CTX_new( SSLv23_client_method() ); - sslError::check( SSL_CTX_use_certificate(sctx, authcert->x509 ) ); - sslError::check( SSL_CTX_use_PrivateKey(sctx,pkey) ); - sslError::check( SSL_CTX_check_private_key(sctx) ); - sslError::check( SSL_CTX_set_mode( sctx, SSL_MODE_AUTO_RETRY ) ); - -#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION - SSL_CTX_set_options(sctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION); -#endif - - ssl = SSL_new( sctx ); - - BIO *sock; - switch( type ) - { - case SSLConnect::AccessCert: - case SSLConnect::MobileInfo: sock = BIO_new_connect( const_cast(SK) ); break; - default: sock = BIO_new_connect( const_cast(EESTI) ); break; - } - - BIO_set_conn_port( sock, "https" ); - if( BIO_do_connect( sock ) <= 0 ) - throw std::runtime_error( SSLConnect::tr( "Failed to connect to host. Are you connected to the internet?" ).toStdString() ); - - SSL_set_bio( ssl, sock, sock ); - sslError::check( SSL_connect( ssl ) ); - -#if defined(Q_OS_MAC) && OPENSSL_VERSION_NUMBER <= 0x009080cfL -#ifndef SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION -#define SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x0010 -#endif - ssl->s3->flags |= SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; -#endif - - return true; -} - -QByteArray SSLConnectPrivate::getRequest( const QString &request ) const -{ - QByteArray data = request.toUtf8(); - sslError::check( SSL_write( ssl, data.constData(), data.length() ) ); - - int bytesRead = 0; - char readBuffer[4096]; - QByteArray buffer; - do - { - bytesRead = SSL_read( ssl, &readBuffer, 4096 ); - - if( bytesRead <= 0 ) - { - switch( SSL_get_error( ssl, bytesRead ) ) - { - case SSL_ERROR_NONE: - case SSL_ERROR_WANT_READ: - case SSL_ERROR_WANT_WRITE: - case SSL_ERROR_ZERO_RETURN: // Disconnect - break; - default: - sslError::check( 0 ); - break; - } - } - - if( bytesRead > 0 ) - buffer += QByteArray( (const char*)&readBuffer, bytesRead ); - } while( bytesRead > 0 ); - - int pos = buffer.indexOf( "\r\n\r\n" ); - return pos ? buffer.mid( pos + 4 ) : buffer; -} - - - -SSLConnect::SSLConnect( QObject *parent ) -: QObject( parent ) -, d( new SSLConnectPrivate() ) -{ - setPKCS11( PKCS11_MODULE ); -} - -SSLConnect::~SSLConnect() { delete d; } - -QByteArray SSLConnect::getUrl( RequestType type, const QString &value ) -{ - if( !d->connectToHost( type ) ) - return QByteArray(); - - QString header; - switch( type ) - { - case AccessCert: - { - QString lang; - switch( QLocale().language() ) - { - case QLocale::English: lang = "en"; break; - case QLocale::Russian: lang = "ru"; break; - case QLocale::Estonian: - default: lang = "et"; break; - } - - QString request = QString( - "" - "" - "" - "%1" - "" - "DigiDoc3" - "" - "" - "" - "" ) - .arg( lang.toUpper() ); - header = QString( - "POST /id/GetAccessTokenWSProxy/ HTTP/1.1\r\n" - "Host: %1\r\n" - "Content-Type: text/xml\r\n" - "Content-Length: %2\r\n" - "SOAPAction: \"\"\r\n" - "Connection: close\r\n\r\n" - "%3" ) - .arg( SK ).arg( request.size() ).arg( request ); - break; - } - case EmailInfo: - header = "GET /idportaal/postisysteem.naita_suunamised HTTP/1.0\r\n\r\n"; - break; - case ActivateEmails: - header = QString( "GET /idportaal/postisysteem.lisa_suunamine?%1 HTTP/1.0\r\n\r\n" ).arg( value ); - break; - case MobileInfo: - header = value; - break; - case PictureInfo: - header = "GET /idportaal/portaal.idpilt HTTP/1.0\r\n\r\n"; - break; - default: return QByteArray(); - } - return d->getRequest( header ); -} - -SSLConnect::ErrorType SSLConnect::error() const { return d->error; } -QString SSLConnect::errorString() const { return d->errorString; } -QString SSLConnect::pin() const { return d->pin; } -QByteArray SSLConnect::result() const { return d->result; } -void SSLConnect::setCard( const QString &card ) { d->card = card; } -void SSLConnect::setPin( const QString &pin ) { d->pin = pin; } -void SSLConnect::setPKCS11( const QString &pkcs11, bool unload ) -{ - if( d->p11loaded && d->unload ) - PKCS11_CTX_unload( d->p11 ); - d->unload = unload; - d->p11loaded = PKCS11_CTX_load( d->p11, pkcs11.toUtf8() ) == 0; - if( !d->p11loaded ) - { - d->error = UnknownError; - d->errorString = tr("failed to load pkcs11 module '%1'").arg( pkcs11 ); - } -} -void SSLConnect::setReader( int reader ) { d->reader = reader; } - -void SSLConnect::waitForFinished( RequestType type, const QString &value ) -{ - try { d->result = getUrl( type, value ); } - catch( const std::runtime_error &e ) - { - if( qstrcmp( e.what(), "" ) == 0 ) - { - d->error = SSLConnect::PinCanceledError; - d->errorString = tr("PIN canceled"); - } - else if( qstrcmp( e.what(), "PIN1Invalid" ) == 0 ) - { - d->error = SSLConnect::PinInvalidError; - d->errorString = tr("Invalid PIN"); - } - else if( qstrcmp( e.what(), "PINLocked" ) == 0 ) - { - d->error = SSLConnect::PinLocked; - d->errorString = tr("Pin locked"); - } - else - { - d->error = SSLConnect::UnknownError; - d->errorString = e.what(); - } - return; - } - d->error = SSLConnect::UnknownError; - d->errorString.clear(); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.h qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -#define EESTI "sisene.www.eesti.ee" -#define SK "www.openxades.org" - -class SSLConnectPrivate; -class SSLConnect: public QObject -{ - Q_OBJECT - -public: - enum RequestType { - EmailInfo, - ActivateEmails, - MobileInfo, - PictureInfo, - AccessCert - }; - enum ErrorType { - PinCanceledError = 1, - PinInvalidError = 2, - PinLocked = 3, - UnknownError = -1, - }; - - SSLConnect( QObject *parent = 0 ); - ~SSLConnect(); - - ErrorType error() const; - QString errorString() const; - QByteArray getUrl( RequestType type, const QString &value = "" ); - QString pin() const; - QByteArray result() const; - void setCard( const QString &card ); - void setPin( const QString &pin ); - void setPKCS11( const QString &pkcs11, bool unload = true ); - void setReader( int reader ); - void waitForFinished( RequestType type, const QString &value = "" ); - -private: - SSLConnectPrivate *d; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect_p.h qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect_p.h --- qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect_p.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/sslConnect_p.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * QEstEidCommon - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include "sslConnect.h" - -#include - -#include - -#include - -class SSLConnectPrivate -{ -public: - SSLConnectPrivate(); - ~SSLConnectPrivate(); - - bool connectToHost( SSLConnect::RequestType type ); - QByteArray getRequest( const QString &request ) const; - - bool unload; - PKCS11_CTX *p11; - bool p11loaded; - SSL_CTX *sctx; - SSL *ssl; - - QString card; - QString pin; - int reader; - - unsigned int nslots; - PKCS11_SLOT *pslots; - - SSLConnect::ErrorType error; - QString errorString; - QByteArray result; -}; - -class SSLThread: public QThread -{ - Q_OBJECT -public: - SSLThread( PKCS11_SLOT *slot, QObject *parent = 0 ); - ~SSLThread(); - unsigned long loginResult; - -private: - void run(); - - PKCS11_SLOT *m_slot; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_en.ts qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_en.ts --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_en.ts 2010-01-21 15:07:37.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_en.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,310 +0,0 @@ - - - - - CertificateDialog - - Save certificate - Save certificate - - - Failed to save file - Failed to save file - - - Certificate Information - Certificate Information - - - This certificate is intended for following purpose(s): - This certificate is intended for following purpose(s): - - - Issued to: - Issued to: - - - Issued by: - Issued by: - - - Valid from - Valid from - - - to - to - - - Version - Version - - - Serial number - Serial number - - - Signature algorithm - Signature algorithm - - - Issuer - Issuer - - - Vaild to - Vaild to - - - Subject - Subject - - - Public key - Public key - - - Certificate policies - Certificate policies - - - Certificate - Certificate - - - General - General - - - Details - Details - - - Field - Field - - - Value - Value - - - Certification Path - Certification Path - - - Certificate status: - Certificate status: - - - Certificates (*.cer *.crt *.pem) - Certificates (*.cer *.crt *.pem) - - - Enhanched key usage - Enhanched key usage - - - Key usage - Key usage - - - Authority key identifier - Authority key identifier - - - Subject key identifier - Subject key identifier - - - - CheckConnection - - Check proxy settings - Check proxy settings - - - Check proxy username and password - Check proxy username and password - - - Check internet connection - Check internet connection - - - - Common - - Company - Company - - - Register code - Register code - - - Name - Name - - - Personal code - Personal code - - - Card in reader - Card number - - - Auth certificate is - Auth certificate is - - - Sign certificate is - Sign certificate is - - - valid - valid - - - expired - expired - - - Open utility - Open utility - - - Your certificates will expire soon - Your certificates will expire soon - - - - PinDialog - - Selected action requires auth certificate. - Selected action requires auth certificate. - - - For using auth certificate enter PIN1 - For using auth certificate enter PIN1 - - - Selected action requires sign certificate. - Selected action requires sign certificate. - - - For using sign certificate enter PIN2 - For using sign certificate enter PIN2 - - - For using auth certificate enter PIN1 with pinpad - For using auth certificate enter PIN1 with pinpad - - - For using sign certificate enter PIN2 with pinpad - For using sign certificate enter PIN2 with pinpad - - - - SSLConnect - - PIN canceled - PIN canceled - - - Invalid PIN - Invalid PIN - - - failed to list slots - failed to list slots - - - token failed - token failed - - - no token available - no token available - - - no certificate available - no certificate available - - - no key matching certificate available - no key matching certificate available - - - Failed to connect to host. Are you connected to the internet? - Failed to connect to host. Are you connected to the internet? - - - Pin locked - Pin locked - - - failed to load pkcs11 module '%1' - failed to load pkcs11 module '%1' - - - Certificate is not valid - Certificate is not valid - - - - SslCertificate - - All application policies - All application policies - - - Proves your identity to a remote computer - Proves your identity to a remote computer - - - Protects e-mail messages - Protects e-mail messages - - - OCSP signing - OCSP signing - - - Digital signature - Digital signature - - - Non repudiation - Non repudiation - - - Key encipherment - Key encipherment - - - Data encipherment - Data encipherment - - - Key agreement - Key agreement - - - Key certificate sign - Key certificate sign - - - CRL sign - CRL sign - - - Encipher only - Encipher only - - - Decipher only - Decipher only - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_et.ts qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_et.ts --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_et.ts 2010-01-21 15:07:37.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_et.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,310 +0,0 @@ - - - - - CertificateDialog - - Save certificate - Salvesta sertifikaat - - - Failed to save file - Salvestamine ebaõnnestus - - - Certificate Information - Sertifikaadi info - - - This certificate is intended for following purpose(s): - Selle sertifikaadi otstarve on: - - - Issued to: - Kellele väljastatud: - - - Issued by: - Väljastaja: - - - Valid from - Kehtiv alates - - - to - kuni - - - Version - Versioon - - - Serial number - Seeria number - - - Signature algorithm - Signatuuri algoritm - - - Issuer - Väljaandja - - - Vaild to - Kehtiv kuni - - - Subject - Subjekt - - - Public key - Avalik võti - - - Certificate policies - Sertifikaadi reeglid - - - Certificate - Sertifikaat - - - General - Üldine - - - Details - Detailid - - - Field - Väli - - - Value - Väärtus - - - Certification Path - Sertifitseermisahel - - - Certificate status: - Sertifikaadi staatus: - - - Certificates (*.cer *.crt *.pem) - Sertifikaadid (*.cer *.crt *.pem) - - - Enhanched key usage - Täiendatud võtme kasutus - - - Key usage - Võtme kasutus - - - Authority key identifier - Juurdepääsutõendi identifikaator - - - Subject key identifier - Objektivõtme identifikaator - - - - CheckConnection - - Check proxy settings - Kontrolli proxy seadeid - - - Check proxy username and password - Kontrolli proxy kasutajanime ja parooli - - - Check internet connection - Kontrolli Interneti ühendust - - - - Common - - Company - Asutus - - - Register code - Registrikood - - - Name - Nimi - - - Personal code - Isikukood - - - Card in reader - Lugejas on kaart - - - Auth certificate is - Isikutuvastuse sertifikaat on - - - Sign certificate is - Allkirjastamise sertifikaat on - - - valid - kehtiv - - - expired - aegunud - - - Open utility - Ava haldusvahend - - - Your certificates will expire soon - Sertifikaadid hakkavad aeguma - - - - PinDialog - - Selected action requires auth certificate. - Valitud tegevuse jaoks on vaja kasutada isikutuvastuse sertifikaati. - - - For using auth certificate enter PIN1 - Sertifikaadi kasutamiseks sisesta PIN1 - - - Selected action requires sign certificate. - Valitud tegevuse jaoks on vaja kasutada allkirjastamise sertifikaati. - - - For using sign certificate enter PIN2 - Sertifikaadi kasutamiseks sisesta PIN2 - - - For using auth certificate enter PIN1 with pinpad - Sertifikaadi kasutamiseks sisesta PIN1 kaardilugeja sõrmistikult - - - For using sign certificate enter PIN2 with pinpad - Sertifikaadi kasutamiseks sisesta PIN2 kaardilugeja sõrmistikult - - - - SSLConnect - - PIN canceled - PIN sisestamine katkestati - - - Invalid PIN - Vale PIN - - - failed to list slots - viga pkcs11 slottide lugemisel - - - token failed - viga "tokeni" laadimisel - - - no token available - ei leitud ühtegi "tokenit" - - - no certificate available - Ei ole kättesaadavaid sertifikaate - - - no key matching certificate available - ei leitud ühtegi sobivat sertifikaati - - - Failed to connect to host. Are you connected to the internet? - Puudub internetiühendus! - - - Pin locked - PIN on lukus - - - failed to load pkcs11 module '%1' - viga pkcs11 mooduli laadimisel '%1' - - - Certificate is not valid - Sertifikaat ei ole kehtiv - - - - SslCertificate - - All application policies - Kõik tarkvara poliisid - - - Proves your identity to a remote computer - Tuvastab sinu isiksust arvuti kaugopereerimisel - - - Protects e-mail messages - Kaitseb e-posti sõnumeid - - - OCSP signing - OCSP allkirjastamine - - - Digital signature - Digitaalne allkiri - - - Non repudiation - Salgamise vääramine - - - Key encipherment - Võtme krüptimine - - - Data encipherment - Andmete krüptimine - - - Key agreement - Aktsepteeritud võti - - - Key certificate sign - Võtme sertifikaadi allkiri - - - CRL sign - CRL allkiri - - - Encipher only - Ainult krüptimine - - - Decipher only - Ainult dekrüptimine - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_ru.ts qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_ru.ts --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_ru.ts 2010-01-18 12:13:18.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_ru.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,310 +0,0 @@ - - - - - CertificateDialog - - Save certificate - Сохранить сертификат - - - Certificates (*.cer *.crt *.pem) - Сертификаты (*.pem *.crt *.cer) - - - Failed to save file - Файл не был сохранён - - - Certificate Information - Информация о сертификате - - - This certificate is intended for following purpose(s): - Предназначение сертификата: - - - Issued to: - Выдан: - - - Issued by: - Выдано: - - - Valid from - Действительно с - - - to - до - - - Version - Версия - - - Serial number - Серийный номер - - - Signature algorithm - Алгоритм подписи - - - Issuer - Выдавший - - - Vaild to - Действительно до - - - Subject - Субъект - - - Public key - Открытый ключ - - - Enhanched key usage - Дополнительное использование ключа - - - Certificate policies - Правила сертификатов - - - Key usage - Использование ключа - - - Certificate - Сертификат - - - General - Общее - - - Details - Детали - - - Field - Поле - - - Value - Значение - - - Certification Path - Путь сертификата - - - Certificate status: - Статус сертификата: - - - Authority key identifier - Идентификатор личного ключа - - - Subject key identifier - Идентификатор ключа заглавия - - - - CheckConnection - - Check proxy settings - Проверте настройки прокси - - - Check proxy username and password - Проверьте имя пользователя и пароль прокси - - - Check internet connection - Проверьте подключение к Интернету - - - - Common - - Company - Учереждение - - - Register code - Код регистра - - - Name - Имя - - - Personal code - Личный код - - - Card in reader - Карта в считывателе - - - Auth certificate is - Сертификаты подписи - - - Sign certificate is - Сертификаты подписи - - - valid - действительны - - - expired - устарели - - - Open utility - Открыть средство управления - - - Your certificates will expire soon - Сертификаты скоро будут недействительны - - - - PinDialog - - Selected action requires auth certificate. - Даннаяй опперация требует личный сертификат. - - - For using auth certificate enter PIN1 - Для использования сертификата введите PIN1 - - - Selected action requires sign certificate. - Для данной опперации необходим сертификат подписи. - - - For using sign certificate enter PIN2 - Для использования сертификата подписи введите PIN2 - - - For using auth certificate enter PIN1 with pinpad - Для использования личного сертификата введите PIN1 с клавиатуры считывателя - - - For using sign certificate enter PIN2 with pinpad - Для использования сертификата подписи введите PIN2 с клавиатуры считывателя - - - - SSLConnect - - PIN canceled - Введение PIN отменено - - - Invalid PIN - Неверный PIN - - - failed to list slots - ошибка при чтении слотов pkcs11 - - - token failed - ошибка при загрузке "token"-а - - - no token available - не найдено ни одного "token"-а - - - no certificate available - Нет доступного сертификата - - - no key matching certificate available - не найдено подходящего сертификата - - - Failed to connect to host. Are you connected to the internet? - Отсутствует подключение к интернету! - - - Pin locked - PIN заблокирован - - - failed to load pkcs11 module '%1' - ошибка при загрузке модуля pkcs11 '%1' - - - Certificate is not valid - Сертификат не действителен - - - - SslCertificate - - All application policies - Все полисы приложений - - - Proves your identity to a remote computer - Подтверждает Вашу личность на отдалённом компьютере - - - Protects e-mail messages - Защищает сообщения электронной почты - - - OCSP signing - OCSP подписывание - - - Digital signature - Дигитальная подпись - - - Non repudiation - Невозможность отказа - - - Key encipherment - Зашифровка ключа - - - Data encipherment - Зашифровка данных - - - Key agreement - Подтверждение ключа - - - Key certificate sign - Подпись ключа сертификата - - - CRL sign - CRL подпись - - - Encipher only - Только зашифровка - - - Decipher only - Только разшифровка - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_tr.qrc.cmake qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_tr.qrc.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_tr.qrc.cmake 2010-01-21 13:14:31.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/common_tr.qrc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - @QM_DIR@/common_en.qm - @QM_DIR@/common_et.qm - @QM_DIR@/common_ru.qm - @QM_DIR@/qt_et.qm - @QM_DIR@/qt_ru.qm - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_et.ts qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_et.ts --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_et.ts 2009-12-17 06:02:32.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_et.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,6288 +0,0 @@ - - - - - AudioOutput - - - <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> - - - - <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - - - - Revert back to device '%1' - - - - - CloseButton - - - Close Tab - Sulge kaart - - - - Phonon:: - - - Notifications - Hoiatused - - - Music - Muusika - - - Video - Video - - - Communication - - - - Games - Mängud - - - Accessibility - - - - - Phonon::Gstreamer::Backend - - - Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. - Some video features have been disabled. - - - - Warning: You do not seem to have the base GStreamer plugins installed. - All audio and video support has been disabled - - - - - Phonon::Gstreamer::MediaObject - - - Cannot start playback. - -Check your Gstreamer installation and make sure you -have libgstreamer-plugins-base installed. - - - - A required codec is missing. You need to install the following codec(s) to play this content: %0 - - - - Could not open media source. - - - - Invalid source type. - - - - Could not locate media source. - - - - Could not open audio device. The device is already in use. - - - - Could not decode media source. - - - - - Phonon::VolumeSlider - - Volume: %1% - - - - Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - - - - - Q3Accel - - - %1, %2 not defined - - - - Ambiguous %1 not handled - - - - - Q3DataTable - - - True - - - - False - - - - Insert - - - - Update - - - - Delete - - - - - Q3FileDialog - - - Copy or Move a File - - - - Read: %1 - - - - Write: %1 - - - - Cancel - - - - - All Files (*) - - - - Name - - - - Size - - - - Type - - - - Date - - - - Attributes - - - - &OK - - - - Look &in: - - - - File &name: - - - - File &type: - - - - Back - - - - One directory up - - - - Create New Folder - - - - List View - - - - Detail View - - - - Preview File Info - - - - Preview File Contents - - - - Read-write - - - - Read-only - - - - Write-only - - - - Inaccessible - - - - Symlink to File - - - - Symlink to Directory - - - - Symlink to Special - - - - File - - - - Dir - - - - Special - - - - - Open - - - - - Save As - - - - &Open - - - - &Save - - - - &Rename - - - - &Delete - - - - R&eload - - - - Sort by &Name - - - - Sort by &Size - - - - Sort by &Date - - - - &Unsorted - - - - Sort - - - - Show &hidden files - - - - the file - - - - the directory - - - - the symlink - - - - Delete %1 - - - - <qt>Are you sure you wish to delete %1 "%2"?</qt> - - - - &Yes - - - - &No - - - - New Folder 1 - - - - New Folder - - - - New Folder %1 - - - - Find Directory - - - - Directories - - - - Directory: - - - - Error - - - - %1 -File not found. -Check path and filename. - - - - All Files (*.*) - - - - Open - - - - Select a Directory - - - - - Q3LocalFs - - Could not read directory -%1 - - - - Could not create directory -%1 - - - - Could not remove file or directory -%1 - - - - Could not rename -%1 -to -%2 - - - - Could not open -%1 - - - - Could not write -%1 - - - - - Q3MainWindow - - - Line up - - - - Customize... - - - - - Q3NetworkProtocol - - - Operation stopped by the user - - - - - Q3ProgressDialog - - Cancel - - - - - Q3TabDialog - - OK - - - - Apply - - - - Help - - - - Defaults - - - - Cancel - - - - - Q3TextEdit - - - &Undo - - - - &Redo - - - - Cu&t - - - - &Copy - - - - &Paste - - - - Clear - - - - Select All - - - - - Q3TitleBar - - - System - - - - Restore up - - - - Minimize - - - - Restore down - - - - Maximize - - - - Close - - - - Contains commands to manipulate the window - - - - Puts a minimized back to normal - - - - Moves the window out of the way - - - - Puts a maximized window back to normal - - - - Makes the window full screen - - - - Closes the window - - - - Displays the name of the window and contains controls to manipulate it - - - - - Q3ToolBar - - - More... - - - - - Q3UrlOperator - - The protocol `%1' is not supported - - - - The protocol `%1' does not support listing directories - - - - The protocol `%1' does not support creating new directories - - - - The protocol `%1' does not support removing files or directories - - - - The protocol `%1' does not support renaming files or directories - - - - The protocol `%1' does not support getting files - - - - The protocol `%1' does not support putting files - - - - The protocol `%1' does not support copying or moving files or directories - - - - (unknown) - - - - - Q3Wizard - - - &Cancel - - - - < &Back - - - - &Next > - - - - &Finish - - - - &Help - - - - - QAbstractSocket - - Host not found - Masinat ei leitud - - - - Connection refused - Ühendusest keelduti - - - Connection timed out - Ühendus aegus - - - Operation on socket is not supported - Sokli toiming ei ole toetatud - - - Socket operation timed out - Soklitoiming aegus - - - Socket is not connected - Sokkel pole ühendatud - - - Network unreachable - Võrk ei ole kättesaadav - - - - QAbstractSpinBox - - - &Step up - &Samm üles - - - Step &down - S&amm alla - - - &Select All - &Vali kõik - - - - QApplication - - - Activate - Aktiveeri - - - - Executable '%1' requires Qt %2, found Qt %3. - - - - Incompatible Qt Library Error - - - - - QT_LAYOUT_DIRECTION - Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. - LTR - - - - Activates the program's main window - Aktiveerib programmi peaakna - - - - QAxSelect - - Select ActiveX Control - - - - OK - - - - &Cancel - - - - COM &Object: - - - - - QCheckBox - - - Uncheck - Eemalda märge - - - Check - Märgi - - - Toggle - Lülita - - - - QColorDialog - - - Hu&e: - - - - &Sat: - - - - &Val: - - - - &Red: - - - - &Green: - - - - Bl&ue: - - - - A&lpha channel: - - - - Select Color - - - - &Basic colors - - - - &Custom colors - - - - &Add to Custom Colors - - - - - QComboBox - - Open - Ava - - - - False - Väär - - - True - Tõene - - - - Close - Sulge - - - - QCoreApplication - - - %1: key is empty - QSystemSemaphore - %1: võti on tühi - - - %1: unable to make key - QSystemSemaphore - %1: võtme loomine nurjus - - - %1: ftok failed - QSystemSemaphore - %1: ftok nurjus" - - - - QDB2Driver - - - Unable to connect - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - Unable to set autocommit - - - - - QDB2Result - - Unable to execute statement - - - - Unable to prepare statement - - - - Unable to bind variable - - - - Unable to fetch record %1 - - - - Unable to fetch next - - - - Unable to fetch first - - - - - QDateTimeEdit - - - AM - AM - - - am - am - - - PM - PM - - - pm - pm - - - - QDial - - - QDial - - - - SpeedoMeter - - - - SliderHandle - - - - - QDialog - - - What's This? - Mis see on? - - - Done - Tehtud - - - - QDialogButtonBox - - - OK - OK - - - - &OK - &OK - - - &Save - &Salvesta - - - Save - Salvesta - - - Open - Ava - - - &Cancel - &Loobu - - - Cancel - Loobu - - - &Close - S&ulge - - - Close - Sulge - - - Apply - Rakenda - - - Reset - Lähtesta - - - Help - Abi - - - Don't Save - Ära salvesta - - - Discard - Unusta - - - &Yes - &Jah - - - Yes to &All - J&ah kõigile - - - &No - &Ei - - - N&o to All - E&i kõigile - - - Save All - Salvesta kõik - - - Abort - Katkesta - - - Retry - Proovi uuesti - - - Ignore - Eira - - - Restore Defaults - Vaikeväärtused - - - Close without Saving - Sulge salvestamata - - - - QDirModel - - - Name - Nimi - - - Size - Suurus - - - Kind - Match OS X Finder - Laad - - - Type - All other platforms - Tüüp - - - Date Modified - Muutmise kuupäev - - - - QDockWidget - - - Close - Sulge - - - Dock - Doki - - - Float - Ujuvaks - - - - QDoubleSpinBox - - More - Rohkem - - - Less - Vähem - - - - QErrorMessage - - - Debug Message: - - - - Warning: - - - - Fatal Error: - - - - &Show this message again - - - - &OK - - - - - QFile - - Destination file exists - Sihtfail on olemas - - - Cannot open %1 for input - %1 avamine sisendiks nurjus - - - Cannot open for output - Avamine väljundiks nurjus - - - Failure to write block - Ploki kirjutamine nurjus - - - Cannot create %1 for output - %1 loomine väljundiks nurjus - - - - QFileDialog - - All Files (*) - - - - Directories - - - - &Open - - - - &Save - - - - Open - Ava - - - %1 already exists. -Do you want to replace it? - %1 on juba olemas. -Kas kirjutada see üle? - - - %1 -File not found. -Please verify the correct file name was given. - - - - - My Computer - Minu arvuti - - - &Rename - - - - &Delete - - - - Show &hidden files - - - - Back - Tagasi - - - Parent Directory - - - - List View - - - - Detail View - - - - Files of type: - - - - Directory: - - - - %1 -Directory not found. -Please verify the correct directory name was given. - - - - '%1' is write protected. -Do you want to delete it anyway? - - - - Are sure you want to delete '%1'? - - - - Could not delete directory. - - - - Recent Places - - - - - All Files (*.*) - - - - Save As - - - - - Drive - Ketas - - - File - Fail - - - Unknown - Tundmatu - - - Find Directory - - - - Show - Näita - - - Forward - - - - - New Folder - - - - &New Folder - - - - &Choose - - - - - Remove - Eemalda - - - File &name: - - - - Look in: - - - - Create New Folder - - - - - QFileSystemModel - - - Invalid filename - Vigane failinimi - - - <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - <b>Nime \"%1\" ei saa kasutada.</b><p>Proovi mõnda muud nime, milles oleks vähem tähti või puuduksid kirjavahemärgid. - - - Name - Nimi - - - Size - Suurus - - - Kind - Match OS X Finder - Laad - - - Type - All other platforms - Tüüp - - - Date Modified - Muutmise kuupäev - - - - My Computer - Minu arvuti - - - Computer - Arvuti - - - %1 TB - %1 TB - - - %1 GB - %1 GB - - - %1 MB - %1 MB - - - %1 KB - %1 KB - - - %1 bytes - %1 bytes - - - - QFontDatabase - - Normal - - - - Bold - - - - Demi Bold - - - - Black - - - - Demi - - - - Light - - - - Italic - - - - Oblique - - - - Any - - - - Latin - - - - Greek - - - - Cyrillic - - - - Armenian - - - - Hebrew - - - - Arabic - - - - Syriac - - - - Thaana - - - - Devanagari - - - - Bengali - - - - Gurmukhi - - - - Gujarati - - - - Oriya - - - - Tamil - - - - Telugu - - - - Kannada - - - - Malayalam - - - - Sinhala - - - - Thai - - - - Lao - - - - Tibetan - - - - Myanmar - - - - Georgian - - - - Khmer - - - - Simplified Chinese - - - - Traditional Chinese - - - - Japanese - - - - Korean - - - - Vietnamese - - - - Symbol - - - - Ogham - - - - Runic - - - - - QFontDialog - - - &Font - - - - Font st&yle - - - - &Size - - - - Effects - - - - Stri&keout - - - - &Underline - - - - Sample - - - - Wr&iting System - - - - Select Font - - - - - QFtp - - - Not connected - - - - - Host %1 not found - - - - - Connection refused to host %1 - - - - Connection timed out to host %1 - - - - Connected to host %1 - - - - Connection refused for data connection - - - - Unknown error - - - - - Connecting to host failed: -%1 - - - - - Login failed: -%1 - - - - - Listing directory failed: -%1 - - - - - Changing directory failed: -%1 - - - - - Downloading file failed: -%1 - - - - - Uploading file failed: -%1 - - - - - Removing file failed: -%1 - - - - - Creating directory failed: -%1 - - - - - Removing directory failed: -%1 - - - - Connection closed - - - - Host %1 found - - - - Connection to %1 closed - - - - Host found - - - - Connected to host - - - - - QHostInfo - - - Unknown error - Tundmatu viga - - - - QHostInfoAgent - - Host not found - - - - Unknown address type - - - - Unknown error - - - - - QHttp - - Unknown error - - - - Request aborted - - - - - No server set to connect to - - - - - Wrong content length - - - - - Server closed connection unexpectedly - - - - Error writing response to device - - - - - Connection refused - - - - - Host %1 not found - - - - - HTTP request failed - - - - - Invalid HTTP response header - - - - Invalid HTTP chunked body - - - - - Host %1 found - - - - Connected to host %1 - - - - Connection to %1 closed - - - - Host found - - - - Connected to host - - - - - Connection closed - - - - Proxy authentication required - - - - Authentication required - - - - Connection refused (or timed out) - - - - - Proxy requires authentication - Proksi server vajab autentimist - - - Host requires authentication - - - - Data corrupted - - - - Unknown protocol specified - - - - SSL handshake failed - - - - HTTPS connection requested but SSL support not compiled in - - - - - QHttpSocketEngine - - Did not receive HTTP response from proxy - - - - Error parsing authentication request from proxy - - - - Authentication required - - - - Proxy denied connection - - - - Error communicating with HTTP proxy - - - - Proxy server not found - - - - Proxy connection refused - - - - Proxy server connection timed out - - - - Proxy connection closed prematurely - - - - - QIBaseDriver - - - Error opening database - - - - Could not start transaction - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - - QIBaseResult - - Unable to create BLOB - - - - Unable to write BLOB - - - - Unable to open BLOB - - - - Unable to read BLOB - - - - Could not find array - - - - Could not get array data - - - - Could not get query info - - - - Could not start transaction - - - - Unable to commit transaction - - - - Could not allocate statement - - - - Could not prepare statement - - - - Could not describe input statement - - - - Could not describe statement - - - - Unable to close statement - - - - Unable to execute query - - - - Could not fetch next item - - - - Could not get statement info - - - - - QIODevice - - - Permission denied - Õigustest ei piisa - - - Too many open files - Liiga palju avatud faile - - - No such file or directory - Sellist faili või kataloogi ei ole - - - No space left on device - Seadmel pole enam vaba ruumi - - - - Unknown error - Tundmatu viga - - - - QInputContext - - - XIM - - - - XIM input method - - - - Windows input method - - - - Mac OS X input method - - - - - QInputDialog - - - Enter a value: - Sisesta väärtus: - - - - QLibrary - - - Could not mmap '%1': %2 - Nurjus mmap '%1': %2 - - - Plugin verification data mismatch in '%1' - Plugin kontrollimisandmed ei klapi asukohas '%1' - - - Could not unmap '%1': %2 - Nurjus unmap '%1': %2 - - - The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - Plugin '%1' kasutab ühildumatut Qt teeki. (%2.%3.%4) [%5] - - - The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - Plugin '%1' kasutab ühildumatut Qt teeki. Oodati ehitamisvõtit \"%2\", aga saadi \"%3\" - - - Unknown error - Tundmatu viga - - - - The shared library was not found. - Jagatud teeki ei leitud. - - - The file '%1' is not a valid Qt plugin. - Fail '%1' ei ole korrektne Qt plugin. - - - The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - Plugin '%1' kasutab ühildumatut Qt teeki. (Ei tohi segada silumis- ja väljalasteteeke.) - - - - Cannot load library %1: %2 - Teegi %1 laadimine nurjus: %2 - - - - Cannot unload library %1: %2 - Teegi %1 töö lõpetamine nurjus: %2 - - - - Cannot resolve symbol "%1" in %2: %3 - Sümboli \"%1\" lahendamine asukohas %2 nurjus: %3 - - - - QLineEdit - - - &Undo - &Võta tagasi - - - &Redo - &Tee uuesti - - - Cu&t - L&õika - - - &Copy - &Kopeeri - - - &Paste - &Aseta - - - Delete - Kustuta - - - Select All - Vali kõik - - - - QLocalServer - - - %1: Name error - - - - %1: Permission denied - - - - %1: Address in use - - - - - %1: Unknown error %2 - - - - - QLocalSocket - - - %1: Connection refused - - - - - %1: Remote closed - - - - %1: Invalid name - - - - - %1: Socket access error - - - - - %1: Socket resource error - - - - - %1: Socket operation timed out - - - - - %1: Datagram too large - - - - %1: Connection error - - - - - %1: The socket operation is not supported - - - - %1: Unknown error - - - - - %1: Unknown error %2 - - - - - QMYSQLDriver - - - Unable to open database ' - - - - Unable to connect - - - - Unable to begin transaction - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - - QMYSQLResult - - Unable to fetch data - - - - Unable to execute query - - - - Unable to store result - - - - Unable to prepare statement - - - - Unable to reset statement - - - - Unable to bind value - - - - Unable to execute statement - - - - Unable to bind outvalues - - - - Unable to store statement results - - - - Unable to execute next query - - - - Unable to store next result - - - - - QMdiArea - - - (Untitled) - - - - - QMdiSubWindow - - - %1 - [%2] - - - - Close - - - - Minimize - - - - Restore Down - - - - &Restore - - - - &Move - - - - &Size - - - - Mi&nimize - - - - Ma&ximize - - - - Stay on &Top - - - - &Close - - - - - [%1] - - - - Maximize - - - - Unshade - - - - Shade - - - - Restore - - - - Help - - - - Menu - - - - - QMenu - - Close - Sulge - - - Open - Ava - - - Execute - Käivita - - - - QMessageBox - - Help - Abi - - - OK - OK - - - About Qt - Qt info - - - <p>This program uses Qt version %1.</p> - <p>Käesolev programm kasutab Qt versiooni %1.</p> - - - Show Details... - Näita üksikasju... - - - Hide Details... - Peida üksikasjad... - - - <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p> - - - - <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p> - - - - - QMultiInputContext - - - Select IM - Sisestusviisi valik - - - - QMultiInputContextPlugin - - - Multiple input method switcher - - - - Multiple input method switcher that uses the context menu of the text widgets - - - - - QNativeSocketEngine - - - The remote host closed the connection - - - - Network operation timed out - - - - Out of resources - - - - Unsupported socket operation - - - - Protocol type not supported - - - - Invalid socket descriptor - - - - Network unreachable - - - - Permission denied - - - - Connection timed out - - - - Connection refused - - - - The bound address is already in use - - - - The address is not available - - - - The address is protected - - - - Unable to send a message - - - - Unable to receive a message - - - - Unable to write - - - - Network error - - - - Another socket is already listening on the same port - - - - Unable to initialize non-blocking socket - - - - Unable to initialize broadcast socket - - - - Attempt to use IPv6 socket on a platform with no IPv6 support - - - - Host unreachable - - - - Datagram was too large to send - - - - Operation on non-socket - - - - Unknown error - - - - The proxy type is invalid for this operation - - - - - QNetworkAccessCacheBackend - - - Error opening %1 - - - - - QNetworkAccessFileBackend - - - Request for opening non-local file %1 - - - - Error opening %1: %2 - - - - Write error writing to %1: %2 - - - - Cannot open %1: Path is a directory - - - - Read error reading from %1: %2 - - - - - QNetworkAccessFtpBackend - - - No suitable proxy found - - - - Cannot open %1: is a directory - - - - Logging in to %1 failed: authentication required - - - - Error while downloading %1: %2 - - - - Error while uploading %1: %2 - - - - - QNetworkAccessHttpBackend - - - No suitable proxy found - - - - - QNetworkReply - - Error downloading %1 - server replied: %2 - - - - - Protocol "%1" is unknown - - - - - QNetworkReplyImpl - - Operation canceled - - - - - QOCIDriver - - - Unable to logon - - - - Unable to initialize - QOCIDriver - - - - Unable to begin transaction - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - - QOCIResult - - Unable to bind column for batch execute - - - - Unable to execute batch statement - - - - Unable to goto next - - - - Unable to alloc statement - - - - Unable to prepare statement - - - - Unable to bind value - - - - Unable to execute select statement - - - - Unable to execute statement - - - - - QODBCDriver - - - Unable to connect - - - - Unable to connect - Driver doesn't support all needed functionality - - - - Unable to disable autocommit - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - Unable to enable autocommit - - - - - QODBCResult - - QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - - - - Unable to execute statement - - - - Unable to fetch next - - - - Unable to prepare statement - - - - Unable to bind variable - - - - Unable to fetch last - - - - Unable to fetch - - - - Unable to fetch first - - - - Unable to fetch previous - - - - - QObject - - - Home - Kodu - - - - Operation not supported on %1 - Operation not supported on %1 - - - Invalid URI: %1 - Vigane URI: %1 - - - - Write error writing to %1: %2 - Kirjutamisviga %1 kirjutamisel: %2 - - - Read error reading from %1: %2 - Lugemisviga %1 lugemisel: %2 - - - Socket error on %1: %2 - Sokli viga masinas %1: %2 - - - Remote host closed the connection prematurely on %1 - Võrgumasin sulges ühenduse enneaegselt masinas %1 - - - Protocol error: packet of size 0 received - Protokolli viga: saadi pakett suurusega 0 - - - No host name given - Masina nime ei ole antud - - - - QPPDOptionsModel - - - Name - Nimi - - - Value - Väärtus - - - - QPSQLDriver - - - Unable to connect - - - - Could not begin transaction - - - - Could not commit transaction - - - - Could not rollback transaction - - - - Unable to subscribe - - - - Unable to unsubscribe - - - - - QPSQLResult - - Unable to create query - - - - Unable to prepare statement - - - - - QPageSetupWidget - - - Centimeters (cm) - Sentimeetrid (cm) - - - Millimeters (mm) - Millimeetrid (mm) - - - Inches (in) - Tollid (in) - - - Points (pt) - Punktid (pt) - - - Form - Vorm - - - Paper - Paber - - - Page size: - Lehekülje suurus: - - - Width: - Laius: - - - Height: - Kõrgus: - - - Paper source: - Paberi allikas: - - - Orientation - Suund - - - Portrait - Püstpaigutus - - - Landscape - Rõhtpaigutus - - - Reverse landscape - Tagurpidi rõhtpaigutus - - - Reverse portrait - Tagurpidi püstpaigutus - - - Margins - Veerised - - - top margin - ülaveeris - - - left margin - vasakveeris - - - right margin - paremveeris - - - bottom margin - alaveeris - - - - QPluginLoader - - - Unknown error - Tundmatu viga - - - The plugin was not loaded. - Plugin ei olnud laaditud. - - - - QPrintDialog - - - locally connected - kohalikult ühendatud - - - Aliases: %1 - Aliased: %1 - - - unknown - tundmatu - - - - A0 (841 x 1189 mm) - A0 (841 x 1189 mm) - - - A1 (594 x 841 mm) - A1 (594 x 841 mm) - - - A2 (420 x 594 mm) - A2 (420 x 594 mm) - - - A3 (297 x 420 mm) - A3 (297 x 420 mm) - - - A4 (210 x 297 mm, 8.26 x 11.7 inches) - A4 (210 x 297 mm, 8.26 x 11,7 tolli) - - - A5 (148 x 210 mm) - A5 (148 x 210 mm) - - - A6 (105 x 148 mm) - A6 (105 x 148 mm) - - - A7 (74 x 105 mm) - A7 (74 x 105 mm) - - - A8 (52 x 74 mm) - A8 (52 x 74 mm) - - - A9 (37 x 52 mm) - A9 (37 x 52 mm) - - - B0 (1000 x 1414 mm) - B0 (1000 x 1414 mm) - - - B1 (707 x 1000 mm) - B1 (707 x 1000 mm) - - - B2 (500 x 707 mm) - B2 (500 x 707 mm) - - - B3 (353 x 500 mm) - B3 (353 x 500 mm) - - - B4 (250 x 353 mm) - B4 (250 x 353 mm) - - - B5 (176 x 250 mm, 6.93 x 9.84 inches) - B5 (176 x 250 mm, 6,93 x 9,84 tolli) - - - B6 (125 x 176 mm) - B6 (125 x 176 mm) - - - B7 (88 x 125 mm) - B7 (88 x 125 mm) - - - B8 (62 x 88 mm) - B8 (62 x 88 mm) - - - B9 (44 x 62 mm) - B9 (44 x 62 mm) - - - B10 (31 x 44 mm) - B10 (31 x 44 mm) - - - C5E (163 x 229 mm) - C5E (163 x 229 mm) - - - DLE (110 x 220 mm) - DLE (110 x 220 mm) - - - Executive (7.5 x 10 inches, 191 x 254 mm) - Executive (7,5 x 10 tolli, 191 x 254 mm) - - - Folio (210 x 330 mm) - Foolio (210 x 330 mm) - - - Ledger (432 x 279 mm) - Ledger (432 x 279 mm) - - - Legal (8.5 x 14 inches, 216 x 356 mm) - Legal (8,5 x 14 tolli, 216 x 356 mm) - - - Letter (8.5 x 11 inches, 216 x 279 mm) - Letter (8,5 x 11 tolli, 216 x 279 mm) - - - Tabloid (279 x 432 mm) - Tabloid (279 x 432 mm) - - - US Common #10 Envelope (105 x 241 mm) - US Common #10 ümbrik (105 x 241 mm) - - - - OK - OK - - - Print - Trükkimine - - - Print To File ... - Trükkimine faili... - - - - Print range - Trükivahemik - - - Print all - Kõige trükkimine - - - - File %1 is not writable. -Please choose a different file name. - Fail %1 ei ole kirjutatav. -Palun vali mõni muu failinimi. - - - %1 already exists. -Do you want to overwrite it? - %1 already exists. -Do you want to overwrite it? - - - File exists - Fail on olemas - - - <qt>Do you want to overwrite it?</qt> - <qt>Kas kirjutada see üle?</qt> - - - Print selection - Trüki valik - - - %1 is a directory. -Please choose a different file name. - %1 on kataloog. -Palun vali mõni muu failinimi. - - - A0 - A0 - - - A1 - A1 - - - A2 - A2 - - - A3 - A3 - - - A4 - A4 - - - A5 - A5 - - - A6 - A6 - - - A7 - A7 - - - A8 - A8 - - - A9 - A9 - - - B0 - B0 - - - B1 - B1 - - - B2 - B2 - - - B3 - B3 - - - B4 - B4 - - - B5 - B5 - - - B6 - B6 - - - B7 - B7 - - - B8 - B8 - - - B9 - B9 - - - B10 - B10 - - - C5E - C5E - - - DLE - DLE - - - Executive - Executive - - - Folio - Foolio - - - Ledger - Ledger - - - Legal - Legal - - - Letter - Letter - - - Tabloid - Tabloid - - - US Common #10 Envelope - US Common #10 ümbrik - - - Custom - Kohandatud - - - &Options >> - &Valikud >> - - - &Print - &Trüki - - - &Options << - &Valikud << - - - Print to File (PDF) - Trükkimine faili (PDF) - - - Print to File (Postscript) - Trükkimine faili (PostScript) - - - Local file - Kohalik fail - - - Write %1 file - %1-faili kirjutamine - - - - The 'From' value cannot be greater than the 'To' value. - Alguse väärtus ei saa olla suurem kui lõpu väärtus. - - - - QPrintPreviewDialog - - Page Setup - Lehekülje seadistused - - - - %1% - %1% - - - Print Preview - Trükkimise eelvaatlus - - - Next page - Järgmine lehekülg - - - Previous page - Eelmine lehekülg - - - First page - Esimene lehekülg - - - Last page - Viimane lehekülg - - - Fit width - Mahuta laiusele - - - Fit page - Mahuta leheküljele - - - Zoom in - Suurenda - - - Zoom out - Vähenda - - - Portrait - Püstpaigutus - - - Landscape - Rõhtpaigutus - - - Show single page - Üks lehekülg - - - Show facing pages - Kõrvutised leheküljed - - - Show overview of all pages - Kõigi lehekülgede ülevaade - - - Print - Trükkimine - - - Page setup - Lehekülje seadistused - - - Close - Sulge - - - Export to PDF - Ekspordi PDF-ina - - - Export to PostScript - Ekspordi PostScriptina - - - - QPrintPropertiesWidget - - Form - Vorm - - - Page - Lehekülg - - - Advanced - Muu - - - - QPrintSettingsOutput - - Form - Vorm - - - Copies - Koopiad - - - Print range - Trükivahemik - - - Print all - Kõige trükkimine - - - Pages from - Leheküljed alates - - - to - kuni - - - Selection - Valik - - - Output Settings - Väljundi seadistused - - - Copies: - Koopiad: - - - Collate - Eksemplarhaaval - - - Reverse - Vastupidi - - - Options - Valikud - - - Color Mode - Värvirežiim - - - Color - Värv - - - Grayscale - Halltoon - - - Duplex Printing - Duplekstrükk - - - None - Puudub - - - Long side - Pikem külg - - - Short side - Lühem külg - - - - QPrintWidget - - Form - Vorm - - - Printer - Printer - - - &Name: - &Nimi: - - - P&roperties - O&madused - - - Location: - Asukoht: - - - Preview - Eelvaatlus - - - Type: - Tüüp: - - - Output &file: - Väljund&fail: - - - ... - ... - - - - QProcess - - - Could not open input redirection for reading - Sisendi ümbersuunamise avamine lugemiseks nurjus. - - - - Could not open output redirection for writing - Väljundi ümbersuunamise avamine lugemiseks nurjus. - - - Resource error (fork failure): %1 - Ressursi viga (hargmiku viga): %1 - - - Process operation timed out - Protsessi toiming aegus - - - Error reading from process - Viga protsessist lugemisel - - - - Error writing to process - Viga protsessi kirjutamisel - - - Process crashed - Protsessi tabas krahh - - - Process failed to start - Protsess ei käivitunud - - - - QProgressDialog - - - Cancel - Loobu - - - - QPushButton - - Open - Ava - - - - QRadioButton - - Check - Märgi - - - - QRegExp - - - no error occurred - - - - disabled feature used - - - - bad char class syntax - - - - bad lookahead syntax - - - - bad repetition syntax - - - - invalid octal value - - - - missing left delim - - - - unexpected end - - - - met internal limit - - - - - QSQLite2Driver - - - Error to open database - - - - Unable to begin transaction - - - - Unable to commit transaction - - - - Unable to rollback Transaction - - - - - QSQLite2Result - - Unable to fetch results - - - - Unable to execute statement - - - - - QSQLiteDriver - - - Error opening database - - - - Error closing database - - - - Unable to begin transaction - - - - Unable to commit transaction - - - - Unable to rollback transaction - - - - - QSQLiteResult - - Unable to fetch row - - - - Unable to execute statement - - - - Unable to reset statement - - - - Unable to bind parameters - - - - Parameter count mismatch - - - - No query - - - - - QScrollBar - - - Scroll here - Keri siia - - - Left edge - Vasakus servas - - - Top - Ülal - - - Right edge - Paremas servas - - - Bottom - All - - - Page left - Lehekülg vasakule - - - - Page up - Lehekülg üles - - - Page right - Lehekülg paremale - - - - Page down - Lehekülg alla - - - Scroll left - Keri vasakule - - - Scroll up - Keri üles - - - Scroll right - Keri paremale - - - Scroll down - Keri alla - - - Line up - - - - Position - Asukoht - - - Line down - - - - - QSharedMemory - - - %1: unable to set key on lock - - - - %1: create size is less then 0 - - - - - %1: unable to lock - - - - %1: unable to unlock - - - - - %1: permission denied - - - - %1: already exists - - - - - %1: doesn't exists - - - - - %1: out of resources - - - - - %1: unknown error %2 - - - - %1: key is empty - - - - %1: unix key file doesn't exists - - - - %1: ftok failed - - - - - %1: unable to make key - - - - %1: system-imposed size restrictions - - - - %1: not attached - - - - %1: invalid size - - - - %1: key error - - - - %1: size query failed - - - - - QShortcut - - - Space - - - - Esc - - - - Tab - - - - Backtab - - - - Backspace - - - - Return - - - - Enter - - - - Ins - - - - Del - - - - Pause - - - - Print - - - - SysReq - - - - Home - - - - End - - - - Left - - - - Up - - - - Right - - - - Down - - - - PgUp - - - - PgDown - - - - CapsLock - - - - NumLock - - - - ScrollLock - - - - Menu - - - - Help - - - - Back - - - - Forward - - - - Stop - - - - Refresh - - - - Volume Down - - - - Volume Mute - - - - Volume Up - - - - Bass Boost - - - - Bass Up - - - - Bass Down - - - - Treble Up - - - - Treble Down - - - - Media Play - - - - Media Stop - - - - Media Previous - - - - Media Next - - - - Media Record - - - - Favorites - - - - Search - - - - Standby - - - - Open URL - - - - Launch Mail - - - - Launch Media - - - - Launch (0) - - - - Launch (1) - - - - Launch (2) - - - - Launch (3) - - - - Launch (4) - - - - Launch (5) - - - - Launch (6) - - - - Launch (7) - - - - Launch (8) - - - - Launch (9) - - - - Launch (A) - - - - Launch (B) - - - - Launch (C) - - - - Launch (D) - - - - Launch (E) - - - - Launch (F) - - - - Print Screen - - - - Page Up - - - - Page Down - - - - Caps Lock - - - - Num Lock - - - - Number Lock - - - - Scroll Lock - - - - Insert - - - - Delete - - - - Escape - - - - System Request - - - - Select - - - - Yes - - - - No - - - - Context1 - - - - Context2 - - - - Context3 - - - - Context4 - - - - Call - - - - Hangup - - - - Flip - - - - Ctrl - - - - Shift - - - - Alt - - - - Meta - - - - + - - - - F%1 - - - - Home Page - - - - - QSlider - - - Page left - Lehekülg vasakule - - - Page up - Lehekülg üles - - - Position - Asukoht - - - Page right - Lehekülg paremale - - - Page down - Lehekülg alla - - - - QSocks5SocketEngine - - Connection to proxy refused - - - - Connection to proxy closed prematurely - - - - Proxy host not found - - - - Connection to proxy timed out - - - - Proxy authentication failed - - - - Proxy authentication failed: %1 - - - - SOCKS version 5 protocol error - - - - General SOCKSv5 server failure - - - - Connection not allowed by SOCKSv5 server - - - - TTL expired - - - - SOCKSv5 command not supported - - - - Address type not supported - - - - Unknown SOCKSv5 proxy error code 0x%1 - - - - Network operation timed out - - - - - QSpinBox - - More - Rohkem - - - Less - Vähem - - - - QSql - - - Delete - - - - Delete this record? - - - - Yes - - - - No - - - - Insert - - - - Update - - - - Save edits? - - - - Cancel - - - - Confirm - - - - Cancel your edits? - - - - - QSslSocket - - - Unable to write data: %1 - - - - Error while reading: %1 - - - - Error during SSL handshake: %1 - - - - Error creating SSL context (%1) - - - - Invalid or empty cipher list (%1) - - - - Error creating SSL session, %1 - - - - Error creating SSL session: %1 - - - - Cannot provide a certificate with no key, %1 - - - - Error loading local certificate, %1 - - - - Error loading private key, %1 - - - - Private key does not certificate public key, %1 - - - - - QSystemSemaphore - - - %1: out of resources - - - - - %1: permission denied - - - - %1: already exists - - - - %1: does not exist - - - - - %1: unknown error %2 - - - - - QTDSDriver - - - Unable to open connection - - - - Unable to use database - - - - - QTabBar - - Scroll Left - Keri vasakule - - - Scroll Right - Keri paremale - - - - QTcpServer - - - Operation on socket is not supported - Sokli toiming ei ole toetatud - - - - QTextControl - - - &Undo - &Võta tagasi - - - &Redo - &Tee uuesti - - - Cu&t - L&õika - - - &Copy - &Kopeeri - - - Copy &Link Location - Kopeeri &viida asukoht - - - &Paste - &Aseta - - - Delete - Kustuta - - - Select All - Vali kõik - - - - QToolButton - - Press - Vajuta - - - Open - Ava - - - - QUdpSocket - - - This platform does not support IPv6 - See platvorm ei toeta IPv6 - - - - QUndoGroup - - - Undo - Võta tagasi - - - Redo - Tee uuesti - - - - QUndoModel - - - <empty> - <tühi> - - - - QUndoStack - - - Undo - Võta tagasi - - - Redo - Tee uuesti - - - - QUnicodeControlCharacterMenu - - - LRM Left-to-right mark - LRM vasakult paremale märk - - - RLM Right-to-left mark - RLM paremalt vasakule märk - - - ZWJ Zero width joiner - ZWJ null-laiusega ühendaja - - - ZWNJ Zero width non-joiner - ZWNJ null-laiusega lahutaja - - - ZWSP Zero width space - ZWSP null-laiusega tühik - - - LRE Start of left-to-right embedding - LRE vasakult paremale lisamise algus - - - RLE Start of right-to-left embedding - RLE paremalt vasakule lisamise algus - - - LRO Start of left-to-right override - LRO vasakult paremale ülekirjutamise algus - - - RLO Start of right-to-left override - RLO paremalt vasakule ülekirjutamise algus - - - PDF Pop directional formatting - PDF Suunavorminduse lõpp - - - Insert Unicode control character - Unicode juhtmärgi lisamine - - - - QWebFrame - - - Request cancelled - - - - Request blocked - - - - Cannot show URL - - - - Frame load interruped by policy change - - - - Cannot show mimetype - - - - File does not exist - - - - - QWebPage - - - Bad HTTP request - - - - - Submit - default label for Submit buttons in forms on web pages - - - - Submit - Submit (input element) alt text for <input> elements with no alt, title, or value - - - - Reset - default label for Reset buttons in forms on web pages - - - - This is a searchable index. Enter search keywords: - text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - - - - Choose File - title for file button used in HTML forms - - - - No file selected - text to display in file button used in HTML forms when no file is selected - - - - Open in New Window - Open in New Window context menu item - - - - Save Link... - Download Linked File context menu item - - - - Copy Link - Copy Link context menu item - - - - Open Image - Open Image in New Window context menu item - - - - Save Image - Download Image context menu item - - - - Copy Image - Copy Link context menu item - - - - Open Frame - Open Frame in New Window context menu item - - - - Copy - Copy context menu item - - - - Go Back - Back context menu item - - - - Go Forward - Forward context menu item - - - - Stop - Stop context menu item - - - - Reload - Reload context menu item - - - - Cut - Cut context menu item - - - - Paste - Paste context menu item - - - - No Guesses Found - No Guesses Found context menu item - - - - Ignore - Ignore Spelling context menu item - - - - Add To Dictionary - Learn Spelling context menu item - - - - Search The Web - Search The Web context menu item - - - - Look Up In Dictionary - Look Up in Dictionary context menu item - - - - Open Link - Open Link context menu item - - - - Ignore - Ignore Grammar context menu item - - - - Spelling - Spelling and Grammar context sub-menu item - - - - Show Spelling and Grammar - menu item title - - - - Hide Spelling and Grammar - menu item title - - - - Check Spelling - Check spelling context menu item - - - - Check Spelling While Typing - Check spelling while typing context menu item - - - - Check Grammar With Spelling - Check grammar with spelling context menu item - - - - Fonts - Font context sub-menu item - - - - Bold - Bold context menu item - - - - Italic - Italic context menu item - - - - Underline - Underline context menu item - - - - Outline - Outline context menu item - - - - Direction - Writing direction context sub-menu item - - - - Text Direction - Text direction context sub-menu item - - - - Default - Default writing direction context menu item - - - - LTR - Left to Right context menu item - - - - RTL - Right to Left context menu item - - - - Inspect - Inspect Element context menu item - - - - No recent searches - Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - - - - Recent searches - label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - - - - Clear recent searches - menu item in Recent Searches menu that empties menu's contents - - - - Unknown - Unknown filesize FTP directory listing item - - - - %1 (%2x%3 pixels) - Title string for images - - - - - Web Inspector - %2 - - - - - Scroll here - - - - Left edge - - - - Top - - - - Right edge - - - - Bottom - - - - Page left - - - - Page up - - - - Page right - - - - Page down - - - - Scroll left - - - - Scroll up - - - - Scroll right - - - - Scroll down - - - - - %n file(s) - number of chosen file - - - - - - - - JavaScript Alert - %1 - - - - JavaScript Confirm - %1 - - - - JavaScript Prompt - %1 - - - - Move the cursor to the next character - - - - Move the cursor to the previous character - - - - Move the cursor to the next word - - - - Move the cursor to the previous word - - - - Move the cursor to the next line - - - - Move the cursor to the previous line - - - - Move the cursor to the start of the line - - - - Move the cursor to the end of the line - - - - Move the cursor to the start of the block - - - - Move the cursor to the end of the block - - - - Move the cursor to the start of the document - - - - Move the cursor to the end of the document - - - - Select to the next character - - - - Select to the previous character - - - - Select to the next word - - - - Select to the previous word - - - - Select to the next line - - - - Select to the previous line - - - - Select to the start of the line - - - - Select to the end of the line - - - - Select to the start of the block - - - - Select to the end of the block - - - - Select to the start of the document - - - - Select to the end of the document - - - - Delete to the start of the word - - - - Delete to the end of the word - - - - - QWhatsThisAction - - - What's This? - Mis see on? - - - - QWidget - - - * - * - - - - QWizard - - - Go Back - - - - Continue - - - - Commit - - - - Done - - - - Help - - - - < &Back - - - - &Finish - - - - Cancel - - - - &Help - - - - &Next - - - - &Next > - - - - - QWorkspace - - - &Restore - - - - &Move - - - - &Size - - - - Mi&nimize - - - - Ma&ximize - - - - &Close - - - - Stay on &Top - - - - Sh&ade - - - - %1 - [%2] - - - - Minimize - - - - Restore Down - - - - Close - - - - &Unshade - - - - - QXml - - - no error occurred - - - - error triggered by consumer - - - - unexpected end of file - - - - more than one document type definition - - - - error occurred while parsing element - - - - tag mismatch - - - - error occurred while parsing content - - - - unexpected character - - - - invalid name for processing instruction - - - - version expected while reading the XML declaration - - - - wrong value for standalone declaration - - - - encoding declaration or standalone declaration expected while reading the XML declaration - - - - standalone declaration expected while reading the XML declaration - - - - error occurred while parsing document type definition - - - - letter is expected - - - - error occurred while parsing comment - - - - error occurred while parsing reference - - - - internal general entity reference not allowed in DTD - - - - external parsed general entity reference not allowed in attribute value - - - - external parsed general entity reference not allowed in DTD - - - - unparsed entity reference in wrong context - - - - recursive entities - - - - error in the text declaration of an external entity - - - - - QXmlStream - - - Extra content at end of document. - - - - Invalid entity value. - - - - Invalid XML character. - - - - Sequence ']]>' not allowed in content. - - - - Namespace prefix '%1' not declared - - - - Attribute redefined. - - - - Unexpected character '%1' in public id literal. - - - - Invalid XML version string. - - - - Unsupported XML version. - - - - %1 is an invalid encoding name. - - - - Encoding %1 is unsupported - - - - Standalone accepts only yes or no. - - - - Invalid attribute in XML declaration. - - - - Premature end of document. - - - - Invalid document. - - - - Expected - - - - , but got ' - - - - Unexpected ' - - - - Expected character data. - - - - Recursive entity detected. - - - - Start tag expected. - - - - XML declaration not at start of document. - - - - NDATA in parameter entity declaration. - - - - %1 is an invalid processing instruction name. - - - - Invalid processing instruction name. - - - - Illegal namespace declaration. - - - - - Invalid XML name. - - - - Opening and ending tag mismatch. - - - - Reference to unparsed entity '%1'. - - - - Entity '%1' not declared. - - - - Reference to external entity '%1' in attribute value. - - - - Invalid character reference. - - - - Encountered incorrectly encoded content. - - - - The standalone pseudo attribute must appear after the encoding. - - - - - %1 is an invalid PUBLIC identifier. - - - - - QtXmlPatterns - - - An %1-attribute with value %2 has already been declared. - - - - An %1-attribute must have a valid %2 as value, which %3 isn't. - - - - - Network timeout. - - - - - Element %1 can't be serialized because it appears outside the document element. - - - - - Year %1 is invalid because it begins with %2. - - - - Day %1 is outside the range %2..%3. - - - - Month %1 is outside the range %2..%3. - - - - Overflow: Can't represent date %1. - - - - Day %1 is invalid for month %2. - - - - Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; - - - - Time %1:%2:%3.%4 is invalid. - - - - Overflow: Date can't be represented. - - - - At least one component must be present. - - - - At least one time component must appear after the %1-delimiter. - - - - - No operand in an integer division, %1, can be %2. - - - - The first operand in an integer division, %1, cannot be infinity (%2). - - - - The second operand in a division, %1, cannot be zero (%2). - - - - - %1 is not a valid value of type %2. - - - - - When casting to %1 from %2, the source value cannot be %3. - - - - - Integer division (%1) by zero (%2) is undefined. - - - - Division (%1) by zero (%2) is undefined. - - - - Modulus division (%1) by zero (%2) is undefined. - - - - Dividing a value of type %1 by %2 (not-a-number) is not allowed. - - - - Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. - - - - Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. - - - - - A value of type %1 cannot have an Effective Boolean Value. - - - - - Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - - - - - Value %1 of type %2 exceeds maximum (%3). - - - - Value %1 of type %2 is below minimum (%3). - - - - - A value of type %1 must contain an even number of digits. The value %2 does not. - - - - %1 is not valid as a value of type %2. - - - - - Operator %1 cannot be used on type %2. - - - - Operator %1 cannot be used on atomic values of type %2 and %3. - - - - - The namespace URI in the name for a computed attribute cannot be %1. - - - - The name for a computed attribute cannot have the namespace URI %1 with the local name %2. - - - - - Type error in cast, expected %1, received %2. - - - - When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. - - - - - No casting is possible with %1 as the target type. - - - - It is not possible to cast from %1 to %2. - - - - Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. - - - - It's not possible to cast the value %1 of type %2 to %3 - - - - Failure when casting from %1 to %2: %3 - - - - - A comment cannot contain %1 - - - - A comment cannot end with a %1. - - - - - No comparisons can be done involving the type %1. - - - - Operator %1 is not available between atomic values of type %2 and %3. - - - - - An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. - - - - - A library module cannot be evaluated directly. It must be imported from a main module. - - - - No template by name %1 exists. - - - - - A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. - - - - A positional predicate must evaluate to a single numeric value. - - - - - The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. - - - - %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - - - - - The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - - - - - The data of a processing instruction cannot contain the string %1 - - - - - No namespace binding exists for the prefix %1 - - - - - No namespace binding exists for the prefix %1 in %2 - - - - - %1 is an invalid %2 - - - - - %1 takes at most %n argument(s). %2 is therefore invalid. - - - - - - - %1 requires at least %n argument(s). %2 is therefore invalid. - - - - - - - - The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. - - - - The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - - - - The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - - - - - %1 is not a valid XML 1.0 character. - - - - - The first argument to %1 cannot be of type %2. - - - - - If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. - - - - - %1 was called. - - - - - %1 must be followed by %2 or %3, not at the end of the replacement string. - - - - In the replacement string, %1 must be followed by at least one digit when not escaped. - - - - In the replacement string, %1 can only be used to escape itself or %2, not %3 - - - - - %1 matches newline characters - - - - %1 and %2 match the start and end of a line. - - - - Matches are case insensitive - - - - Whitespace characters are removed, except when they appear in character classes - - - - %1 is an invalid regular expression pattern: %2 - - - - %1 is an invalid flag for regular expressions. Valid flags are: - - - - - If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - - - - - It will not be possible to retrieve %1. - - - - - The root node of the second argument to function %1 must be a document node. %2 is not a document node. - - - - - The default collection is undefined - - - - %1 cannot be retrieved - - - - - The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - - - - - A zone offset must be in the range %1..%2 inclusive. %3 is out of range. - - - - %1 is not a whole number of minutes. - - - - - Required cardinality is %1; got cardinality %2. - - - - - The item %1 did not match the required type %2. - - - - %1 is an unknown schema type. - - - - Only one %1 declaration can occur in the query prolog. - - - - The initialization of variable %1 depends on itself - - - - No variable by name %1 exists - - - - - The variable %1 is unused - - - - - Version %1 is not supported. The supported XQuery version is 1.0. - - - - The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. - - - - No function with signature %1 is available - - - - A default namespace declaration must occur before function, variable, and option declarations. - - - - Namespace declarations must occur before function, variable, and option declarations. - - - - Module imports must occur before function, variable, and option declarations. - - - - It is not possible to redeclare prefix %1. - - - - Prefix %1 is already declared in the prolog. - - - - The name of an option must have a prefix. There is no default namespace for options. - - - - The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - - - - The target namespace of a %1 cannot be empty. - - - - The module import feature is not supported - - - - No value is available for the external variable by name %1. - - - - A construct was encountered which only is allowed in XQuery. - - - - A template by name %1 has already been declared. - - - - The keyword %1 cannot occur with any other mode name. - - - - The value of attribute %1 must of type %2, which %3 isn't. - - - - The prefix %1 can not be bound. By default, it is already bound to the namespace %2. - - - - A variable by name %1 has already been declared. - - - - A stylesheet function must have a prefixed name. - - - - The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - - - - The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. - - - - The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 - - - - A function already exists with the signature %1. - - - - No external functions are supported. All supported functions can be used directly, without first declaring them as external - - - - An argument by name %1 has already been declared. Every argument name must be unique. - - - - When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. - - - - In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. - - - - In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. - - - - In an XSL-T pattern, function %1 cannot have a third argument. - - - - In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. - - - - In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. - - - - %1 is an invalid template mode name. - - - - The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. - - - - The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - - - - None of the pragma expressions are supported. Therefore, a fallback expression must be present - - - - Each name of a template parameter must be unique; %1 is duplicated. - - - - The %1-axis is unsupported in XQuery - - - - %1 is not a valid name for a processing-instruction. - - - - %1 is not a valid numeric literal. - - - - No function by name %1 is available. - - - - The namespace URI cannot be the empty string when binding to a prefix, %1. - - - - %1 is an invalid namespace URI. - - - - It is not possible to bind to the prefix %1 - - - - Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). - - - - Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). - - - - Two namespace declaration attributes have the same name: %1. - - - - The namespace URI must be a constant and cannot use enclosed expressions. - - - - An attribute by name %1 has already appeared on this element. - - - - A direct element constructor is not well-formed. %1 is ended with %2. - - - - The name %1 does not refer to any schema type. - - - - %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. - - - - %1 is not an atomic type. Casting is only possible to atomic types. - - - - %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - - - - The name of an extension expression must be in a namespace. - - - - - empty - - - - zero or one - - - - exactly one - - - - one or more - - - - zero or more - - - - - Required type is %1, but %2 was found. - - - - Promoting %1 to %2 may cause loss of precision. - - - - The focus is undefined. - - - - - It's not possible to add attributes after any other kind of node. - - - - An attribute by name %1 has already been created. - - - - - Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - - - - - Attribute %1 can't be serialized because it appears at the top level. - - - - - %1 is an unsupported encoding. - - - - %1 contains octets which are disallowed in the requested encoding %2. - - - - The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - - - - - Ambiguous rule match. - - - - - In a namespace constructor, the value for a namespace value cannot be an empty string. - - - - The prefix must be a valid %1, which %2 is not. - - - - The prefix %1 cannot be bound. - - - - Only the prefix %1 can be bound to %2 and vice versa. - - - - - Circularity detected - - - - - The parameter %1 is required, but no corresponding %2 is supplied. - - - - The parameter %1 is passed, but no corresponding %2 exists. - - - - - The URI cannot have a fragment - - - - - Element %1 is not allowed at this location. - - - - Text nodes are not allowed at this location. - - - - Parse error: %1 - - - - The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - - - - Running an XSL-T 1.0 stylesheet with a 2.0 processor. - - - - Unknown XSL-T attribute %1. - - - - Attribute %1 and %2 are mutually exclusive. - - - - In a simplified stylesheet module, attribute %1 must be present. - - - - If element %1 has no attribute %2, it cannot have attribute %3 or %4. - - - - Element %1 must have at least one of the attributes %2 or %3. - - - - At least one mode must be specified in the %1-attribute on element %2. - - - - - Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. - - - - Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. - - - - XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. - - - - The attribute %1 must appear on element %2. - - - - The element with local name %1 does not exist in XSL-T. - - - - - Element %1 must come last. - - - - At least one %1-element must occur before %2. - - - - Only one %1-element can appear. - - - - At least one %1-element must occur inside %2. - - - - When attribute %1 is present on %2, a sequence constructor cannot be used. - - - - Element %1 must have either a %2-attribute or a sequence constructor. - - - - When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. - - - - Element %1 cannot have children. - - - - Element %1 cannot have a sequence constructor. - - - - The attribute %1 cannot appear on %2, when it is a child of %3. - - - - A parameter in a function cannot be declared to be a tunnel. - - - - This processor is not Schema-aware and therefore %1 cannot be used. - - - - Top level stylesheet elements must be in a non-null namespace, which %1 isn't. - - - - The value for attribute %1 on element %2 must either be %3 or %4, not %5. - - - - Attribute %1 cannot have the value %2. - - - - The attribute %1 can only appear on the first %2 element. - - - - At least one %1 element must appear as child of %2. - - - - - VolumeSlider - - - Muted - - - - Volume: %1% - - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_ru.ts qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_ru.ts --- qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_ru.ts 2009-12-17 01:25:47.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/translations/qt_ru.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,7747 +0,0 @@ - - - - - AudioOutput - - - <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> - <html>Звуковое устройство <b>%1</b> не работает.<br/>Будет использоваться <b>%2</b>.</html> - - - - <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - <html>Переключение на звуковое устройство <b>%1</b><br/>, которое доступно и имеет высший приоритет.</html> - - - - Revert back to device '%1' - Возвращение к устройству '%1' - - - - CloseButton - - - Close Tab - Закрыть вкладку - - - - Phonon:: - - - Notifications - Уведомления - - - - Music - Музыка - - - - Video - Видео - - - - Communication - Общение - - - - Games - Игры - - - - Accessibility - Средства для людей с ограниченными возможностями - - - - Phonon::Gstreamer::Backend - - - Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. - Some video features have been disabled. - Внимание: Похоже, пакет gstreamer0.10-plugins-good не установлен. - Некоторые возможности воспроизведения видео недоступны. - - - - Warning: You do not seem to have the base GStreamer plugins installed. - All audio and video support has been disabled - Внимание: Похоже, основной модуль GStreamer не установлен. - Поддержка видео и аудио отключена - - - - Phonon::Gstreamer::MediaObject - - - Cannot start playback. - -Check your Gstreamer installation and make sure you -have libgstreamer-plugins-base installed. - Невозможно начать воспроизведение. - -Проверьте установку Gstreamer и убедитесь, -что пакет libgstreamer-plugins-base установлен. - - - - A required codec is missing. You need to install the following codec(s) to play this content: %0 - Отсутствует необходимый кодек. Вам нужно установить следующие кодеки для воспроизведения данного содержимого: %0 - - - - - - - - - - - Could not open media source. - Не удалось открыть источник медиа-данных. - - - - Invalid source type. - Неверный тип источника медиа-данных. - - - - Could not locate media source. - Не удалось найти источник медиа-данных. - - - - Could not open audio device. The device is already in use. - Не удалось открыть звуковое устройство. Устройство уже используется. - - - - Could not decode media source. - Не удалось декодировать источник медиа-данных. - - - - Phonon::VolumeSlider - - - - Volume: %1% - Громкость: %1% - - - - - - Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - Используйте данный ползунок для настройки громкости. Крайнее левое положение соответствует 0%, крайнее правое - %1% - - - - Q3Accel - - - %1, %2 not defined - %1, %2 не определен - - - - Ambiguous %1 not handled - Неоднозначный %1 не обрабатывается - - - - Q3DataTable - - - True - Да - - - - False - Нет - - - - Insert - Вставить - - - - Update - Обновить - - - - Delete - Удалить - - - - Q3FileDialog - - - Copy or Move a File - Копировать или переместить файл - - - - Read: %1 - Чтение: %1 - - - - - Write: %1 - Запись: %1 - - - - - Cancel - Отмена - - - - - - - All Files (*) - Все файлы (*) - - - - Name - Имя - - - - Size - Размер - - - - Type - Тип - - - - Date - Дата - - - - Attributes - Атрибуты - - - - - &OK - &Готово - - - - Look &in: - &Папка: - - - - - - File &name: - &Имя файла: - - - - File &type: - &Тип файла: - - - - Back - Назад - - - - One directory up - На один уровень вверх - - - - Create New Folder - Создать папку - - - - List View - Список - - - - Detail View - Подробный вид - - - - Preview File Info - Предпросмотр информации о файле - - - - Preview File Contents - Предпросмотр содержимого файла - - - - Read-write - Чтение и запись - - - - Read-only - Только чтение - - - - Write-only - Только запись - - - - Inaccessible - Нет доступа - - - - Symlink to File - Ссылка на файл - - - - Symlink to Directory - Ссылка на каталог - - - - Symlink to Special - Ссылка на спецфайл - - - - File - Файл - - - - Dir - Каталог - - - - Special - Спецфайл - - - - - - Open - Открыть - - - - - Save As - Сохранить как - - - - - - &Open - &Открыть - - - - - &Save - &Сохранить - - - - &Rename - &Переименовать - - - - &Delete - &Удалить - - - - R&eload - О&бновить - - - - Sort by &Name - По &имени - - - - Sort by &Size - По &размеру - - - - Sort by &Date - По &дате - - - - &Unsorted - &Не упорядочивать - - - - Sort - Упорядочить - - - - Show &hidden files - Показать скр&ытые файлы - - - - the file - файл - - - - the directory - каталог - - - - the symlink - ссылку - - - - Delete %1 - Удалить %1 - - - - <qt>Are you sure you wish to delete %1 "%2"?</qt> - <qt>Вы действительно хотите удалить %1 "%2"?</qt> - - - - &Yes - &Да - - - - &No - &Нет - - - - New Folder 1 - Новая папка 1 - - - - New Folder - Новая папка - - - - New Folder %1 - Новая папка %1 - - - - Find Directory - Найти каталог - - - - - Directories - Каталоги - - - - Directory: - Каталог: - - - - - Error - Ошибка - - - - %1 -File not found. -Check path and filename. - %1 -Файл не найден. -Проверьте правильность пути и имени файла. - - - - All Files (*.*) - Все файлы (*.*) - - - - Open - Открыть - - - - Select a Directory - Выбрать каталог - - - - Q3LocalFs - - - - Could not read directory -%1 - Не удалось прочитать каталог -%1 - - - - Could not create directory -%1 - Не удалось создать каталог -%1 - - - - Could not remove file or directory -%1 - Не удалось удалить файл или каталог -%1 - - - - Could not rename -%1 -to -%2 - Не удалось переименовать -%1 -в -%2 - - - - Could not open -%1 - Не удалось открыть -%1 - - - - Could not write -%1 - Не удалось записать -%1 - - - - Q3MainWindow - - - Line up - Выровнять - - - - Customize... - Настроить... - - - - Q3NetworkProtocol - - - Operation stopped by the user - Операция остановлена пользователем - - - - Q3ProgressDialog - - - - Cancel - Отмена - - - - Q3TabDialog - - - - OK - Готово - - - - Apply - Применить - - - - Help - Справка - - - - Defaults - По умолчанию - - - - Cancel - Отмена - - - - Q3TextEdit - - - &Undo - &Отменить действие - - - - &Redo - &Повторить действие - - - - Cu&t - &Вырезать - - - - &Copy - &Копировать - - - - &Paste - В&ставить - - - - Clear - Очистить - - - - - Select All - Выделить всё - - - - Q3TitleBar - - - System - Системное меню - - - - Restore up - Восстановить - - - - Minimize - Свернуть - - - - Restore down - Восстановить - - - - Maximize - Распахнуть - - - - Close - Закрыть - - - - Contains commands to manipulate the window - Содержит команды управления окном - - - - Puts a minimized back to normal - Возвращает свёрнутое окно в нормальное состояние - - - - Moves the window out of the way - Сворачивает окно - - - - Puts a maximized window back to normal - Возвращает распахнутое окно в нормальное состояние - - - - Makes the window full screen - Разворачивает окно на весь экран - - - - Closes the window - Зыкрывает окно - - - - Displays the name of the window and contains controls to manipulate it - Отображает название окна и содержит команды управления им - - - - Q3ToolBar - - - More... - Больше... - - - - Q3UrlOperator - - - - - The protocol `%1' is not supported - Протокол '%1' не поддерживается - - - - The protocol `%1' does not support listing directories - Протокол '%1' не поддерживает просмотр каталогов - - - - The protocol `%1' does not support creating new directories - Протокол '%1' не поддерживает создание каталогов - - - - The protocol `%1' does not support removing files or directories - Протокол '%1' не поддерживает удаление файлов или каталогов - - - - The protocol `%1' does not support renaming files or directories - Протокол '%1' не поддерживает переименование файлов или каталогов - - - - The protocol `%1' does not support getting files - Протокол '%1' не поддерживает доставку файлов - - - - The protocol `%1' does not support putting files - Протокол '%1' не поддерживает отправку файлов - - - - - The protocol `%1' does not support copying or moving files or directories - Протокол '%1' не поддерживает копирование или перемещение файлов или каталогов - - - - - (unknown) - (неизвестно) - - - - Q3Wizard - - - &Cancel - &Отмена - - - - < &Back - < &Назад - - - - &Next > - &Далее > - - - - &Finish - &Завершить - - - - &Help - &Справка - - - - QAbstractSocket - - - - - - Host not found - Узел не найден - - - - - - Connection refused - Отказано в соединении - - - - Connection timed out - Время на соединение истекло - - - - - - Operation on socket is not supported - Операция с сокетом не поддерживается - - - - Socket operation timed out - Время на операцию с сокетом истекло - - - - Socket is not connected - Сокет не подключён - - - - Network unreachable - Сеть недоступна - - - - QAbstractSpinBox - - - &Step up - Шаг вв&ерх - - - - Step &down - Шаг вн&из - - - - &Select All - &Выделить всё - - - - QApplication - - - Activate - Активировать - - - - Executable '%1' requires Qt %2, found Qt %3. - Программный модуль '%1' требует Qt %2, найдена версия %3. - - - - Incompatible Qt Library Error - Ошибка совместимости библиотеки Qt - - - - QT_LAYOUT_DIRECTION - Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. - LTR - - - - Activates the program's main window - Активирует главное окно программы - - - - QAxSelect - - - Select ActiveX Control - Выбор компоненты ActiveX - - - - OK - Выбрать - - - - &Cancel - &Отмена - - - - COM &Object: - COM &Объект: - - - - QCheckBox - - - Uncheck - Снять отметку - - - - Check - Отметить - - - - Toggle - Переключить - - - - QColorDialog - - - Hu&e: - &Тон: - - - - &Sat: - &Нас: - - - - &Val: - &Ярк: - - - - &Red: - &Красный: - - - - &Green: - &Зелёный: - - - - Bl&ue: - С&иний: - - - - A&lpha channel: - &Альфа-канал: - - - - Select Color - Выбор цвета - - - - &Basic colors - &Основные цвета - - - - &Custom colors - &Произвольные цвета - - - - &Add to Custom Colors - &Добавить к произвольным цветам - - - - QComboBox - - - - Open - Открыть - - - - False - Нет - - - - True - Да - - - - Close - Закрыть - - - - QCoreApplication - - - %1: key is empty - QSystemSemaphore - %1: пустой ключ - - - - %1: unable to make key - QSystemSemaphore - %1: невозможно создать ключ - - - - %1: ftok failed - QSystemSemaphore - %1: ошибка ftok - - - - QDB2Driver - - - Unable to connect - Невозможно соединиться - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - Unable to set autocommit - Невозможно установить автовыполнение транзакции - - - - QDB2Result - - - - Unable to execute statement - Невозможно выполнить выражение - - - - Unable to prepare statement - Невозможно подготовить выражение - - - - Unable to bind variable - Невозможно привязать значение - - - - Unable to fetch record %1 - Невозможно получить запись %1 - - - - Unable to fetch next - Невозможно получить следующую строку - - - - Unable to fetch first - Невозможно получить первую строку - - - - QDateTimeEdit - - - AM - - - - - am - - - - - PM - - - - - pm - - - - - QDial - - - QDial - - - - - SpeedoMeter - - - - - SliderHandle - - - - - QDialog - - - What's This? - Что это? - - - - Done - Готово - - - - QDialogButtonBox - - - - - OK - Готово - - - - &OK - &Готово - - - - &Save - &Сохранить - - - - Save - Сохранить - - - - Open - Открыть - - - - &Cancel - &Отмена - - - - Cancel - Отмена - - - - &Close - &Закрыть - - - - Close - Закрыть - - - - Apply - Применить - - - - Reset - Сбросить - - - - Help - Справка - - - - Don't Save - Не сохранять - - - - Discard - Отклонить - - - - &Yes - &Да - - - - Yes to &All - Да для &всех - - - - &No - &Нет - - - - N&o to All - Н&ет для всех - - - - Save All - Сохранить все - - - - Abort - Прервать - - - - Retry - Повторить - - - - Ignore - Пропустить - - - - Restore Defaults - Восстановить значения по умолчанию - - - - Close without Saving - Закрыть без сохранения - - - - QDirModel - - - Name - Имя - - - - Size - Размер - - - - Kind - Match OS X Finder - Вид - - - - Type - All other platforms - Тип - - - - Date Modified - Дата изменения - - - - QDockWidget - - - Close - Закрыть - - - - Dock - - - - - Float - - - - - QDoubleSpinBox - - - More - Больше - - - - Less - Меньше - - - - QErrorMessage - - - Debug Message: - Отладочное сообщение: - - - - Warning: - Предупреждение: - - - - Fatal Error: - Критическая ошибка: - - - - &Show this message again - &Показывать это сообщение в дальнейшем - - - - &OK - &Закрыть - - - - QFile - - - - Destination file exists - Файл существует - - - - Will not rename sequential file using block copy - Последовательный файл не будет переименовываться с использованием поблочного копирования - - - - Cannot remove source file - Невозможно удалить исходный файл - - - - Cannot open %1 for input - Невозможно открыть %1 для ввода - - - - Cannot open for output - Невозможно открыть для вывода - - - - Failure to write block - Сбой записи блока - - - - Cannot create %1 for output - Невозможно создать %1 для вывода - - - - QFileDialog - - - - All Files (*) - Все файлы (*) - - - - Directories - Каталоги - - - - - - - &Open - &Открыть - - - - - &Save - &Сохранить - - - - Open - Открыть - - - - %1 already exists. -Do you want to replace it? - %1 уже существует. -Хотите заменить его? - - - - %1 -File not found. -Please verify the correct file name was given. - %1 -Файл не найден. -Проверьте правильность указанного имени файла. - - - - My Computer - Мой компьютер - - - - &Rename - &Переименовать - - - - &Delete - &Удалить - - - - Show &hidden files - Показать скр&ытые файлы - - - - - Back - Назад - - - - - Parent Directory - Родительский каталог - - - - - List View - Список - - - - - Detail View - Подробный вид - - - - - Files of type: - Типы файлов: - - - - - Directory: - Каталог: - - - - - %1 -Directory not found. -Please verify the correct directory name was given. - %1 -Каталог не найден. -Проверьте правильность указанного имени каталога. - - - - '%1' is write protected. -Do you want to delete it anyway? - '%1' защищён от записи. -Всё-равно хотите удалить? - - - - Are sure you want to delete '%1'? - Вы уверены, что хотите удалить '%1'? - - - - Could not delete directory. - Не удалось удалить каталог. - - - - Recent Places - Недавние документы - - - - All Files (*.*) - Все файлы (*.*) - - - - Save As - Сохранить как - - - - Drive - Диск - - - - - File - Файл - - - - Unknown - Неизвестный - - - - Find Directory - Найти каталог - - - - Show - Показать - - - - - Forward - Вперёд - - - - New Folder - Новая папка - - - - &New Folder - &Новая папка - - - - - &Choose - &Выбрать - - - - Remove - Удалить - - - - - File &name: - &Имя файла: - - - - - Look in: - Перейти к: - - - - - Create New Folder - Создать папку - - - - QFileSystemModel - - - Invalid filename - Некорректное имя файла - - - - <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - <b>Имя "%1" не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации. - - - - Name - Имя - - - - Size - Размер - - - - Kind - Match OS X Finder - Вид - - - - Type - All other platforms - Тип - - - - Date Modified - Дата изменения - - - - My Computer - Мой компьютер - - - - Computer - Компьютер - - - - %1 TB - %1 Тб - - - - %1 GB - %1 Гб - - - - %1 MB - %1 Мб - - - - %1 KB - %1 Кб - - - - %1 bytes - %1 байт - - - - QFontDatabase - - - - Normal - Обычный - - - - - - Bold - Жирный - - - - - Demi Bold - Полужирный - - - - - - Black - Чёрный - - - - Demi - Средний - - - - - Light - Светлый - - - - - Italic - Курсив - - - - - Oblique - Наклонный - - - - Any - Любая - - - - Latin - Латиница - - - - Greek - Греческая - - - - Cyrillic - Кириллица - - - - Armenian - Армянская - - - - Hebrew - Иврит - - - - Arabic - - - - - Syriac - Сирийская - - - - Thaana - - - - - Devanagari - - - - - Bengali - - - - - Gurmukhi - - - - - Gujarati - - - - - Oriya - - - - - Tamil - - - - - Telugu - - - - - Kannada - - - - - Malayalam - - - - - Sinhala - - - - - Thai - Тайская - - - - Lao - - - - - Tibetan - Тибетская - - - - Myanmar - - - - - Georgian - Грузинская - - - - Khmer - Кхмерская - - - - Simplified Chinese - Китайская упрощенная - - - - Traditional Chinese - Китайская традиционная - - - - Japanese - Японская - - - - Korean - Корейская - - - - Vietnamese - Вьетнамская - - - - Symbol - Символьная - - - - Ogham - - - - - Runic - Руническая - - - - QFontDialog - - - &Font - &Шрифт - - - - Font st&yle - Ст&иль шрифта - - - - &Size - &Размер - - - - Effects - Эффекты - - - - Stri&keout - Зачёр&кнутый - - - - &Underline - П&одчёркнутый - - - - Sample - Пример - - - - Wr&iting System - &Система письма - - - - - Select Font - Выбор шрифта - - - - QFtp - - - - Not connected - Соединение не установлено - - - - - Host %1 not found - Узел %1 не найден - - - - - Connection refused to host %1 - В соединении с узлом %1 отказано - - - - Connection timed out to host %1 - Время на соединение с узлом %1 истекло - - - - - - Connected to host %1 - Установлено соединение с узлом %1 - - - - - Connection refused for data connection - Отказ в соединении для передачи данных - - - - - - - Unknown error - Неизвестная ошибка - - - - - Connecting to host failed: -%1 - Не удалось соединиться с узлом: -%1 - - - - - Login failed: -%1 - Не удалось авторизоваться: -%1 - - - - - Listing directory failed: -%1 - Не удалось прочитать каталог: -%1 - - - - - Changing directory failed: -%1 - Не удалось сменить каталог: -%1 - - - - - Downloading file failed: -%1 - Не удалось загрузить файл: -%1 - - - - - Uploading file failed: -%1 - Не удалось отгрузить файл: -%1 - - - - - Removing file failed: -%1 - Не удалось удалить файл: -%1 - - - - - Creating directory failed: -%1 - Не удалось создать каталог: -%1 - - - - - Removing directory failed: -%1 - Не удалось удалить каталог: -%1 - - - - - - Connection closed - Соединение закрыто - - - - Host %1 found - Узел %1 найден - - - - Connection to %1 closed - Соединение с %1 закрыто - - - - Host found - Узел найден - - - - Connected to host - Соединение с узлом установлено - - - - QHostInfo - - - Unknown error - Неизвестная ошибка - - - - QHostInfoAgent - - - - - - - - - - Host not found - Узел не найден - - - - - - - Unknown address type - Неизвестный тип адреса - - - - - - Unknown error - Неизвестная ошибка - - - - QHttp - - - - - - Unknown error - Неизвестная ошибка - - - - - Request aborted - Запрос прерван - - - - - No server set to connect to - Не указан сервер для подключения - - - - - Wrong content length - Неверная длина содержимого - - - - - Server closed connection unexpectedly - Сервер неожиданно разорвал соединение - - - - Unknown authentication method - Неизвестный метод авторизации - - - - Error writing response to device - Ошибка записи ответа на устройство - - - - - Connection refused - Отказано в соединении - - - - - - Host %1 not found - Узел %1 не найден - - - - - - - HTTP request failed - HTTP-запрос не удался - - - - - Invalid HTTP response header - Некорректный HTTP-заголовок ответа - - - - - - - Invalid HTTP chunked body - Некорректное HTTP-фрагментирование данных - - - - Host %1 found - Узел %1 найден - - - - Connected to host %1 - Установлено соединение с узлом %1 - - - - Connection to %1 closed - Соединение с узлом %1 закрыто - - - - Host found - Узел найден - - - - Connected to host - Соединение с узлом установлено - - - - - Connection closed - Соединение закрыто - - - - Proxy authentication required - Требуется авторизация на прокси-сервере - - - - Authentication required - Требуется авторизация - - - - Connection refused (or timed out) - В соединении отказано (или время ожидания истекло) - - - - Proxy requires authentication - Прокси сервер требует авторизацию - - - - Host requires authentication - Узел требует авторизацию - - - - Data corrupted - Данные повреждены - - - - Unknown protocol specified - Указан неизвестный протокол - - - - SSL handshake failed - Квитирование SSL не удалось - - - - HTTPS connection requested but SSL support not compiled in - Запрошено соединение по протоколу HTTPS, но поддержка SSL не скомпилирована - - - - QHttpSocketEngine - - - Did not receive HTTP response from proxy - Не получен HTTP-ответ от прокси-сервера - - - - Error parsing authentication request from proxy - Ошибка разбора запроса авторизации от прокси-сервера - - - - Authentication required - Требуется авторизация - - - - Proxy denied connection - Прокси-сервер запретил соединение - - - - Error communicating with HTTP proxy - Ошибка обмена данными с прокси-сервером HTTP - - - - Proxy server not found - Прокси-сервер не найден - - - - Proxy connection refused - В соединении прокси-сервером отказано - - - - Proxy server connection timed out - Время на соединение с прокси-сервером истекло - - - - Proxy connection closed prematurely - Соединение с прокси-сервером неожиданно закрыто - - - - QIBaseDriver - - - Error opening database - Ошибка открытия базы данных - - - - Could not start transaction - Не удалось начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - QIBaseResult - - - Unable to create BLOB - Невозможно создать BLOB - - - - Unable to write BLOB - Невозможно записать BLOB - - - - Unable to open BLOB - Невозможно открыть BLOB - - - - Unable to read BLOB - Невозможно прочитать BLOB - - - - - Could not find array - Не удалось найти массив - - - - Could not get array data - Не удалось найти данные массива - - - - Could not get query info - Не удалось найти информацию о запросе - - - - Could not start transaction - Не удалось начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Could not allocate statement - Не удалось получить ресурсы для создания выражения - - - - Could not prepare statement - Не удалось подготовить выражение - - - - - Could not describe input statement - Не удалось описать входящее выражение - - - - Could not describe statement - Не удалось описать выражение - - - - Unable to close statement - Невозможно закрыть выражение - - - - Unable to execute query - Невозможно выполнить запрос - - - - Could not fetch next item - Не удалось получить следующий элемент - - - - Could not get statement info - Не удалось найти информацию о выражении - - - - QIODevice - - - Permission denied - Доступ запрещён - - - - Too many open files - Слишком много открытых файлов - - - - No such file or directory - Файл или каталог не существует - - - - No space left on device - Нет свободного места на устройстве - - - - Unknown error - Неизвестная ошибка - - - - QInputContext - - - XIM - Метод ввода X-сервера - - - - XIM input method - Метод ввода X-сервера - - - - Windows input method - Метод ввода Windows - - - - Mac OS X input method - Метод ввода Mac OS X - - - - QInputDialog - - - Enter a value: - Укажите значение: - - - - QLibrary - - - Could not mmap '%1': %2 - Не удалось выполнить mmap '%1': %2 - - - - Plugin verification data mismatch in '%1' - Проверочная информация для модуля '%1' не совпадает - - - - Could not unmap '%1': %2 - Не удалось выполнить unmap '%1': %2 - - - - The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - Модуль '%1' использует несоместимую библиотеку Qt. (%2.%3.%4) [%5] - - - - The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - Модуль '%1' использует несоместимую библиотеку Qt. Ожидается ключ "%2", но получен ключ "%3" - - - - Unknown error - Неизвестная ошибка - - - - - The shared library was not found. - Динамическая библиотека не найдена. - - - - The file '%1' is not a valid Qt plugin. - Файл '%1' - не является корректным модулем Qt. - - - - The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - Модуль '%1' использует несоместимую библиотеку Qt. (Невозможно совместить релизные и отладочные библиотеки.) - - - - - Cannot load library %1: %2 - Невозможно загрузить библиотеку %1: %2 - - - - - Cannot unload library %1: %2 - Невозможно выгрузить библиотеку %1: %2 - - - - - Cannot resolve symbol "%1" in %2: %3 - Невозможно разрешить символ "%1" в %2: %3 - - - - QLineEdit - - - &Undo - &Отменить действие - - - - &Redo - &Повторить действие - - - - Cu&t - &Вырезать - - - - &Copy - &Копировать - - - - &Paste - В&ставить - - - - Delete - Удалить - - - - Select All - Выделить всё - - - - QLocalServer - - - - %1: Name error - %1: Некорректное имя - - - - %1: Permission denied - %1: Доступ запрещён - - - - %1: Address in use - %1: Адрес используется - - - - - %1: Unknown error %2 - %1: Неизвестная ошибка %2 - - - - QLocalSocket - - - - %1: Connection refused - %1: Отказано в соединении - - - - - %1: Remote closed - %1: Закрыто удаленной стороной - - - - - - - %1: Invalid name - %1: Некорректное имя - - - - - %1: Socket access error - %1: Ошибка обращения к сокету - - - - - %1: Socket resource error - %1: Ошибка выделения ресурсов сокета - - - - - %1: Socket operation timed out - %1: Время на операцию с сокетом истекло - - - - - %1: Datagram too large - %1: Датаграмма слишком большая - - - - - - %1: Connection error - %1: Ошибка соединения - - - - - %1: The socket operation is not supported - %1: Операция с сокетом не поддерживается - - - - %1: Unknown error - %1: Неизвестная ошибка - - - - - %1: Unknown error %2 - %1: Неизвестная ошибка %2 - - - - QMYSQLDriver - - - Unable to open database ' - Невозможно открыть базу данных ' - - - - Unable to connect - Невозможно соединиться - - - - Unable to begin transaction - Невозможно начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - QMYSQLResult - - - Unable to fetch data - Невозможно получить данные - - - - Unable to execute query - Невозможно выполнить запрос - - - - Unable to store result - Невозможно сохранить результат - - - - - Unable to prepare statement - Невозможно подготовить выражение - - - - Unable to reset statement - Невозможно сбросить выражение - - - - Unable to bind value - Невозможно привязать значение - - - - Unable to execute statement - Невозможно выполнить выражение - - - - - Unable to bind outvalues - Невозможно привязать результирующие значения - - - - Unable to store statement results - Невозможно сохранить результаты выполнения выражения - - - - Unable to execute next query - Невозможно выполнить следующий запрос - - - - Unable to store next result - Невозможно сохранить следующий результат - - - - QMdiArea - - - (Untitled) - (Неозаглавлено) - - - - QMdiSubWindow - - - %1 - [%2] - %1 - [%2] - - - - Close - Закрыть - - - - Minimize - Свернуть - - - - Restore Down - Восстановить - - - - &Restore - &Восстановить - - - - &Move - &Переместить - - - - &Size - &Размер - - - - Mi&nimize - &Свернуть - - - - Ma&ximize - Р&аспахнуть - - - - Stay on &Top - Оставаться &сверху - - - - &Close - &Закрыть - - - - - [%1] - - [%1] - - - - Maximize - Распахнуть - - - - Unshade - Восстановить из заголовка - - - - Shade - Свернуть в заголовок - - - - Restore - Восстановить - - - - Help - Справка - - - - Menu - Меню - - - - QMenu - - - - Close - Закрыть - - - - - Open - Открыть - - - - - - Execute - Выполнить - - - - QMessageBox - - - Help - Справка - - - - - - - OK - Закрыть - - - - <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> - <h3>О Qt</h3><p>Данная программа использует Qt версии %1.</p><p>Qt - это инструментарий для разработки кроссплатформенных приложений на C++.</p><p>Qt предоставляет совместимость на уровне исходных текстов между MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux и всеми популярными коммерческими вариантами Unix. Также Qt доступна для встраиваемых устройств в виде Qt для Embedded Linux и Qt для Windows CE.</p><p>Qt доступна под тремя различными лицензиями, разработанными для удовлетворения требований различных пользователей.</p>Qt под нашей коммерческой лицензией предназначена для развития проприетарного/коммерческого программного обеспечения, когда Вы не желаете предоставлять исходные коды третьим сторонам, или в случае невозможности принятия условий лицензий GNU LGPL версии 2.1 или GNU GPL версии 3.0.</p><p>Qt под лицензией GNU LGPL версии 2.1 предназначена для разработки программного обеспечения с открытым исходным кодом или коммерческого программного обеспечения при соблюдении постановлений и условий лицензии GNU LGPL версии 2.1.</p><p>Qt под лицензией GNU General Public License версии 3.0 предназначена для разработки программных приложений в тех случаях, когда Вы хотели бы использовать такие приложения в сочетании с программным обеспечением на условиях лицензии GNU GPL с версии 3.0 или если Вы готовы соблюдать условия лицензии GNU GPL версии 3.0.</p><p>Обратитесь к <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> для обзора лицензий Qt.</p><p>Copyright (C) 2009 Корпорация Nokia и/или её дочерние подразделения.</p><p>Qt - продукт компании Nokia. Обратитесь к <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> для получения дополнительной информации.</p> - - - - About Qt - О Qt - - - - Show Details... - Показать подробности... - - - - Hide Details... - Скрыть подробности... - - - - QMultiInputContext - - - Select IM - Выбор режима ввода - - - - QMultiInputContextPlugin - - - Multiple input method switcher - - - - - Multiple input method switcher that uses the context menu of the text widgets - - - - - QNativeSocketEngine - - - The remote host closed the connection - Удалённый узел закрыл соединение - - - - Network operation timed out - Время на сетевую операцию истекло - - - - Out of resources - Недостаточно ресурсов - - - - Unsupported socket operation - Операция с сокетом не поддерживается - - - - Protocol type not supported - Протокол не поддерживается - - - - Invalid socket descriptor - Некорректный дескриптор сокета - - - - Network unreachable - Сеть недоступна - - - - Permission denied - Доступ запрещён - - - - Connection timed out - Время на соединение истекло - - - - Connection refused - Отказано в соединении - - - - The bound address is already in use - Адрес уже используется - - - - The address is not available - Адрес недоступен - - - - The address is protected - Адрес защищён - - - - Unable to send a message - Невозможно отправить сообщение - - - - Unable to receive a message - Невозможно получить сообщение - - - - Unable to write - Невозможно записать - - - - Network error - Ошибка сети - - - - Another socket is already listening on the same port - Другой сокет уже прослушивает этот порт - - - - Unable to initialize non-blocking socket - Невозможно инициализировать не-блочный сокет - - - - Unable to initialize broadcast socket - Невозможно инициализировать широковещательный сокет - - - - Attempt to use IPv6 socket on a platform with no IPv6 support - Попытка использовать IPv6 на платформе, не поддерживающей IPv6 - - - - Host unreachable - Узел недоступен - - - - Datagram was too large to send - Датаграмма слишком большая для отправки - - - - Operation on non-socket - Операция с не-сокетом - - - - Unknown error - Неизвестная ошибка - - - - The proxy type is invalid for this operation - Некорректный тип прокси-сервера для данной операции - - - - QNetworkAccessCacheBackend - - - Error opening %1 - Ошибка открытия %1 - - - - QNetworkAccessFileBackend - - - Request for opening non-local file %1 - Запрос на открытие файла вне файловой системы %1 - - - - Error opening %1: %2 - Ошибка открытия %1: %2 - - - - Write error writing to %1: %2 - Ошибка записи в %1: %2 - - - - Cannot open %1: Path is a directory - Невозможно открыть %1: Указан путь к каталогу - - - - Read error reading from %1: %2 - Ошибка чтения из %1: %2 - - - - QNetworkAccessFtpBackend - - - No suitable proxy found - Подходящий прокси-сервер не найден - - - - Cannot open %1: is a directory - Невозможно открыть %1: Указан путь к каталогу - - - - Logging in to %1 failed: authentication required - Соединение с %1 не удалось: требуется авторизация - - - - Error while downloading %1: %2 - Ошибка в процессе загрузки %1: %2 - - - - Error while uploading %1: %2 - Ошибка в процессе отгрузки %1: %2 - - - - QNetworkAccessHttpBackend - - - No suitable proxy found - Подходящий прокси-сервер не найден - - - - QNetworkReply - - - Error downloading %1 - server replied: %2 - Ошибка загрузки %1 - ответ сервера: %2 - - - - Protocol "%1" is unknown - Неизвестный протокол "%1" - - - - QNetworkReplyImpl - - - - Operation canceled - Операция отменена - - - - QOCIDriver - - - Unable to logon - Невозможно авторизоваться - - - - Unable to initialize - QOCIDriver - Невозможно инициализировать - - - - Unable to begin transaction - Невозможно начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - QOCIResult - - - - - Unable to bind column for batch execute - Невозможно привязать столбец для пакетного выполнения - - - - Unable to execute batch statement - Невозможно выполнить пакетное выражение - - - - Unable to goto next - Невозможно перейти к следующей строке - - - - Unable to alloc statement - Невозможно создать выражение - - - - Unable to prepare statement - Невозможно подготовить выражение - - - - Unable to get statement type - Невозможно определить тип выражения - - - - Unable to bind value - Невозможно привязать результирующие значения - - - - Unable to execute statement - Невозможно выполнить выражение - - - - QODBCDriver - - - Unable to connect - Невозможно соединиться - - - - Unable to connect - Driver doesn't support all needed functionality - Невозможно соединиться - Драйвер не поддерживает требуемый функционал - - - - Unable to disable autocommit - Невозможно отключить автовыполнение транзакции - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - Unable to enable autocommit - Невозможно установить автовыполнение транзакции - - - - QODBCResult - - - - QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - QODBCResult::reset: Невозможно установить 'SQL_CURSOR_STATIC' атрибутом выражение. Проверьте настройки драйвера ODBC - - - - - Unable to execute statement - Невозможно выполнить выражение - - - - Unable to fetch next - Невозможно получить следующую строку - - - - Unable to prepare statement - Невозможно подготовить выражение - - - - Unable to bind variable - Невозможно привязать значение - - - - - - Unable to fetch last - Невозможно получить последнюю строку - - - - Unable to fetch - Невозможно получить данные - - - - Unable to fetch first - Невозможно получить первую строку - - - - Unable to fetch previous - Невозможно получить предыдущую строку - - - - QObject - - - Home - Домой - - - - Operation not supported on %1 - Операция не поддерживается для %1 - - - - Invalid URI: %1 - Некорректный URI: %1 - - - - Write error writing to %1: %2 - Ошибка записи в %1: %2 - - - - Read error reading from %1: %2 - Ошибка чтения из %1: %2 - - - - Socket error on %1: %2 - Ошика сокета для %1: %2 - - - - Remote host closed the connection prematurely on %1 - Удалённый узел неожиданно прервал соединение для %1 - - - - Protocol error: packet of size 0 received - Ошибка протокола: получен пакет нулевого размера - - - - - No host name given - Имя узла не задано - - - - QPPDOptionsModel - - - Name - Имя - - - - Value - Значение - - - - QPSQLDriver - - - Unable to connect - Невозможно соединиться - - - - Could not begin transaction - Не удалось начать транзакцию - - - - Could not commit transaction - Не удалось выполнить транзакцию - - - - Could not rollback transaction - Не удалось откатить транзакцию - - - - Unable to subscribe - Невозможно подписаться - - - - Unable to unsubscribe - Невозможно отписаться - - - - QPSQLResult - - - Unable to create query - Невозможно создать запрос - - - - Unable to prepare statement - Невозможно подготовить выражение - - - - QPageSetupWidget - - - Centimeters (cm) - Сантиметры (cm) - - - - Millimeters (mm) - Миллиметры (mm) - - - - Inches (in) - Дюймы (in) - - - - Points (pt) - Точки (pt) - - - - Form - Форма - - - - Paper - Бумага - - - - Page size: - Размер страницы: - - - - Width: - Ширина: - - - - Height: - Высота: - - - - Paper source: - Источник бумаги: - - - - Orientation - Ориентация - - - - Portrait - Книжная - - - - Landscape - Альбомная - - - - Reverse landscape - Перевёрнутая альбомная - - - - Reverse portrait - Перевёрнутая книжная - - - - Margins - Поля - - - - - top margin - верхнее поле - - - - - left margin - левое поле - - - - - right margin - правое поле - - - - - bottom margin - нижнее поле - - - - QPluginLoader - - - Unknown error - Неизвестная ошибка - - - - The plugin was not loaded. - Модуль не был загружен. - - - - QPrintDialog - - - locally connected - соединено локально - - - - - Aliases: %1 - Псевдонимы: %1 - - - - - unknown - неизвестно - - - - A0 (841 x 1189 mm) - A0 (841 x 1189 мм) - - - - A1 (594 x 841 mm) - A1 (594 x 841 мм) - - - - A2 (420 x 594 mm) - A2 (420 x 594 мм) - - - - A3 (297 x 420 mm) - A3 (297 x 420 мм) - - - - A4 (210 x 297 mm, 8.26 x 11.7 inches) - A4 (210 x 297 мм, 8.26 x 11.7 дюймов) - - - - A5 (148 x 210 mm) - A5 (148 x 210 мм) - - - - A6 (105 x 148 mm) - A6 (105 x 148 мм) - - - - A7 (74 x 105 mm) - A7 (74 x 105 мм) - - - - A8 (52 x 74 mm) - A8 (52 x 74 мм) - - - - A9 (37 x 52 mm) - A9 (37 x 52 мм) - - - - B0 (1000 x 1414 mm) - B0 (1000 x 1414 мм) - - - - B1 (707 x 1000 mm) - B1 (707 x 1000 мм) - - - - B2 (500 x 707 mm) - B2 (500 x 707 мм) - - - - B3 (353 x 500 mm) - B3 (353 x 500 мм) - - - - B4 (250 x 353 mm) - B4 (250 x 353 мм) - - - - B5 (176 x 250 mm, 6.93 x 9.84 inches) - B5 (176 x 250 мм, 6.93 x 9.84 дюймов) - - - - B6 (125 x 176 mm) - B6 (125 x 176 мм) - - - - B7 (88 x 125 mm) - B7 (88 x 125 мм) - - - - B8 (62 x 88 mm) - B8 (62 x 88 мм) - - - - B9 (44 x 62 mm) - B9 (44 x 62 мм) - - - - B10 (31 x 44 mm) - B10 (31 x 44 мм) - - - - C5E (163 x 229 mm) - C5E (163 x 229 мм) - - - - DLE (110 x 220 mm) - DLE (110 x 220 мм) - - - - Executive (7.5 x 10 inches, 191 x 254 mm) - Executive (191 x 254 мм, 7.5 x 10 дюймов) - - - - Folio (210 x 330 mm) - Folio (210 x 330 мм) - - - - Ledger (432 x 279 mm) - Ledger (432 x 279 мм) - - - - Legal (8.5 x 14 inches, 216 x 356 mm) - Legal (216 x 356 мм, 8.5 x 14 дюймов) - - - - Letter (8.5 x 11 inches, 216 x 279 mm) - Letter (216 x 279 мм, 8.5 x 11 дюймов) - - - - Tabloid (279 x 432 mm) - Tabloid (279 x 432 мм) - - - - US Common #10 Envelope (105 x 241 mm) - Конверт US #10 (105x241 мм) - - - - OK - Закрыть - - - - - - Print - Печать - - - - Print To File ... - Печать в файл ... - - - - Print range - Печатать диапазон - - - - Print all - Печатать все - - - - File %1 is not writable. -Please choose a different file name. - %1 недоступен для записи. -Выберите другое имя файла. - - - - %1 already exists. -Do you want to overwrite it? - %1 уже существует. -Хотите заменить его? - - - - File exists - Файл существует - - - - <qt>Do you want to overwrite it?</qt> - <qt>Хотите заменить?</qt> - - - - Print selection - Выделенный фрагмент - - - - %1 is a directory. -Please choose a different file name. - %1 - это каталог. -Выберите другое имя файла. - - - - A0 - - - - - A1 - - - - - A2 - - - - - A3 - - - - - A4 - - - - - A5 - - - - - A6 - - - - - A7 - - - - - A8 - - - - - A9 - - - - - B0 - - - - - B1 - - - - - B2 - - - - - B3 - - - - - B4 - - - - - B5 - - - - - B6 - - - - - B7 - - - - - B8 - - - - - B9 - - - - - B10 - - - - - C5E - - - - - DLE - - - - - Executive - - - - - Folio - - - - - Ledger - - - - - Legal - - - - - Letter - - - - - Tabloid - - - - - US Common #10 Envelope - - - - - Custom - Произвольный - - - - - &Options >> - &Параметры >> - - - - &Print - &Печать - - - - &Options << - &Параметры << - - - - Print to File (PDF) - Печать в файл (PDF) - - - - Print to File (Postscript) - Печать в файл (Postscript) - - - - Local file - Локальный файл - - - - Write %1 file - Запись %1 файла - - - - The 'From' value cannot be greater than the 'To' value. - Значение 'от' не может быть больше значения 'до'. - - - - QPrintPreviewDialog - - - - Page Setup - Параметры страницы - - - - %1% - %1% - - - - Print Preview - Просмотр печати - - - - Next page - Следующая страница - - - - Previous page - Предыдущая страница - - - - First page - Первая страница - - - - Last page - Последняя страница - - - - Fit width - По ширине - - - - Fit page - На всю страницу - - - - Zoom in - Увеличить - - - - Zoom out - Уменьшить - - - - Portrait - Книжная - - - - Landscape - Альбомная - - - - Show single page - Показать одну страницу - - - - Show facing pages - Показать титульные страницы - - - - Show overview of all pages - Показать обзор всех страниц - - - - Print - Печать - - - - Page setup - Параметры страницы - - - - Close - Закрыть - - - - Export to PDF - Экспорт в PDF - - - - Export to PostScript - Экспорт в Postscript - - - - QPrintPropertiesWidget - - - Form - Форма - - - - Page - Страница - - - - Advanced - Дополнительно - - - - QPrintSettingsOutput - - - Form - Форма - - - - Copies - Копии - - - - Print range - Диапазон печати - - - - Print all - Все - - - - Pages from - Страницы от - - - - to - до - - - - Selection - Выделенный фрагмент - - - - Output Settings - Настройки вывода - - - - Copies: - Количество копий: - - - - Collate - Разобрать про копиям - - - - Reverse - Обратный порядок - - - - Options - Параметры - - - - Color Mode - Режим цвета - - - - Color - Цвет - - - - Grayscale - Оттенки серого - - - - Duplex Printing - Двусторонняя печать - - - - None - Нет - - - - Long side - По длинной стороне - - - - Short side - По короткой стороне - - - - QPrintWidget - - - Form - Форма - - - - Printer - Принтер - - - - &Name: - &Название: - - - - P&roperties - С&войства - - - - Location: - Расположение: - - - - Preview - Просмотр - - - - Type: - Тип: - - - - Output &file: - Выходной &файл: - - - - ... - ... - - - - QProcess - - - - Could not open input redirection for reading - Не удалось открыть перенаправление ввода для чтения - - - - - Could not open output redirection for writing - Не удалось открыть перенаправление вывода для записи - - - - Resource error (fork failure): %1 - Ошибка выделения ресурсов (сбой fork): %1 - - - - - - - - - - - - Process operation timed out - Время на операцию с процессом истекло - - - - - - - Error reading from process - Ошибка получения данных от процесса - - - - - - Error writing to process - Ошибка отправки данных процессу - - - - Process crashed - Процесс завершился с ошибкой - - - - No program defined - Программа не указана - - - - Process failed to start - Не удалось запустить процесс - - - - QProgressDialog - - - Cancel - Отмена - - - - QPushButton - - - Open - Открыть - - - - QRadioButton - - - Check - Отметить - - - - QRegExp - - - no error occurred - ошибки отсутствуют - - - - disabled feature used - использование отключённых возможностей - - - - bad char class syntax - неправильный синтаксис класса символов - - - - bad lookahead syntax - неправильный предварительный синтаксис - - - - bad repetition syntax - неправильный синтаксис повторения - - - - invalid octal value - некорректное восьмеричное значение - - - - missing left delim - отсутствует левый разделитель - - - - unexpected end - неожиданный конец - - - - met internal limit - достигнуто внутреннее ограничение - - - - QSQLite2Driver - - - Error to open database - Ошибка открытия базы данных - - - - Unable to begin transaction - Невозможно начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback Transaction - Невозможно откатить транзакцию - - - - QSQLite2Result - - - Unable to fetch results - Невозможно получить результаты - - - - Unable to execute statement - Невозможно выполнить выражение - - - - QSQLiteDriver - - - Error opening database - Ошибка открытия базы данных - - - - Error closing database - Ошибка закрытия базы данных - - - - Unable to begin transaction - Невозможно начать транзакцию - - - - Unable to commit transaction - Невозможно выполнить транзакцию - - - - Unable to rollback transaction - Невозможно откатить транзакцию - - - - QSQLiteResult - - - - - Unable to fetch row - Невозможно получить строку - - - - Unable to execute statement - Невозможно выполнить выражение - - - - Unable to reset statement - Невозможно сбросить выражение - - - - Unable to bind parameters - Невозможно привязать параметр - - - - Parameter count mismatch - Количество параметров не совпадает - - - - No query - Отсутствует запрос - - - - QScrollBar - - - Scroll here - Прокрутить сюда - - - - Left edge - К левой границе - - - - Top - Вверх - - - - Right edge - К правой границе - - - - Bottom - Вниз - - - - Page left - На страницу влево - - - - - Page up - На страницу вверх - - - - Page right - На страницу вправо - - - - - Page down - На страницу вниз - - - - Scroll left - Прокрутить влево - - - - Scroll up - Прокрутить вверх - - - - Scroll right - Прокрутить вправо - - - - Scroll down - Прокрутить вниз - - - - Line up - На строку вверх - - - - Position - Положение - - - - Line down - На строку вниз - - - - QSharedMemory - - - %1: unable to set key on lock - %1: невозможно установить ключ на блокировку - - - - %1: create size is less then 0 - %1: размер меньше нуля - - - - - %1: unable to lock - %1: невозможно заблокировать - - - - %1: unable to unlock - %1: невозможно разблокировать - - - - - %1: permission denied - %1: доступ запрещён - - - - - %1: already exists - %1: уже существует - - - - - %1: doesn't exists - %1: не существует - - - - - %1: out of resources - %1: недостаточно ресурсов - - - - - %1: unknown error %2 - %1: неизвестная ошибка %2 - - - - %1: key is empty - %1: пустой ключ - - - - %1: unix key file doesn't exists - %1: специфический ключ unix не существует - - - - %1: ftok failed - %1: ошибка ftok - - - - - %1: unable to make key - %1: невозможно создать ключ - - - - %1: system-imposed size restrictions - %1: системой наложены ограничения на размер - - - - %1: not attached - %1: не приложенный - - - - %1: invalid size - %1: некорректный размер - - - - %1: key error - %1: некорректный ключ - - - - %1: size query failed - %1: не удалось запросить размер - - - - QShortcut - - - Space - - - - - Esc - - - - - Tab - - - - - Backtab - - - - - Backspace - - - - - Return - - - - - Enter - - - - - Ins - - - - - Del - - - - - Pause - Пауза - - - - Print - Печать - - - - SysReq - - - - - Home - Домой - - - - End - - - - - Left - Влево - - - - Up - Вверх - - - - Right - Вправо - - - - Down - Вниз - - - - PgUp - - - - - PgDown - - - - - CapsLock - - - - - NumLock - - - - - ScrollLock - - - - - Menu - Меню - - - - Help - Справка - - - - Back - Назад - - - - Forward - Вперёд - - - - Stop - Остановить - - - - Refresh - Обновить - - - - Volume Down - - - - - Volume Mute - - - - - Volume Up - - - - - Bass Boost - - - - - Bass Up - - - - - Bass Down - - - - - Treble Up - - - - - Treble Down - - - - - Media Play - - - - - Media Stop - - - - - Media Previous - - - - - Media Next - - - - - Media Record - - - - - Favorites - - - - - Search - Поиск - - - - Standby - - - - - Open URL - - - - - Launch Mail - - - - - Launch Media - - - - - Launch (0) - - - - - Launch (1) - - - - - Launch (2) - - - - - Launch (3) - - - - - Launch (4) - - - - - Launch (5) - - - - - Launch (6) - - - - - Launch (7) - - - - - Launch (8) - - - - - Launch (9) - - - - - Launch (A) - - - - - Launch (B) - - - - - Launch (C) - - - - - Launch (D) - - - - - Launch (E) - - - - - Launch (F) - - - - - Print Screen - - - - - Page Up - - - - - Page Down - - - - - Caps Lock - - - - - Num Lock - - - - - Number Lock - - - - - Scroll Lock - - - - - Insert - Вставить - - - - Delete - Удалить - - - - Escape - - - - - System Request - - - - - Select - - - - - Yes - Да - - - - No - Нет - - - - Context1 - - - - - Context2 - - - - - Context3 - - - - - Context4 - - - - - Call - - - - - Hangup - - - - - Flip - - - - - - Ctrl - - - - - - Shift - - - - - - Alt - - - - - - Meta - - - - - + - - - - - F%1 - - - - - Home Page - - - - - QSlider - - - Page left - Страница влево - - - - Page up - Страница вверх - - - - Position - Положение - - - - Page right - Страница вправо - - - - Page down - Страница вниз - - - - QSocks5SocketEngine - - - Connection to proxy refused - В соединении прокси-сервером отказано - - - - Connection to proxy closed prematurely - Соединение с прокси-сервером неожиданно закрыто - - - - Proxy host not found - Прокси-сервер не найден - - - - Connection to proxy timed out - Время на соединение с прокси-сервером истекло - - - - Proxy authentication failed - Не удалось авторизоваться на прокси-сервере - - - - Proxy authentication failed: %1 - Не удалось авторизоваться на прокси-сервере: %1 - - - - SOCKS version 5 protocol error - Ошибка протокола SOCKSv5 - - - - General SOCKSv5 server failure - Ошибка сервере SOCKSv5 - - - - Connection not allowed by SOCKSv5 server - Соединение не разрешено сервером SOCKSv5 - - - - TTL expired - TTL истекло - - - - SOCKSv5 command not supported - Команда SOCKSv5 не поддерживается - - - - Address type not supported - Тип адреса не поддерживается - - - - Unknown SOCKSv5 proxy error code 0x%1 - Неизвестная ошибка SOCKSv5 прокси (код 0x%1) - - - - Network operation timed out - Время на сетевую операцию истекло - - - - QSpinBox - - - More - Больше - - - - Less - Меньше - - - - QSql - - - Delete - Удалить - - - - Delete this record? - Удалить данную запись? - - - - - - Yes - Да - - - - - - No - Нет - - - - Insert - Вставить - - - - Update - Обновить - - - - Save edits? - Сохранить изменения? - - - - Cancel - Отмена - - - - Confirm - Подтверждение - - - - Cancel your edits? - Отменить изменения? - - - - QSslSocket - - - Unable to write data: %1 - Невозможно записать данные: %1 - - - - Error while reading: %1 - Ошибка чтения: %1 - - - - Error during SSL handshake: %1 - Ошибка квитирования SSL: %1 - - - - Error creating SSL context (%1) - Ошибка создания контекста SSL: (%1) - - - - Invalid or empty cipher list (%1) - Неправильный или пустой список шифров (%1) - - - - Error creating SSL session, %1 - Ошибка создания сессии SSL, %1 - - - - Error creating SSL session: %1 - Ошибка создания сессии SSL: %1 - - - - Cannot provide a certificate with no key, %1 - Невозможно предоставить сертификат без ключа, %1 - - - - Error loading local certificate, %1 - Ошибка загрузки локального сертификата, %1 - - - - Error loading private key, %1 - Ошибка загрузки закрытого ключа, %1 - - - - Private key does not certificate public key, %1 - Закрытый ключ не соответствует открытому ключу, %1 - - - - QSystemSemaphore - - - - %1: out of resources - %1: недостаточно ресурсов - - - - - %1: permission denied - %1: доступ запрещён - - - - %1: already exists - %1: уже существует - - - - %1: does not exist - %1: не существует - - - - - %1: unknown error %2 - %1: неизвестная ошибка %2 - - - - QTDSDriver - - - Unable to open connection - Невозможно открыть соединение - - - - Unable to use database - Невозможно использовать базу данных - - - - QTabBar - - - Scroll Left - Прокрутить влево - - - - Scroll Right - Прокрутить вправо - - - - QTcpServer - - - Operation on socket is not supported - Операция с сокетом не поддерживается - - - - QTextControl - - - &Undo - &Отменить действие - - - - &Redo - &Повторить действие - - - - Cu&t - &Вырезать - - - - &Copy - &Копировать - - - - Copy &Link Location - Скопировать &адрес ссылки - - - - &Paste - В&ставить - - - - Delete - Удалить - - - - Select All - Выделить всё - - - - QToolButton - - - - Press - Нажать - - - - - Open - Открыть - - - - QUdpSocket - - - This platform does not support IPv6 - Данная платформа не поддерживает IPv6 - - - - QUndoGroup - - - Undo - Отменить действие - - - - Redo - Повторить действие - - - - QUndoModel - - - <empty> - <пусто> - - - - QUndoStack - - - Undo - Отменить действие - - - - Redo - Повторить действие - - - - QUnicodeControlCharacterMenu - - - LRM Left-to-right mark - LRM Признак письма слева направо - - - - RLM Right-to-left mark - RLM Признак письма справа налево - - - - ZWJ Zero width joiner - - - - - ZWNJ Zero width non-joiner - - - - - ZWSP Zero width space - - - - - LRE Start of left-to-right embedding - - - - - RLE Start of right-to-left embedding - - - - - LRO Start of left-to-right override - - - - - RLO Start of right-to-left override - - - - - PDF Pop directional formatting - - - - - Insert Unicode control character - Вставить управляющий символ Unicode - - - - QWebFrame - - - Request cancelled - Запрос отменён - - - - Request blocked - Запрос блокирован - - - - Cannot show URL - Невозможно отобразить URL - - - - Frame load interruped by policy change - Загрузка фрейма прервана изменением политики - - - - Cannot show mimetype - Невозможно отобразить тип MIME - - - - File does not exist - Файл не существует - - - - QWebPage - - - Bad HTTP request - Некорректный HTTP-запрос - - - - Submit - default label for Submit buttons in forms on web pages - Отправить - - - - Submit - Submit (input element) alt text for <input> elements with no alt, title, or value - Отправить - - - - Reset - default label for Reset buttons in forms on web pages - Сбросить - - - - This is a searchable index. Enter search keywords: - text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - Индекс поиска. Введите ключевые слова для поиска: - - - - Choose File - title for file button used in HTML forms - Обзор... - - - - No file selected - text to display in file button used in HTML forms when no file is selected - Файл не указан - - - - Open in New Window - Open in New Window context menu item - Открыть в новом окне - - - - Save Link... - Download Linked File context menu item - Сохранить по ссылке как... - - - - Copy Link - Copy Link context menu item - Копировать адрес ссылки - - - - Open Image - Open Image in New Window context menu item - Открыть изображение - - - - Save Image - Download Image context menu item - Сохранить изображение - - - - Copy Image - Copy Link context menu item - Копировать изображение в буффер обмена - - - - Open Frame - Open Frame in New Window context menu item - Открыть фрейм - - - - Copy - Copy context menu item - Копировать - - - - Go Back - Back context menu item - Назад - - - - Go Forward - Forward context menu item - Вперёд - - - - Stop - Stop context menu item - Остановить - - - - Reload - Reload context menu item - Обновить - - - - Cut - Cut context menu item - Вырезать - - - - Paste - Paste context menu item - Вставить - - - - No Guesses Found - No Guesses Found context menu item - - - - - Ignore - Ignore Spelling context menu item - Пропустить - - - - Add To Dictionary - Learn Spelling context menu item - Добавить в словарь - - - - Search The Web - Search The Web context menu item - Найти в Интернет - - - - Look Up In Dictionary - Look Up in Dictionary context menu item - Поиск в словаре - - - - Open Link - Open Link context menu item - Открыть ссылку - - - - Ignore - Ignore Grammar context menu item - Пропустить - - - - Spelling - Spelling and Grammar context sub-menu item - Орфография - - - - Show Spelling and Grammar - menu item title - - - - - Hide Spelling and Grammar - menu item title - - - - - Check Spelling - Check spelling context menu item - Проверка орфографии - - - - Check Spelling While Typing - Check spelling while typing context menu item - Проверять орфографию при наборе - - - - Check Grammar With Spelling - Check grammar with spelling context menu item - - - - - Fonts - Font context sub-menu item - Шрифты - - - - Bold - Bold context menu item - Жирный - - - - Italic - Italic context menu item - Курсив - - - - Underline - Underline context menu item - Подчёркнутый - - - - Outline - Outline context menu item - Перечёркнутый - - - - Direction - Writing direction context sub-menu item - Направление - - - - Text Direction - Text direction context sub-menu item - Направление текста - - - - Default - Default writing direction context menu item - По умолчанию - - - - LTR - Left to Right context menu item - Слева направо - - - - RTL - Right to Left context menu item - Справа налево - - - - Inspect - Inspect Element context menu item - Проверить - - - - No recent searches - Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - История поиска пуста - - - - Recent searches - label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - История поиска - - - - Clear recent searches - menu item in Recent Searches menu that empties menu's contents - Очистить историю поиска - - - - Unknown - Unknown filesize FTP directory listing item - Неизвестно - - - - %1 (%2x%3 pixels) - Title string for images - %1 (%2x%3 px) - - - - Web Inspector - %2 - - - - - Scroll here - Прокрутить сюда - - - - Left edge - К левой границе - - - - Top - Вверх - - - - Right edge - К правой границе - - - - Bottom - Вниз - - - - Page left - На страницу влево - - - - Page up - На страницу вверх - - - - Page right - На страницу вправо - - - - Page down - На страницу вниз - - - - Scroll left - Прокрутить влево - - - - Scroll up - Прокрутить вверх - - - - Scroll right - Прокрутить вправо - - - - Scroll down - Прокрутить вниз - - - - %n file(s) - number of chosen file - - %n файл(а) - %n файла - %n файлов - - - - - JavaScript Alert - %1 - - - - - JavaScript Confirm - %1 - - - - - JavaScript Prompt - %1 - - - - - Move the cursor to the next character - Переместить указатель к следующему символу - - - - Move the cursor to the previous character - Переместить указатель к предыдущему символу - - - - Move the cursor to the next word - Переместить указатель к следующему слову - - - - Move the cursor to the previous word - Переместить указатель к предыдущему слову - - - - Move the cursor to the next line - Переместить указатель на следующую строку - - - - Move the cursor to the previous line - Переместить указатель на предыдущую строку - - - - Move the cursor to the start of the line - Переместить указатель в начало строки - - - - Move the cursor to the end of the line - Переместить указатель в конец строки - - - - Move the cursor to the start of the block - Переместить указатель в начало блока - - - - Move the cursor to the end of the block - Переместить указатель в конец блока - - - - Move the cursor to the start of the document - Переместить указатель в начало документа - - - - Move the cursor to the end of the document - Переместить указатель в конец документа - - - - Select all - Выделить всё - - - - Select to the next character - Выделить до следующего символа - - - - Select to the previous character - Выделить до предыдущего символа - - - - Select to the next word - Выделить до следующего слова - - - - Select to the previous word - Выделить до предыдущего слова - - - - Select to the next line - Выделить до следующей строки - - - - Select to the previous line - Выделить до предыдущей строки - - - - Select to the start of the line - Выделить до начала строки - - - - Select to the end of the line - Выделить до конца строки - - - - Select to the start of the block - Выделить до начала блока - - - - Select to the end of the block - Выделить до конца блока - - - - Select to the start of the document - Выделить до начала документа - - - - Select to the end of the document - Выделить до конца документа - - - - Delete to the start of the word - Удалить до начала слова - - - - Delete to the end of the word - Удалить до конца слова - - - - Insert a new paragraph - Вставить новый параграф - - - - Insert a new line - Вставить новую строку - - - - QWhatsThisAction - - - What's This? - Что это? - - - - QWidget - - - * - * - - - - QWizard - - - Go Back - Назад - - - - Continue - Продолжить - - - - Commit - Передать - - - - Done - Готово - - - - Help - Справка - - - - < &Back - < &Назад - - - - &Finish - &Завершить - - - - Cancel - Отмена - - - - &Help - &Справка - - - - &Next - &Далее - - - - &Next > - &Далее > - - - - QWorkspace - - - &Restore - &Восстановить - - - - &Move - &Переместить - - - - &Size - &Размер - - - - Mi&nimize - &Свернуть - - - - Ma&ximize - Р&аспахнуть - - - - &Close - &Закрыть - - - - Stay on &Top - Оставаться &сверху - - - - - Sh&ade - Св&ернуть в заголовок - - - - - %1 - [%2] - %1 - [%2] - - - - Minimize - Свернуть - - - - Restore Down - Восстановить - - - - Close - Закрыть - - - - &Unshade - В&осстановить из заголовка - - - - QXml - - - no error occurred - ошибки отсутствуют - - - - error triggered by consumer - ошибка вызвана пользователем - - - - unexpected end of file - неожиданный конец файла - - - - more than one document type definition - указано более одного типа документа - - - - error occurred while parsing element - ошибка разбора элемента - - - - tag mismatch - тэг не совпадает - - - - error occurred while parsing content - ошибка разбора документа - - - - unexpected character - неожиданный символ - - - - invalid name for processing instruction - некорректное имя директивы разбора - - - - version expected while reading the XML declaration - в объявлении XML ожидается параметр version - - - - wrong value for standalone declaration - некорректное значение параметра standalone - - - - encoding declaration or standalone declaration expected while reading the XML declaration - в объявлении XML ожидаются параметры encoding или standalone - - - - standalone declaration expected while reading the XML declaration - в объявлении XML ожидается параметр standalone - - - - error occurred while parsing document type definition - ошибка разбора объявления типа документа - - - - letter is expected - ожидалась буква - - - - error occurred while parsing comment - ошибка разбора комментария - - - - error occurred while parsing reference - ошибка разбора ссылки - - - - internal general entity reference not allowed in DTD - внутренняя ссылка на общий объект недопустима в DTD - - - - external parsed general entity reference not allowed in attribute value - внешняя ссылка на общий объект недопустима в значении атрибута - - - - external parsed general entity reference not allowed in DTD - внешняя ссылка на общий объект недопустима в DTD - - - - unparsed entity reference in wrong context - неразобранная ссылка на объект в неверном контексте - - - - recursive entities - рекурсивные объекты - - - - error in the text declaration of an external entity - ошибка в объявлении внешнего объекта - - - - QXmlStream - - - - Extra content at end of document. - Лишние данные в конце документа. - - - - Invalid entity value. - Некорректное значение объекта. - - - - Invalid XML character. - Некорректный символ XML. - - - - Sequence ']]>' not allowed in content. - Последовательность ']]>' недопустима в содержимом. - - - - Namespace prefix '%1' not declared - Префикс пространства имён '%1' не объявлен - - - - Attribute redefined. - Атрибут переопределен. - - - - Unexpected character '%1' in public id literal. - Неожиданный символ '%1' в литерале открытого идентификатора. - - - - Invalid XML version string. - Неверная строка версии XML. - - - - Unsupported XML version. - Неподдерживаемая версия XML. - - - - %1 is an invalid encoding name. - %1 - неверное название кодировки. - - - - Encoding %1 is unsupported - Кодировка %1 не поддерживается - - - - Standalone accepts only yes or no. - Псевдоатрибут 'standalone' может принимать только значения 'yes' или 'no'. - - - - Invalid attribute in XML declaration. - Некорректный атрибут в объявлении XML. - - - - Premature end of document. - Неожиданный конец документа. - - - - Invalid document. - Некорректный документ. - - - - Expected - Ожидалось - - - - , but got ' - , получили ' - - - - Unexpected ' - Неожиданное ' - - - - Expected character data. - Ожидаются символьные данные. - - - - Recursive entity detected. - Обнаружен рекурсивный объект. - - - - Start tag expected. - Ожидается открывающий тэг. - - - - XML declaration not at start of document. - Объявление XML находится не в начале документа. - - - - NDATA in parameter entity declaration. - Не уверен в правильности перевода - NDATA в объявлении объекта-параметра. - - - - %1 is an invalid processing instruction name. - %1 неверное название обрабатываемой инструкции. - - - - Invalid processing instruction name. - Неверное название обрабатываемой инструкции. - - - - - - - Illegal namespace declaration. - Неверное объявление пространства имён. - - - - Invalid XML name. - Некорректное имя XML. - - - - Opening and ending tag mismatch. - Открывающий тэг не совпадает с закрывающим. - - - - Reference to unparsed entity '%1'. - Ссылка на необработанный объект '%1'. - - - - - - Entity '%1' not declared. - Объект '%1' не объявлен. - - - - Reference to external entity '%1' in attribute value. - Ссылка на внешний объект '%1' в значении атрибута. - - - - Invalid character reference. - Неверная символьная ссылка. - - - - - Encountered incorrectly encoded content. - Обнаружено неверно закодированное содержимое. - - - - The standalone pseudo attribute must appear after the encoding. - Псевдоатрибут 'standalone' должен находиться после указания кодировки. - - - - %1 is an invalid PUBLIC identifier. - %1 - неверный идентификатор PUBLIC. - - - - QtXmlPatterns - - - An %1-attribute with value %2 has already been declared. - Атрибут '%1' со значением '%2' уже определен. - - - - An %1-attribute must have a valid %2 as value, which %3 isn't. - Атрибут '%1' должен иметь значение типа '%2', но '%3' им не является. - - - - Network timeout. - Время ожидания сети истекло. - - - - Element %1 can't be serialized because it appears outside the document element. - Элемент %1 не может быть сериализован, так как присутствует вне документа. - - - - Year %1 is invalid because it begins with %2. - Год %1 неверен, так как начинается с %2. - - - - Day %1 is outside the range %2..%3. - День %1 вне диапазона %2..%3. - - - - Month %1 is outside the range %2..%3. - Месяц %1 вне диапазона %2..%3. - - - - Overflow: Can't represent date %1. - Переполнение: Не удается представить дату %1. - - - - Day %1 is invalid for month %2. - День %1 неверен для месяца %2. - - - - Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; - Время 24:%1:%2.%3 неверно. 24 часа, но минуты, секунды и/или миллисекунды отличны от 0; - - - - Time %1:%2:%3.%4 is invalid. - Время %1:%2:%3.%4 неверно. - - - - Overflow: Date can't be represented. - Переполнение: невозможно представить дату. - - - - - At least one component must be present. - Должна присутствовать как минимум одна компонента. - - - - At least one time component must appear after the %1-delimiter. - Как минимум одна компонента времени должна следовать за разделителем '%1'. - - - - No operand in an integer division, %1, can be %2. - Нет параметра в целочисленном делении %1, может быть %2. - - - - The first operand in an integer division, %1, cannot be infinity (%2). - Первый параметр целочисленного деления (%1) не может быть бесконечностью (%2). - - - - The second operand in a division, %1, cannot be zero (%2). - Второй параметр целочисленного деления (%1) не может быть нулем (%2). - - - - %1 is not a valid value of type %2. - %1 не является правильным значением типа %2. - - - - When casting to %1 from %2, the source value cannot be %3. - При преобразовании %2 в %1 исходное значение не может быть %3. - - - - Integer division (%1) by zero (%2) is undefined. - Целочисленное деление (%1) на нуль (%2) не определено. - - - - Division (%1) by zero (%2) is undefined. - Деление (%1) на нуль (%2) не определено. - - - - Modulus division (%1) by zero (%2) is undefined. - Деление по модулю (%1) на нуль (%2) не определено. - - - - - Dividing a value of type %1 by %2 (not-a-number) is not allowed. - Деление числа типа %1 на %2 (not-a-number) недопустимо. - - - - Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. - Деление числа типа %1 на %2 или %3 (плюс-минус нуль) недопустимо. - - - - Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. - Умножение числа типа %1 на %2 или %3 (плюс-минус бесконечность) недопустимо. - - - - A value of type %1 cannot have an Effective Boolean Value. - Значение типа %1 не может быть булевым значением. - - - - Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - Булево значение не может быть вычислено для последовательностей, которые содержат два и более атомарных значения. - - - - Value %1 of type %2 exceeds maximum (%3). - Значение %1 типа %2 больше максимума (%3). - - - - Value %1 of type %2 is below minimum (%3). - Значение %1 типа %2 меньше минимума (%3). - - - - A value of type %1 must contain an even number of digits. The value %2 does not. - Значение типа %1 должно содержать четное количество цифр. Значение %2 этому требованию не удовлетворяет. - - - - %1 is not valid as a value of type %2. - Значение %1 некорректно для типа %2. - - - - Operator %1 cannot be used on type %2. - Оператор %1 не может использоваться для типа %2. - - - - Operator %1 cannot be used on atomic values of type %2 and %3. - Оператор %1 не может использоваться для атомарных значений типов %2 и %3. - - - - The namespace URI in the name for a computed attribute cannot be %1. - URI пространства имён в названии рассчитываемого атрибута не может быть %1. - - - - The name for a computed attribute cannot have the namespace URI %1 with the local name %2. - Название расчитываемого атрибута не может иметь URI пространства имён %1 с локальным именем %2. - - - - Type error in cast, expected %1, received %2. - Ошибка типов в преобразовании, ожидалось %1, получено %2. - - - - When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. - При преобразовании в %1 или производные от него типы исходное значение должно быть того же типа или строковым литералом. Тип %2 недопустим. - - - - No casting is possible with %1 as the target type. - Преобразование к типу %1 невозможно. - - - - It is not possible to cast from %1 to %2. - Невозможно преобразовать %1 в %2. - - - - Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. - Преобразование к %1 невозможно, так как это абстрактный тип и, следовательно, для него невозможно создать объект. - - - - It's not possible to cast the value %1 of type %2 to %3 - Невозможно преобразовать значение %1 типа %2 в %3 - - - - Failure when casting from %1 to %2: %3 - Не удалось преобразовать %1 в %2: %3 - - - - A comment cannot contain %1 - Комментарий не может содержать %1 - - - - A comment cannot end with a %1. - Комментарий не может оканчиваться на %1. - - - - No comparisons can be done involving the type %1. - Невозможно выполнить сравнение с типом %1. - - - - Operator %1 is not available between atomic values of type %2 and %3. - Оператор %1 недоступен между атомарными значениями типа %2 и %3. - - - - An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. - Узел-атрибут не может быть потомком узла-документа. Атрибут %1 неуместен. - - - - A library module cannot be evaluated directly. It must be imported from a main module. - Модуль библиотеки не может использоваться напрямую. Он должен быть импортирован из основного модуля. - - - - No template by name %1 exists. - Шаблон с именем %1 отсутствует. - - - - A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. - Значение типа %1 не может быть условием. Условием могут являться числовой и булевый типы. - - - - A positional predicate must evaluate to a single numeric value. - Позиционный предикат должен вычисляться как числовое выражение. - - - - The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. - Целевое имя в обрабатываемой инструкции не может быть %1 в любой комбинации нижнего и верхнего регистров. Имя %2 некорректно. - - - - %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - %1 некорректное целевое имя в обрабатываемой инструкции. Имя должно быть значением типа %2, например: %3. - - - - The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - Последняя часть пути должна содержать узлы или атомарные значения, но не может содержать и то, и другое одновременно. - - - - The data of a processing instruction cannot contain the string %1 - Данные обрабатываемой инструкции не могут содержать строку '%1' - - - - No namespace binding exists for the prefix %1 - Отсутствует привязка к пространству имён для префикса %1 - - - - No namespace binding exists for the prefix %1 in %2 - Отсутствует привязка к пространству имён для префикса %1 в %2 - - - - - %1 is an invalid %2 - %1 некоррекно для %2 - - - - %1 takes at most %n argument(s). %2 is therefore invalid. - - %1 принимает не более %n аргумента. Следовательно, %2 неверно. - %1 принимает не более %n аргументов. Следовательно, %2 неверно. - %1 принимает не более %n аргументов. Следовательно, %2 неверно. - - - - - %1 requires at least %n argument(s). %2 is therefore invalid. - - %1 принимает не менее %n аргумента. Следовательно, %2 неверно. - %1 принимает не менее %n аргументов. Следовательно, %2 неверно. - %1 принимает не менее %n аргументов. Следовательно, %2 неверно. - - - - - The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. - Первый аргумент %1 не может быть типа %2. Он должен быть числового типа, типа xs:yearMonthDuration или типа xs:dayTimeDuration. - - - - The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - Первый аргумент %1 не может быть типа %2. Он должен быть типа %3, %4 или %5. - - - - The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - Второй аргумент %1 не может быть типа %2. Он должен быть типа %3, %4 или %5. - - - - %1 is not a valid XML 1.0 character. - Символ %1 недопустим для XML 1.0. - - - - The first argument to %1 cannot be of type %2. - Первый аргумент %1 не может быть типа %2. - - - - If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. - Если оба значения имеют региональные смещения, смещения должны быть одинаковы. %1 и %2 не одинаковы. - - - - %1 was called. - %1 было вызвано. - - - - %1 must be followed by %2 or %3, not at the end of the replacement string. - '%1' должно сопровождаться '%2' или '%3', но не в конце замещаемой строки. - - - - In the replacement string, %1 must be followed by at least one digit when not escaped. - В замещаемой строке '%1' должно сопровождаться как минимум одной цифрой, если неэкранировано. - - - - In the replacement string, %1 can only be used to escape itself or %2, not %3 - В замещаемой строке символ '%1' может использоваться только для экранирования самого себя или '%2', но не '%3' - - - - %1 matches newline characters - %1 соответствует символам конца строки - - - - %1 and %2 match the start and end of a line. - %1 и %2 соответствуют началу и концу строки. - - - - Matches are case insensitive - Соответствия регистронезависимы - - - - Whitespace characters are removed, except when they appear in character classes - Символы пробелов удалены, за исключением тех, что были в классах символов - - - - %1 is an invalid regular expression pattern: %2 - %1 - неверный шаблон регулярного выражения: %2 - - - - %1 is an invalid flag for regular expressions. Valid flags are: - %1 - неверный флаг для регулярного выражения. Допустимые флаги: - - - - If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - Префикс не должен быть указан, если первый параметр - пустая последовательность или пустая строка (вне пространства имён). Был указан префикс %1. - - - - It will not be possible to retrieve %1. - Будет невозможно восстановить %1. - - - - The root node of the second argument to function %1 must be a document node. %2 is not a document node. - Корневой узел второго аргумента функции %1 должен быть документом. %2 не является документом. - - - - The default collection is undefined - Набор по умолчанию не определен - - - - %1 cannot be retrieved - %1 не может быть восстановлен - - - - The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - Форма нормализации %1 не поддерживается. Поддерживаются только %2, %3, %4, %5 и пустая, т.е. пустая строка (без нормализации). - - - - A zone offset must be in the range %1..%2 inclusive. %3 is out of range. - Региональное смещение должно быть в переделах от %1 до %2 включительно. %3 выходит за допустимые пределы. - - - - %1 is not a whole number of minutes. - %1 не является полным количеством минут. - - - - Required cardinality is %1; got cardinality %2. - Необходимое число элементов - %1, получено %2. - - - - The item %1 did not match the required type %2. - Элемент %1 не соответствует необходимому типу %2. - - - - - %1 is an unknown schema type. - %1 является схемой неизвестного типа. - - - - Only one %1 declaration can occur in the query prolog. - Только одно объявление %1 может присутствовать в прологе запроса. - - - - The initialization of variable %1 depends on itself - Инициализация переменной %1 зависит от себя самой - - - - No variable by name %1 exists - Переменная с именем %1 отсутствует - - - - The variable %1 is unused - Переменная %1 не используется - - - - Version %1 is not supported. The supported XQuery version is 1.0. - Версия %1 не поддерживается. Поддерживается XQuery версии 1.0. - - - - The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. - Кодировка %1 неверна. Имя кодировки должно содержать только символы латиницы без пробелов и должно удовлетворять регулярному выражению %2. - - - - No function with signature %1 is available - Функция с сигнатурой %1 отсутствует - - - - - A default namespace declaration must occur before function, variable, and option declarations. - Объявление пространство имён по умолчанию должно быть до объявления функций, переменных и опций. - - - - Namespace declarations must occur before function, variable, and option declarations. - Объявление пространства имён должно быть до объявления функций, переменных и опций. - - - - Module imports must occur before function, variable, and option declarations. - Импорт модулей должен быть до объявлений функций, переменных и опций. - - - - It is not possible to redeclare prefix %1. - Невозможно переопределить префикс %1. - - - - Prefix %1 is already declared in the prolog. - Префикс %1 уже объявлен в прологе. - - - - The name of an option must have a prefix. There is no default namespace for options. - Название опции должно содержать префикс. Нет пространства имён по умолчанию для опций. - - - - The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - Возможность импорта схем не поддерживается. Следовательно, объявлений %1 быть не должно. - - - - The target namespace of a %1 cannot be empty. - Целевое пространство имён %1 не может быть пустым. - - - - The module import feature is not supported - Возможность импорта модулей не поддерживается - - - - No value is available for the external variable by name %1. - Отсутствует значение для внешней переменной с именем %1. - - - - A construct was encountered which only is allowed in XQuery. - Указана конструкция, допустимая только в XQuery. - - - - A template by name %1 has already been declared. - Шаблон с именем %1 уже был объявлен. - - - - The keyword %1 cannot occur with any other mode name. - Ключевое слово %1 не может встречаться с любым другим названием режима. - - - - The value of attribute %1 must of type %2, which %3 isn't. - Значение атрибута %1 должно быть типа %2, но %3 ему не соответствует. - - - - The prefix %1 can not be bound. By default, it is already bound to the namespace %2. - Не удается связать префикс %1. По умолчанию префикс связан с пространством имён %2. - - - - A variable by name %1 has already been declared. - Переменная с именем %1 уже объявлена. - - - - A stylesheet function must have a prefixed name. - Функция стилей должна иметь имя с префиксом. - - - - The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - Пространство имён для пользовательских функций не может быть пустым (попробуйте предопределенный префикс %1, который существует для подобных ситуаций) - - - - The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. - Пространтсво имён %1 зарезервировано, поэтому пользовательские функции не могут его использовать. Попробуйте предопределенный префикс %2, который существует для подобных ситуаций. - - - - The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 - Пространство имён пользовательской функции в модуле библиотеки должен соответствовать пространству имён модуля. Другими словами, он должен быть %1 вместо %2 - - - - A function already exists with the signature %1. - Функция с сигнатурой %1 уже существует. - - - - No external functions are supported. All supported functions can be used directly, without first declaring them as external - Внешние функции не поддерживаются. Все поддерживаемые функции могут использоваться напрямую без первоначального объявления их внешними - - - - An argument by name %1 has already been declared. Every argument name must be unique. - Аргумент с именем %1 уже объявлен. Имя каждого аргумента должно быть уникальным. - - - - When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. - Если функция %1 используется для сравнения внутри шаблона, аргумент должен быть ссылкой на переменную или строковым литералом. - - - - In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. - В шаблоне XSL-T первый аргумент функции %1 должен быть строковым литералом, если функция используется для сравнения. - - - - In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. - В шаблоне XSL-T первый аргумент функции %1 должен быть литералом или ссылкой на переменную, если функция используется для сравнения. - - - - In an XSL-T pattern, function %1 cannot have a third argument. - В шаблоне XSL-T у функции %1 не должно быть третьего аргумента. - - - - In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. - В шаблоне XSL-T только функции %1 и %2 могут использоваться для сравнения, но не %3. - - - - In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. - В шаблоне XSL-T не может быть использована ось %1 - только оси %2 или %3. - - - - %1 is an invalid template mode name. - %1 является неверным шаблоном имени режима. - - - - The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. - Имя переменной, связанной с выражением for, должно отличаться от позиционной переменной. Две переменные с именем %1 конфликтуют. - - - - The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - Возможность проверки по схеме не поддерживается. Выражения %1 не могут использоваться. - - - - None of the pragma expressions are supported. Therefore, a fallback expression must be present - Ни одно из выражений pragma не поддерживается. Должно существовать запасное выражение - - - - Each name of a template parameter must be unique; %1 is duplicated. - Имя каждого параметра шаблона должно быть уникальным, но %1 повторяется. - - - - The %1-axis is unsupported in XQuery - Ось %1 не поддерживается в XQuery - - - - %1 is not a valid name for a processing-instruction. - %1 является неверным названием для инструкции обработки. - - - - %1 is not a valid numeric literal. - %1 является неверным числовым литералом. - - - - No function by name %1 is available. - Функция с именем %1 отсутствует. - - - - The namespace URI cannot be the empty string when binding to a prefix, %1. - URI пространства имён не может быть пустой строкой при связывании с префиксом %1. - - - - %1 is an invalid namespace URI. - %1 - неверный URI пространства имён. - - - - It is not possible to bind to the prefix %1 - Невозможно связать с префиксом %1 - - - - Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). - Пространство имён %1 может быть связано только с %2 (в данном случае уже предопределено). - - - - Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). - Префикс %1 может быть связан только с %2 (в данном случае уже предопределено). - - - - Two namespace declaration attributes have the same name: %1. - Два атрибута объявления пространств имён имеют одинаковое имя: %1. - - - - The namespace URI must be a constant and cannot use enclosed expressions. - URI пространства имён должно быть константой и не может содержать выражений. - - - - An attribute by name %1 has already appeared on this element. - Атрибут с именем %1 уже есть в этом элементе. - - - - A direct element constructor is not well-formed. %1 is ended with %2. - Прямой конструктор элемента составлен некорректно. %1 заканчивается %2. - - - - The name %1 does not refer to any schema type. - Название %1 не соответствует ни одному типу схемы. - - - - %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. - %1 - сложный тип. Преобразование к сложным типам невозможно. Однако, преобразование к атомарным типам как %2 работает. - - - - %1 is not an atomic type. Casting is only possible to atomic types. - %1 - не атомарный тип. Преобразование возможно только к атомарным типам. - - - - - %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - %1 является объявлением атрибута вне положенного места. Имейте в виду, возможность импорта схем не поддерживается. - - - - The name of an extension expression must be in a namespace. - Название выражения расширения должно быть в пространстве имён. - - - - empty - пусто - - - - zero or one - нуль или один - - - - exactly one - ровно один - - - - one or more - один или более - - - - zero or more - нуль или более - - - - Required type is %1, but %2 was found. - Требуется тип %1, но обнаружен %2. - - - - Promoting %1 to %2 may cause loss of precision. - Преобразование %1 к %2 может снизить точность. - - - - The focus is undefined. - Фокус не определен. - - - - It's not possible to add attributes after any other kind of node. - Невозможно добавлять атрибуты после любого другого вида узла. - - - - An attribute by name %1 has already been created. - Атрибут с именем %1 уже существует. - - - - Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - Только Unicode Codepoint Collation поддерживается (%1). %2 не поддерживается. - - - - Attribute %1 can't be serialized because it appears at the top level. - Атрибут %1 не может быть сериализован, так как присутствует на верхнем уровне. - - - - %1 is an unsupported encoding. - Кодировка %1 не поддерживается. - - - - %1 contains octets which are disallowed in the requested encoding %2. - %1 содержит октеты, которые недопустимы в требуемой кодировке %2. - - - - The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - Символ с кодом %1, присутствующий в %2 при использовании кодировки %3, не является допустимым символом XML. - - - - Ambiguous rule match. - Неоднозначное соответствие правилу. - - - - In a namespace constructor, the value for a namespace cannot be an empty string. - В конструкторе пространства имён значение пространства имён не может быть пустой строкой. - - - - The prefix must be a valid %1, which %2 is not. - Префикс должен быть корректным %1, но %2 им не является. - - - - The prefix %1 cannot be bound. - Префикс%1 не может быть связан. - - - - Only the prefix %1 can be bound to %2 and vice versa. - Только префикс %1 может быть связан с %2 и наоборот. - - - - Circularity detected - Обнаружена зацикленность - - - - The parameter %1 is required, but no corresponding %2 is supplied. - Необходим параметр %1 , но соответствующего %2 не передано. - - - - The parameter %1 is passed, but no corresponding %2 exists. - Передан параметр %1 , но соответствующего %2 не существует. - - - - The URI cannot have a fragment - URI не может содержать фрагмент - - - - Element %1 is not allowed at this location. - Элемент %1 недопустим в этом месте. - - - - Text nodes are not allowed at this location. - Текстовые узлы недопустимы в этом месте. - - - - Parse error: %1 - Ошибка разбора: %1 - - - - The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - Значение атрибута версии XSL-T должно быть типа %1, но %2 им не является. - - - - Running an XSL-T 1.0 stylesheet with a 2.0 processor. - Выполняется таблица стилей XSL-T 1.0 с обработчиком версии 2.0. - - - - Unknown XSL-T attribute %1. - Неизвествный атрибут XSL-T %1. - - - - Attribute %1 and %2 are mutually exclusive. - Атрибуты %1 и %2 взаимоисключающие. - - - - In a simplified stylesheet module, attribute %1 must be present. - В модуле упрощённой таблицы стилей атрибут %1 обязан присутствовать. - - - - If element %1 has no attribute %2, it cannot have attribute %3 or %4. - Если элемент %1 не имеет атрибут %2, у него не может быть атрибутов %3 и %4. - - - - Element %1 must have at least one of the attributes %2 or %3. - Элемент %1 должен иметь как минимум один из атрибутов %2 или %3. - - - - At least one mode must be specified in the %1-attribute on element %2. - Как минимум один режим должен быть указан в атрибуте %1 элемента %2. - - - - Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. - Атрибут %1 недопустим в элементе %2. Допустимы только стандартные атрибуты. - - - - Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. - Атрибут %1 недопустим в элементе %2. Допустимы только %3 и стандартные атрибуты. - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. - Атрибут %1 недопустим в элементе %2. Допустимы только %3, %4 и стандартные атрибуты. - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. - Атрибут %1 недопустим в элементе %2. Допустимы только %3 и стандартные атрибуты. - - - - XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. - Атрибуты XSL-T элементов XSL-T должны быть вне пространства имён, а не в простанстве имеё XSL-T, которым является %1. - - - - The attribute %1 must appear on element %2. - Элемента %2 должен иметь атрибут %1. - - - - The element with local name %1 does not exist in XSL-T. - Элемент с локальным именем %1 отсутствует в XSL-T. - - - - Element %1 must come last. - Элемент %1 должен идти последним. - - - - At least one %1-element must occur before %2. - Как минимум один элемент %1 должен быть перед %2. - - - - Only one %1-element can appear. - Должен быть только один элемент %1. - - - - At least one %1-element must occur inside %2. - Как минимум один элемент %1 должен быть внутри %2. - - - - When attribute %1 is present on %2, a sequence constructor cannot be used. - Если %2 содержит атрибут %1, конструктор последовательности не может быть использован. - - - - Element %1 must have either a %2-attribute or a sequence constructor. - Элемент %1 должен иметь атрибут %2 или конструктор последовательности. - - - - When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. - Если параметр необходим, значение по умолчание не может быть передано через атрибут %1 или конструктор последовательности. - - - - Element %1 cannot have children. - У элемента %1 не может быть потомков. - - - - Element %1 cannot have a sequence constructor. - У элемента %1 не может быть конструктора последовательности. - - - - - The attribute %1 cannot appear on %2, when it is a child of %3. - У %2 не может быть атрибута %1, когда он является потомком %3. - - - - A parameter in a function cannot be declared to be a tunnel. - Параметр в функции не может быть объявлен туннелем. - - - - This processor is not Schema-aware and therefore %1 cannot be used. - Данный обработчик не работает со схемами, следовательно, %1 не может использоваться. - - - - Top level stylesheet elements must be in a non-null namespace, which %1 isn't. - Элементы верхнего уровня таблицы стилей должны быть в пространстве имен, которым %1 не является. - - - - The value for attribute %1 on element %2 must either be %3 or %4, not %5. - Значение атрибута %1 элемента %2 должно быть или %3, или %4, но не %5. - - - - Attribute %1 cannot have the value %2. - Атрибут %1 не может принимать значение %2. - - - - The attribute %1 can only appear on the first %2 element. - Атрибут %1 может быть только у первого элемента %2. - - - - At least one %1 element must appear as child of %2. - Как минимум один элемент %1 должен быть в %2. - - - - VolumeSlider - - - Muted - Без звука - - - - - Volume: %1% - Громкость: %1% - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/common/ui/CertificateWidget.ui qesteidutil-0.3.1/=unpacked-tar1=/common/ui/CertificateWidget.ui --- qesteidutil-0.3.1/=unpacked-tar1=/common/ui/CertificateWidget.ui 2009-10-22 08:37:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/common/ui/CertificateWidget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ - - - CertificateDialog - - - - 0 - 0 - 400 - 453 - - - - Certificate - - - #parameterContent { font-family: "Liberation Mono, Courier New"; } - - - - - - 0 - - - - General - - - - - - true - - - - - - - - Details - - - - - - false - - - - Field - - - - - Value - - - - - - - - true - - - - - - - QDialogButtonBox::Save - - - - - - - - Certification Path - - - - - - Certification Path - - - - - - false - - - - 1 - - - - - - - - - - - Certificate status: - - - - - - - - - - - - - - QDialogButtonBox::Ok - - - - - - - - - buttonBox - clicked(QAbstractButton*) - CertificateDialog - reject() - - - 199 - 437 - - - 199 - 226 - - - - - saveBox - clicked(QAbstractButton*) - CertificateDialog - save() - - - 199 - 396 - - - 199 - 226 - - - - - - save() - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/COPYING qesteidutil-0.3.1/=unpacked-tar1=/COPYING --- qesteidutil-0.3.1/=unpacked-tar1=/COPYING 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/COPYING 1970-01-01 00:00:00.000000000 +0000 @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/mac/Info.plist.cmake qesteidutil-0.3.1/=unpacked-tar1=/mac/Info.plist.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/mac/Info.plist.cmake 2009-06-18 08:12:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/mac/Info.plist.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - qesteidutil - CFBundleIconFile - Icon.icns - CFBundleIdentifier - org.esteid.qesteidutil - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - qesteidutil - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.0.@PROJECT_WC_REVISION@ - CFBundleSignature - ???? - CFBundleVersion - @PROJECT_WC_REVISION@ - LSHasLocalizedDisplayName - - - \ No newline at end of file Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/en.lproj/InfoPlist.strings and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/en.lproj/InfoPlist.strings differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/et.lproj/InfoPlist.strings and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/et.lproj/InfoPlist.strings differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/Icon.icns and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/Icon.icns differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/ru.lproj/InfoPlist.strings qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/ru.lproj/InfoPlist.strings --- qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/ru.lproj/InfoPlist.strings 2009-10-28 11:36:04.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/mac/Resources/ru.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -/* Localized versions of Info.plist keys */ - -CFBundleDisplayName = "Oбсуживание ID-карты"; -CFBundleGetInfoString = "v1.0, Copyright 2009 __COMPANY_NAME__."; -NSHumanReadableCopyright = "Copyright (c) 2009, __COMPANY_NAME__."; \ No newline at end of file diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/NEWS qesteidutil-0.3.1/=unpacked-tar1=/NEWS --- qesteidutil-0.3.1/=unpacked-tar1=/NEWS 2011-10-12 18:28:50.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/NEWS 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -qesteidutil 0.3.1 (2011-10-12) -============================== -- New man page (Mihkel Vain) -- Window decorations fix with IceWM/LXDE (alvar@raamat.polva.ee) -- Use system copy of qtsingleapplication if possible (Kalev Lember) -- Fixed build with smartcardpp 0.3.0 (Kalev Lember) -- Fixed blank window with recent webkit versions (Kalev Lember) -- Fixed unreadable Russian text in email settings (Sander Lepik) -- Translation updates (Erkko Kebbinau) - -Bugs fixed with this release: - #79 - "Wrong text in russian language - #160 - "Misspelling of occurred in qesteidutil" - #169 - "Starts with blank non functional window on Ubuntu Oneiric (and Debian - Unstable)" - -qesteidutil 0.3.0 (2010-09-29) -============================== - -- Initial release - -Many thanks to all the contributors: Antti Andreimann, Aram Sahradyan, -Asse Sauga, Edgar Kivisild, Hasso Tepper, Janek Priimann, Jargo Kõster, -Kalev Lember, Raul Metsma, Sander Lepik, Toomas Tamme. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.1 qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.1 --- qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.1 2011-07-06 16:35:38.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -.TH qesteidutil "1" "July 2011" -.SH NAME -qesteidutil \- an application for managing Estonian ID Card -.SH SYNOPSIS -.TP -\fPqesteidutil\fP -.SH DESCRIPTION -QEsteidUtil is an application for managing Estonian ID Card. In an -user-friendly interface it is possible to change and unlock PINs, -examine detailed information about personal data file on the card, -extract and view certificates, set up mobile ID, and configure -@eesti.ee email. - -.PP -For more information about the qesteidutil and for full documentation, -visit https://code.google.com/p/esteid/wiki/QEsteidUtilHelp - -.SH AUTHORS -.B qesteidutil -was written by Jargo Kõster , Raul Metsma - and Kalev Lember - -.SH "SEE ALSO" -.BR qdigidocclient (1), -.BR qdigidoccrypto (1), -.BR cdigidoc (1), \ No newline at end of file diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.desktop qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.desktop --- qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.desktop 2009-11-03 16:26:44.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qesteidutil.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=ID-card Utility -Name[et]=ID-kaardi haldusvahend -Name[ru]=Oбсуживание ID-карты -Exec=qesteidutil %F -Icon=qesteidutil -Terminal=false -Categories=Qt;Utility; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/buildlib/buildlib.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/buildlib/buildlib.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/buildlib/buildlib.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/buildlib/buildlib.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -TEMPLATE=lib -CONFIG += qt dll qtsingleapplication-buildlib -mac:CONFIG += absolute_library_soname -win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all -include(../src/qtsingleapplication.pri) -TARGET = $$QTSINGLEAPPLICATION_LIBNAME -DESTDIR = $$QTSINGLEAPPLICATION_LIBDIR -win32 { - DLLDESTDIR = $$[QT_INSTALL_BINS] - QMAKE_DISTCLEAN += $$[QT_INSTALL_BINS]\\$${QTSINGLEAPPLICATION_LIBNAME}.dll -} -target.path = $$DESTDIR -INSTALLS += target diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/CMakeLists.txt qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/CMakeLists.txt --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/CMakeLists.txt 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -set( MOC_HEADERS - src/qtlocalpeer.h - src/qtsingleapplication.h - ) -set( HEADERS - ${MOC_HEADERS} - ) -QT4_WRAP_CPP( MOC_SOURCES ${MOC_HEADERS} ) -set( SOURCES - ${HEADERS} - ${MOC_SOURCES} - src/qtlocalpeer.cpp - src/qtsingleapplication.cpp - ) - -ADD_LIBRARY( qtsingleapplication STATIC ${SOURCES} ) diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/common.pri qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/common.pri --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/common.pri 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/common.pri 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -infile(config.pri, SOLUTIONS_LIBRARY, yes): CONFIG += qtsingleapplication-uselib -TEMPLATE += fakelib -QTSINGLEAPPLICATION_LIBNAME = $$qtLibraryTarget(QtSolutions_SingleApplication-2.6) -TEMPLATE -= fakelib -QTSINGLEAPPLICATION_LIBDIR = $$PWD/lib -unix:qtsingleapplication-uselib:!qtsingleapplication-buildlib:QMAKE_RPATHDIR += $$QTSINGLEAPPLICATION_LIBDIR diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/configure qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/configure --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/configure 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -#!/bin/sh - -if [ "x$1" != "x" -a "x$1" != "x-library" ]; then - echo "Usage: $0 [-library]" - echo - echo "-library: Build the component as a dynamic library (DLL). Default is to" - echo " include the component source code directly in the application." - echo " A DLL may be preferable for technical or licensing (LGPL) reasons." - echo - exit 0 -fi - - -# only ask to accept the license text once -if [ ! -f .licenseAccepted ]; then -# determine if opensource or commercial package - if [ -f LICENSE.LGPL ]; then - # opensource edition - while true; do - echo - echo "You are licensed to use this software under the terms of" - echo "the GNU General Public License (GPL) version 3, or" - echo "the GNU Lesser General Public License (LGPL) version 2.1" - echo "with certain additional extra rights as specified in the" - echo "Nokia Qt LGPL Exception version 1.0." - echo - echo "Type 'G' to view the GNU General Public License (GPL) version 3." - echo "Type 'L' to view the GNU Lesser General Public License (LGPL) version 2.1." - echo "Type 'E' to view the Nokia Qt LGPL Exception version 1.0." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - echo "Do you accept the terms of this license? " - read answer - echo - - if [ "x$answer" = "xno" ]; then - echo "You are not licensed to use this software." - echo - exit 1 - elif [ "x$answer" = "xyes" ]; then - echo license accepted > .licenseAccepted - break - elif [ "x$answer" = "xe" -o "x$answer" = "xE" ]; then - more LGPL_EXCEPTION.txt - elif [ "x$answer" = "xl" -o "x$answer" = "xL" ]; then - more LICENSE.LGPL - elif [ "x$answer" = "xg" -o "x$answer" = "xG" ]; then - more LICENSE.GPL3 - fi - done - else - while true; do - echo - echo "Please choose your region." - echo - echo "Type 1 for North or South America." - echo "Type 2 for anywhere outside North and South America." - echo - echo "Select: " - read region - if [ "x$region" = "x1" ]; then - licenseFile=LICENSE.US - break; - elif [ "x$region" = "x2" ]; then - licenseFile=LICENSE.NO - break; - fi - done - while true; do - echo - echo "License Agreement" - echo - echo "Type '?' to view the Qt Solutions Commercial License." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - echo "Do you accept the terms of this license? " - read answer - echo - - if [ "x$answer" = "xno" ]; then - echo "You are not licensed to use this software." - echo - exit 1 - elif [ "x$answer" = "xyes" ]; then - echo license accepted > .licenseAccepted - cp "$licenseFile" LICENSE - rm LICENSE.US - rm LICENSE.NO - break - elif [ "x$answer" = "x?" ]; then - more "$licenseFile" - fi - done - fi -fi - -rm -f config.pri -if [ "x$1" = "x-library" ]; then - echo "Configuring to build this component as a dynamic library." - echo "SOLUTIONS_LIBRARY = yes" > config.pri -fi - -echo -echo "This component is now configured." -echo -echo "To build the component library (if requested) and example(s)," -echo "run qmake and your make command." -echo -echo "To remove or reconfigure, run make distclean." -echo diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/classic.css qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/classic.css --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/classic.css 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/classic.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -h3.fn,span.fn -{ - margin-left: 1cm; - text-indent: -1cm; -} - -a:link -{ - color: #004faf; - text-decoration: none -} - -a:visited -{ - color: #672967; - text-decoration: none -} - -a.obsolete -{ - color: #661100; - text-decoration: none -} - -a.compat -{ - color: #661100; - text-decoration: none -} - -a.obsolete:visited -{ - color: #995500; - text-decoration: none -} - -a.compat:visited -{ - color: #995500; - text-decoration: none -} - -td.postheader -{ - font-family: sans-serif -} - -tr.address -{ - font-family: sans-serif -} - -body -{ - background: #ffffff; - color: black -} - -table tr.odd { - background: #f0f0f0; - color: black; -} - -table tr.even { - background: #e4e4e4; - color: black; -} - -table.annotated th { - padding: 3px; - text-align: left -} - -table.annotated td { - padding: 3px; -} - -table tr pre -{ - padding-top: none; - padding-bottom: none; - padding-left: none; - padding-right: none; - border: none; - background: none -} - -tr.qt-style -{ - background: #a2c511; - color: black -} - -body pre -{ - padding: 0.2em; - border: #e7e7e7 1px solid; - background: #f1f1f1; - color: black -} - -span.preprocessor, span.preprocessor a -{ - color: darkblue; -} - -span.comment -{ - color: darkred; - font-style: italic -} - -span.string,span.char -{ - color: darkgreen; -} - -.title -{ - text-align: center -} - -.subtitle -{ - font-size: 0.8em -} - -.small-subtitle -{ - font-size: 0.65em -} Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/images/qt-logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/images/qt-logo.png differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/index.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/index.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/index.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - Single Application - - - - - - - -
  Home

Single Application
-

- -

Description

-

The QtSingleApplication component provides support for applications that can be only started once per user.

-

For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance.

-

The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui.

- -

Classes

- - -

Examples

- - -

Tested platforms

-
    -
  • Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005
  • -
  • Qt 4.4, 4.5 / Linux / gcc
  • -
  • Qt 4.4, 4.5 / MacOS X 10.5 / gcc
  • -
-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ - - - - - - QtLockedFile Class Reference - - - - - - - -
  Home

QtLockedFile Class Reference

-

The QtLockedFile class extends QFile with advisory locking functions. More...

-
 #include <QtLockedFile>

Inherits QFile.

- - -

Public Types

-
    -
  • enum LockMode { ReadLock, WriteLock, NoLock }
  • -
- -

Public Functions

- -
    -
  • 23 public functions inherited from QFile
  • -
  • 32 public functions inherited from QIODevice
  • -
  • 29 public functions inherited from QObject
  • -
-

Additional Inherited Members

-
    -
  • 1 property inherited from QObject
  • -
  • 1 public slot inherited from QObject
  • -
  • 4 signals inherited from QIODevice
  • -
  • 1 signal inherited from QObject
  • -
  • 1 public type inherited from QObject
  • -
  • 14 static public members inherited from QFile
  • -
  • 4 static public members inherited from QObject
  • -
  • 5 protected functions inherited from QIODevice
  • -
  • 7 protected functions inherited from QObject
  • -
  • 2 protected variables inherited from QObject
  • -
- -
-

Detailed Description

-

The QtLockedFile class extends QFile with advisory locking functions.

-

A file may be locked in read or write mode. Multiple instances of QtLockedFile, created in multiple processes running on the same machine, may have a file locked in read mode. Exactly one instance may have it locked in write mode. A read and a write lock cannot exist simultaneously on the same file.

-

The file locks are advisory. This means that nothing prevents another process from manipulating a locked file using QFile or file system functions offered by the OS. Serialization is only guaranteed if all processes that access the file use QLockedFile. Also, while holding a lock on a file, a process must not open the same file again (through any API), or locks can be unexpectedly lost.

-

The lock provided by an instance of QtLockedFile is released whenever the program terminates. This is true even when the program crashes and no destructors are called.

-
-

Member Type Documentation

-

enum QtLockedFile::LockMode

-

This enum describes the available lock modes.

-

- - - - -
ConstantValueDescription
QtLockedFile::ReadLock1A read lock.
QtLockedFile::WriteLock2A write lock.
QtLockedFile::NoLock0Neither a read lock nor a write lock.

-
-

Member Function Documentation

-

QtLockedFile::QtLockedFile ()

-

Constructs an unlocked QtLockedFile object. This constructor behaves in the same way as QFile::QFile().

-

See also QFile::QFile().

-

QtLockedFile::QtLockedFile ( const QString & name )

-

Constructs an unlocked QtLockedFile object with file name. This constructor behaves in the same way as QFile::QFile(const QString&).

-

See also QFile::QFile().

-

QtLockedFile::~QtLockedFile ()

-

Destroys the QtLockedFile object. If any locks were held, they are released.

-

bool QtLockedFile::isLocked () const

-

Returns true if this object has a in read or write lock; otherwise returns false.

-

See also lockMode().

-

bool QtLockedFile::lock ( LockMode mode, bool block = true )

-

Obtains a lock of type mode. The file must be opened before it can be locked.

-

If block is true, this function will block until the lock is aquired. If block is false, this function returns false immediately if the lock cannot be aquired.

-

If this object already has a lock of type mode, this function returns true immediately. If this object has a lock of a different type than mode, the lock is first released and then a new lock is obtained.

-

This function returns true if, after it executes, the file is locked by this object, and false otherwise.

-

See also unlock(), isLocked(), and lockMode().

-

LockMode QtLockedFile::lockMode () const

-

Returns the type of lock currently held by this object, or QtLockedFile::NoLock.

-

See also isLocked().

-

bool QtLockedFile::open ( OpenMode mode )

-

Opens the file in OpenMode mode.

-

This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock.

-

Returns true if successful; otherwise false.

-

See also QFile::open() and QFile::resize().

-

bool QtLockedFile::unlock ()

-

Releases a lock.

-

If the object has no lock, this function returns immediately.

-

This function returns true if, after it executes, the file is not locked by this object, and false otherwise.

-

See also lock(), isLocked(), and lockMode().

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile-members.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile-members.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile-members.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtlockedfile-members.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ - - - - - - List of All Members for QtLockedFile - - - - - - - -
  Home

List of All Members for QtLockedFile

-

This is the complete list of members for QtLockedFile, including inherited members.

-

- -
-

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.dcf qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.dcf --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.dcf 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.dcf 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - -
-
- QtLockedFile - LockMode - QtLockedFile::WriteLock - QtLockedFile::NoLock - QtLockedFile::ReadLock - isLocked - lock - lockMode - open - unlock -
-
-
- QtSingleApplication - activateWindow - activationWindow - id - isRunning - messageReceived - sendMessage - setActivationWindow -
-
-
-
- QtSingleCoreApplication - id - isRunning - messageReceived - sendMessage -
-
-
-
-
- A non-GUI example -
-
- A Trivial Example -
-
- Loading Documents -
-
- Single Application -
-
-
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,184 +0,0 @@ - - - - - - Loading Documents - - - - - - - -
  Home

Loading Documents
-

-

The application in this example loads or prints the documents passed as commandline parameters to further instances of this application.

-
 /****************************************************************************
- **
- ** This file is part of a Qt Solutions component.
- **
- ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Qt Software Information (qt-info@nokia.com)
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Solutions Commercial License Agreement provided
- ** with the Software or, alternatively, in accordance with the terms
- ** contained in a written agreement between you and Nokia.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain
- ** additional rights. These rights are described in the Nokia Qt LGPL
- ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
- ** package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- ** Please note Third Party Software included with Qt Solutions may impose
- ** additional restrictions and it is the user's responsibility to ensure
- ** that they have met the licensing requirements of the GPL, LGPL, or Qt
- ** Solutions Commercial license and the relevant license of the Third
- ** Party Software they are using.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales@nokia.com.
- **
- ****************************************************************************/
-
- #include <qtsingleapplication.h>
- #include <QtCore/QFile>
- #include <QtGui/QMainWindow>
- #include <QtGui/QPrinter>
- #include <QtGui/QPainter>
- #include <QtGui/QTextEdit>
- #include <QtGui/QMdiArea>
- #include <QtCore/QTextStream>
-
- class MainWindow : public QMainWindow
- {
-     Q_OBJECT
- public:
-     MainWindow();
-
- public slots:
-     void handleMessage(const QString& message);
-
- signals:
-     void needToShow();
-
- private:
-     QMdiArea *workspace;
- };
-

The user interface in this application is a QMainWindow subclass with a QMdiArea as the central widget. It implements a slot handleMessage() that will be connected to the messageReceived() signal of the QtSingleApplication class.

-
 MainWindow::MainWindow()
- {
-     workspace = new QMdiArea(this);
-
-     setCentralWidget(workspace);
- }
-

The MainWindow constructor creates a minimal user interface.

-
 void MainWindow::handleMessage(const QString& message)
- {
-     enum Action {
-         Nothing,
-         Open,
-         Print
-     } action;
-
-     action = Nothing;
-     QString filename = message;
-     if (message.toLower().startsWith("/print ")) {
-         filename = filename.mid(7);
-         action = Print;
-     } else if (!message.isEmpty()) {
-         action = Open;
-     }
-     if (action == Nothing) {
-         emit needToShow();
-         return;
-     }
-
-     QFile file(filename);
-     QString contents;
-     if (file.open(QIODevice::ReadOnly))
-         contents = file.readAll();
-     else
-         contents = "[[Error: Could not load file " + filename + "]]";
-
-     QTextEdit *view = new QTextEdit;
-     view->setPlainText(contents);
-
-     switch(action) {
-

The handleMessage() slot interprets the message passed in as a filename that can be prepended with /print to indicate that the file should just be printed rather than loaded.

-
     case Print:
-         {
-             QPrinter printer;
-             view->print(&printer);
-             delete view;
-         }
-         break;
-
-     case Open:
-         {
-             workspace->addSubWindow(view);
-             view->setWindowTitle(message);
-             view->show();
-             emit needToShow();
-         }
-         break;
-     default:
-         break;
-     };
- }
-

Loading the file will also activate the window.

-
 #include "main.moc"
-
- int main(int argc, char **argv)
- {
-     QtSingleApplication instance("File loader QtSingleApplication example", argc, argv);
-     QString message;
-     for (int a = 1; a < argc; ++a) {
-         message += argv[a];
-         if (a < argc-1)
-             message += " ";
-     }
-
-     if (instance.sendMessage(message))
-         return 0;
-

The main entry point function creates a QtSingleApplication object, and creates a message to send to a running instance of the application. If the message was sent successfully the process exits immediately.

-
     MainWindow mw;
-     mw.handleMessage(message);
-     mw.show();
-
-     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
-                      &mw, SLOT(handleMessage(const QString&)));
-
-     instance.setActivationWindow(&mw, false);
-     QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow()));
-
-     return instance.exec();
- }
-

If the message could not be sent the application starts up. Note that false is passed to the call to setActivationWindow() to prevent automatic activation for every message received, e.g. when the application should just print a file. Instead, the message handling function determines whether activation is requested, and signals that by emitting the needToShow() signal. This is then simply connected directly to QtSingleApplication's activateWindow() slot.

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ - - - - - - A Trivial Example - - - - - - - -
  Home

A Trivial Example
-

-

The application in this example has a log-view that displays messages sent by further instances of the same application.

-

The example demonstrates the use of the QtSingleApplication class to detect and communicate with a running instance of the application using the sendMessage() API. The messageReceived() signal is used to display received messages in a QTextEdit log.

-
 /****************************************************************************
- **
- ** This file is part of a Qt Solutions component.
- **
- ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Qt Software Information (qt-info@nokia.com)
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Solutions Commercial License Agreement provided
- ** with the Software or, alternatively, in accordance with the terms
- ** contained in a written agreement between you and Nokia.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain
- ** additional rights. These rights are described in the Nokia Qt LGPL
- ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
- ** package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- ** Please note Third Party Software included with Qt Solutions may impose
- ** additional restrictions and it is the user's responsibility to ensure
- ** that they have met the licensing requirements of the GPL, LGPL, or Qt
- ** Solutions Commercial license and the relevant license of the Third
- ** Party Software they are using.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales@nokia.com.
- **
- ****************************************************************************/
-
- #include <qtsingleapplication.h>
- #include <QtGui/QTextEdit>
-
- class TextEdit : public QTextEdit
- {
-     Q_OBJECT
- public:
-     TextEdit(QWidget *parent = 0)
-         : QTextEdit(parent)
-     {}
- public slots:
-     void append(const QString &str)
-     {
-         QTextEdit::append(str);
-     }
- };
-
- #include "main.moc"
-
- int main(int argc, char **argv)
- {
-     QtSingleApplication instance(argc, argv);
-

The example has only the main entry point function. A QtSingleApplication object is created immediately.

-
     if (instance.sendMessage("Wake up!"))
-         return 0;
-

If another instance of this application is already running, sendMessage() will succeed, and this instance just exits immediately.

-
     TextEdit logview;
-     logview.setReadOnly(true);
-     logview.show();
-

Otherwise the instance continues as normal and creates the user interface.

-
     instance.setActivationWindow(&logview);
-
-     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
-                      &logview, SLOT(append(const QString&)));
-
-     return instance.exec();
-

The logview object is also set as the application's activation window. Every time a message is received, the window will be raised and activated automatically.

-

The messageReceived() signal is also connected to the QTextEdit's append() slot. Every message received from further instances of this application will be displayed in the log.

-

Finally the event loop is entered.

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ - - - - - - QtSingleApplication Class Reference - - - - - - - -
  Home

QtSingleApplication Class Reference

-

The QtSingleApplication class provides an API to detect and communicate with running instances of an application. More...

-
 #include <QtSingleApplication>

Inherits QApplication.

- - -

Public Functions

- - - -

Public Slots

- - - -

Signals

- - -

Additional Inherited Members

- - -
-

Detailed Description

-

The QtSingleApplication class provides an API to detect and communicate with running instances of an application.

-

This class allows you to create applications where only one instance should be running at a time. I.e., if the user tries to launch another instance, the already running instance will be activated instead. Another usecase is a client-server system, where the first started instance will assume the role of server, and the later instances will act as clients of that server.

-

By default, the full path of the executable file is used to determine whether two processes are instances of the same application. You can also provide an explicit identifier string that will be compared instead.

-

The application should create the QtSingleApplication object early in the startup phase, and call isRunning() or sendMessage() to find out if another instance of this application is already running. Startup parameters (e.g. the name of the file the user wanted this new instance to open) can be passed to the running instance in the sendMessage() function.

-

If isRunning() or sendMessage() returns false, it means that no other instance is running, and this instance has assumed the role as the running instance. The application should continue with the initialization of the application user interface before entering the event loop with exec(), as normal. The messageReceived() signal will be emitted when the application receives messages from another instance of the same application.

-

If isRunning() or sendMessage() returns true, another instance is already running, and the application should terminate or enter client mode.

-

If a message is received it might be helpful to the user to raise the application so that it becomes visible. To facilitate this, QtSingleApplication provides the setActivationWindow() function and the activateWindow() slot.

-

Here's an example that shows how to convert an existing application to use QtSingleApplication. It is very simple and does not make use of all QtSingleApplication's functionality (see the examples for that).

-
 // Original
- int main(int argc, char **argv)
- {
-     QApplication app(argc, argv);
-
-     MyMainWidget mmw;
-
-     mmw.show();
-     return app.exec();
- }
-
- // Single instance
- int main(int argc, char **argv)
- {
-     QtSingleApplication app(argc, argv);
-
-     if (app.isRunning())
-         return 0;
-
-     MyMainWidget mmw;
-
-     app.setActivationWindow(&mmw);
-
-     mmw.show();
-     return app.exec();
- }
-

Once this QtSingleApplication instance is destroyed(for example, when the user quits), when the user next attempts to run the application this instance will not, of course, be encountered. The next instance to call isRunning() or sendMessage() will assume the role as the new running instance.

-

For console (non-GUI) applications, QtSingleCoreApplication may be used instead of this class, to avoid the dependency on the QtGui library.

-

See also QtSingleCoreApplication.

-
-

Member Function Documentation

-

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, bool GUIenabled = true )

-

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and GUIenabled are passed on to the QAppliation constructor.

-

If you are creating a console application (i.e. setting GUIenabled to false), you may consider using QtSingleCoreApplication instead.

-

QtSingleApplication::QtSingleApplication ( const QString & appId, int & argc, char ** argv )

-

Creates a QtSingleApplication object with the application identifier appId. argc and argv are passed on to the QAppliation constructor.

-

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, Type type )

-

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and type are passed on to the QAppliation constructor.

-

QtSingleApplication::QtSingleApplication ( Display * dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

-

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, visual, and cmap are passed on to the QApplication constructor.

-

QtSingleApplication::QtSingleApplication ( Display * dpy, int & argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

-

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

-

QtSingleApplication::QtSingleApplication ( Display * dpy, const QString & appId, int argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

-

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be appId. dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

-

void QtSingleApplication::activateWindow ()   [slot]

-

De-minimizes, raises, and activates this application's activation window. This function does nothing if no activation window has been set.

-

This is a convenience function to show the user that this application instance has been activated when he has tried to start another instance.

-

This function should typically be called in response to the messageReceived() signal. By default, that will happen automatically, if an activation window has been set.

-

See also setActivationWindow(), messageReceived(), and initialize().

-

QWidget * QtSingleApplication::activationWindow () const

-

Returns the applications activation window if one has been set by calling setActivationWindow(), otherwise returns 0.

-

See also setActivationWindow().

-

QString QtSingleApplication::id () const

-

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

-

bool QtSingleApplication::isRunning ()

-

Returns true if another instance of this application is running; otherwise false.

-

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

-

See also sendMessage().

-

void QtSingleApplication::messageReceived ( const QString & message )   [signal]

-

This signal is emitted when the current instance receives a message from another instance of this application.

-

See also sendMessage(), setActivationWindow(), and activateWindow().

-

bool QtSingleApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

-

Tries to send the text message to the currently running instance. The QtSingleApplication object in the running instance will emit the messageReceived() signal when it receives the message.

-

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

-

See also isRunning() and messageReceived().

-

void QtSingleApplication::setActivationWindow ( QWidget * aw, bool activateOnMessage = true )

-

Sets the activation window of this application to aw. The activation window is the widget that will be activated by activateWindow(). This is typically the application's main window.

-

If activateOnMessage is true (the default), the window will be activated automatically every time a message is received, just prior to the messageReceived() signal being emitted.

-

See also activationWindow(), activateWindow(), and messageReceived().

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.index qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.index --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.index 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.index 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-members.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-members.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-members.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-members.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +0,0 @@ - - - - - - List of All Members for QtSingleApplication - - - - - - - -
  Home

List of All Members for QtSingleApplication

-

This is the complete list of members for QtSingleApplication, including inherited members.

-

- -
-

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ - - - - - - Obsolete Members for QtSingleApplication - - - - - - - -
  Home

Obsolete Members for QtSingleApplication

-

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

-

-

Public Functions

-
    -
  • void initialize ( bool dummy = true )   (obsolete)
  • -
-
-

Member Function Documentation

-

void QtSingleApplication::initialize ( bool dummy = true )

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qch and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qch differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qhp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qhp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qhp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsingleapplication.qhp 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ - - - com.trolltech.qtsolutions.qtsingleapplication_2.6 - qdoc - - qt - solutions - qtsingleapplication - - - qt - solutions - qtsingleapplication - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - qtlockedfile.html - qtsingleapplication.html - index.html - qtsingleapplication-example-trivial.html - qtsinglecoreapplication.html - qtsingleapplication-example-loader.html - qtsinglecoreapplication-example-console.html - classic.css - images/qt-logo.png - -
-
diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-example-console.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ - - - - - - A non-GUI example - - - - - - - -
  Home

A non-GUI example
-

-

This example shows how to use the single-application functionality in a console application. It does not require the QtGui library at all.

-

The only differences from the GUI application usage demonstrated in the other examples are:

-

1) The .pro file should include qtsinglecoreapplication.pri instead of qtsingleapplication.pri

-

2) The class name is QtSingleCoreApplication instead of QtSingleApplication.

-

3) No calls are made regarding window activation, for obvious reasons.

-

console.pro:

-
 TEMPLATE   = app
- CONFIG    += console
- SOURCES   += main.cpp
- include(../../src/qtsinglecoreapplication.pri)
- QT -= gui
-

main.cpp:

-
 /****************************************************************************
- **
- ** This file is part of a Qt Solutions component.
- **
- ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Qt Software Information (qt-info@nokia.com)
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Solutions Commercial License Agreement provided
- ** with the Software or, alternatively, in accordance with the terms
- ** contained in a written agreement between you and Nokia.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain
- ** additional rights. These rights are described in the Nokia Qt LGPL
- ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
- ** package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- ** Please note Third Party Software included with Qt Solutions may impose
- ** additional restrictions and it is the user's responsibility to ensure
- ** that they have met the licensing requirements of the GPL, LGPL, or Qt
- ** Solutions Commercial license and the relevant license of the Third
- ** Party Software they are using.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales@nokia.com.
- **
- ****************************************************************************/
-
- #include "qtsinglecoreapplication.h"
- #include <QtCore/QDebug>
-
- void report(const QString& msg)
- {
-     qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg));
- }
-
- class MainClass : public QObject
- {
-     Q_OBJECT
- public:
-     MainClass()
-         : QObject()
-         {}
-
- public slots:
-     void handleMessage(const QString& message)
-         {
-             report( "Message received: \"" + message + "\"");
-         }
- };
-
- int main(int argc, char **argv)
- {
-     report("Starting up");
-
-     QtSingleCoreApplication app(argc, argv);
-
-     if (app.isRunning()) {
-         QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid()));
-         bool sentok = app.sendMessage(msg);
-         QString rep("Another instance is running, so I will exit.");
-         rep += sentok ? " Message sent ok." : " Message sending failed.";
-         report(rep);
-         return 0;
-     } else {
-         report("No other instance is running; so I will.");
-         MainClass mainObj;
-         QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
-                          &mainObj, SLOT(handleMessage(const QString&)));
-         return app.exec();
-     }
- }
-
- #include "main.moc"
-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ - - - - - - QtSingleCoreApplication Class Reference - - - - - - - -
  Home

QtSingleCoreApplication Class Reference

-

A variant of the QtSingleApplication class for non-GUI applications. More...

-
 #include <QtSingleCoreApplication>

Inherits QCoreApplication.

- - -

Public Functions

- - - -

Public Slots

-
    -
  • bool sendMessage ( const QString & message, int timeout = 5000 )
  • -
- - -

Signals

- - -

Additional Inherited Members

- - -
-

Detailed Description

-

A variant of the QtSingleApplication class for non-GUI applications.

-

This class is a variant of QtSingleApplication suited for use in console (non-GUI) applications. It is an extension of QCoreApplication (instead of QApplication). It does not require the QtGui library.

-

The API and usage is identical to QtSingleApplication, except that functions relating to the "activation window" are not present, for obvious reasons. Please refer to the QtSingleApplication documentation for explanation of the usage.

-

A QtSingleCoreApplication instance can communicate to a QtSingleApplication instance if they share the same application id. Hence, this class can be used to create a light-weight command-line tool that sends commands to a GUI application.

-

See also QtSingleApplication.

-
-

Member Function Documentation

-

QtSingleCoreApplication::QtSingleCoreApplication ( int & argc, char ** argv )

-

Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc and argv are passed on to the QCoreAppliation constructor.

-

QtSingleCoreApplication::QtSingleCoreApplication ( const QString & appId, int & argc, char ** argv )

-

Creates a QtSingleCoreApplication object with the application identifier appId. argc and argv are passed on to the QCoreAppliation constructor.

-

QString QtSingleCoreApplication::id () const

-

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

-

bool QtSingleCoreApplication::isRunning ()

-

Returns true if another instance of this application is running; otherwise false.

-

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

-

See also sendMessage().

-

void QtSingleCoreApplication::messageReceived ( const QString & message )   [signal]

-

This signal is emitted when the current instance receives a message from another instance of this application.

-

See also sendMessage().

-

bool QtSingleCoreApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

-

Tries to send the text message to the currently running instance. The QtSingleCoreApplication object in the running instance will emit the messageReceived() signal when it receives the message.

-

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

-

See also isRunning() and messageReceived().

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - List of All Members for QtSingleCoreApplication - - - - - - - -
  Home

List of All Members for QtSingleCoreApplication

-

This is the complete list of members for QtSingleCoreApplication, including inherited members.

-

- -
-

-


- - - - -
Copyright © 2009 NokiaTrademarks
Qt Solutions
- Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/images/qt-logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/images/qt-logo.png differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/index.qdoc qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/index.qdoc --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/index.qdoc 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/doc/index.qdoc 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/*! - \page index.html - \title Single Application - - \section1 Description - - The QtSingleApplication component provides support - for applications that can be only started once per user. - - - - For some applications it is useful or even critical that they are started - only once by any user. Future attempts to start the application should - activate any already running instance, and possibly perform requested - actions, e.g. loading a file, in that instance. - - The QtSingleApplication class provides an interface to detect a running - instance, and to send command strings to that instance. - For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui. - - - - - \section1 Classes - \list - \i QtSingleApplication \i QtSingleCoreApplication\endlist - - \section1 Examples - \list - \i \link qtsingleapplication-example-trivial.html A Trivial Example \endlink \i \link qtsingleapplication-example-loader.html Loading Documents \endlink \i \link qtsinglecoreapplication-example-console.html A Non-GUI Example \endlink \endlist - - - - - - - \section1 Tested platforms - \list - \i Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005 - \i Qt 4.4, 4.5 / Linux / gcc - \i Qt 4.4, 4.5 / MacOS X 10.5 / gcc - \endlist - - - - - */ \ No newline at end of file diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -TEMPLATE = app -CONFIG += console -SOURCES += main.cpp -include(../../src/qtsinglecoreapplication.pri) -QT -= gui diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.qdoc qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.qdoc --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.qdoc 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/console.qdoc 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/*! \page qtsinglecoreapplication-example-console.html - \title A non-GUI example - - This example shows how to use the single-application functionality - in a console application. It does not require the \c QtGui library - at all. - - The only differences from the GUI application usage demonstrated - in the other examples are: - - 1) The \c.pro file should include \c qtsinglecoreapplication.pri - instead of \c qtsingleapplication.pri - - 2) The class name is \c QtSingleCoreApplication instead of \c - QtSingleApplication. - - 3) No calls are made regarding window activation, for obvious reasons. - - console.pro: - \quotefile console/console.pro - - main.cpp: - \quotefile console/main.cpp - -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/main.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/main.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/main.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/console/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include "qtsinglecoreapplication.h" -#include - - -void report(const QString& msg) -{ - qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg)); -} - -class MainClass : public QObject -{ - Q_OBJECT -public: - MainClass() - : QObject() - {} - -public slots: - void handleMessage(const QString& message) - { - report( "Message received: \"" + message + "\""); - } -}; - -int main(int argc, char **argv) -{ - report("Starting up"); - - QtSingleCoreApplication app(argc, argv); - - if (app.isRunning()) { - QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid())); - bool sentok = app.sendMessage(msg); - QString rep("Another instance is running, so I will exit."); - rep += sentok ? " Message sent ok." : " Message sending failed."; - report(rep); - return 0; - } else { - report("No other instance is running; so I will."); - MainClass mainObj; - QObject::connect(&app, SIGNAL(messageReceived(const QString&)), - &mainObj, SLOT(handleMessage(const QString&))); - return app.exec(); - } -} - - -#include "main.moc" diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/examples.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/examples.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/examples.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/examples.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = trivial \ - loader \ - console diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file1.qsl qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file1.qsl --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file1.qsl 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file1.qsl 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -File 1 diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file2.qsl qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file2.qsl --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file2.qsl 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/file2.qsl 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -File 2 diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -TEMPLATE = app - -include(../../src/qtsingleapplication.pri) - -SOURCES += main.cpp diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.qdoc qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.qdoc --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.qdoc 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/loader.qdoc 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/*! \page qtsingleapplication-example-loader.html - \title Loading Documents - - The application in this example loads or prints the documents - passed as commandline parameters to further instances of this - application. - - \quotefromfile loader/main.cpp - \printuntil }; - The user interface in this application is a QMainWindow subclass - with a QMdiArea as the central widget. It implements a slot - \c handleMessage() that will be connected to the messageReceived() - signal of the QtSingleApplication class. - - \printuntil } - The MainWindow constructor creates a minimal user interface. - - \printto case Print: - The handleMessage() slot interprets the message passed in as a - filename that can be prepended with \e /print to indicate that - the file should just be printed rather than loaded. - - \printto #include - Loading the file will also activate the window. - - \printto mw - The \c main entry point function creates a QtSingleApplication - object, and creates a message to send to a running instance - of the application. If the message was sent successfully the - process exits immediately. - - \printuntil } - If the message could not be sent the application starts up. Note - that \c false is passed to the call to setActivationWindow() to - prevent automatic activation for every message received, e.g. when - the application should just print a file. Instead, the message - handling function determines whether activation is requested, and - signals that by emitting the needToShow() signal. This is then - simply connected directly to QtSingleApplication's - activateWindow() slot. -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/main.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/main.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/main.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/loader/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -class MainWindow : public QMainWindow -{ - Q_OBJECT -public: - MainWindow(); - -public slots: - void handleMessage(const QString& message); - -signals: - void needToShow(); - -private: - QMdiArea *workspace; -}; - -MainWindow::MainWindow() -{ - workspace = new QMdiArea(this); - - setCentralWidget(workspace); -} - -void MainWindow::handleMessage(const QString& message) -{ - enum Action { - Nothing, - Open, - Print - } action; - - action = Nothing; - QString filename = message; - if (message.toLower().startsWith("/print ")) { - filename = filename.mid(7); - action = Print; - } else if (!message.isEmpty()) { - action = Open; - } - if (action == Nothing) { - emit needToShow(); - return; - } - - QFile file(filename); - QString contents; - if (file.open(QIODevice::ReadOnly)) - contents = file.readAll(); - else - contents = "[[Error: Could not load file " + filename + "]]"; - - QTextEdit *view = new QTextEdit; - view->setPlainText(contents); - - switch(action) { - case Print: - { - QPrinter printer; - view->print(&printer); - delete view; - } - break; - - case Open: - { - workspace->addSubWindow(view); - view->setWindowTitle(message); - view->show(); - emit needToShow(); - } - break; - default: - break; - }; -} - -#include "main.moc" - -int main(int argc, char **argv) -{ - QtSingleApplication instance("File loader QtSingleApplication example", argc, argv); - QString message; - for (int a = 1; a < argc; ++a) { - message += argv[a]; - if (a < argc-1) - message += " "; - } - - if (instance.sendMessage(message)) - return 0; - - MainWindow mw; - mw.handleMessage(message); - mw.show(); - - QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), - &mw, SLOT(handleMessage(const QString&))); - - instance.setActivationWindow(&mw, false); - QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow())); - - return instance.exec(); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/main.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/main.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/main.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#include -#include - -class TextEdit : public QTextEdit -{ - Q_OBJECT -public: - TextEdit(QWidget *parent = 0) - : QTextEdit(parent) - {} -public slots: - void append(const QString &str) - { - QTextEdit::append(str); - } -}; - -#include "main.moc" - - - -int main(int argc, char **argv) -{ - QtSingleApplication instance(argc, argv); - if (instance.sendMessage("Wake up!")) - return 0; - - TextEdit logview; - logview.setReadOnly(true); - logview.show(); - - instance.setActivationWindow(&logview); - - QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), - &logview, SLOT(append(const QString&))); - - return instance.exec(); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -TEMPLATE = app - -include(../../src/qtsingleapplication.pri) - -SOURCES += main.cpp diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.qdoc qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.qdoc --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.qdoc 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/examples/trivial/trivial.qdoc 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/*! \page qtsingleapplication-example-trivial.html - \title A Trivial Example - - The application in this example has a log-view that displays - messages sent by further instances of the same application. - - The example demonstrates the use of the QtSingleApplication - class to detect and communicate with a running instance of - the application using the sendMessage() API. The messageReceived() - signal is used to display received messages in a QTextEdit log. - - \quotefromfile trivial/main.cpp - \printuntil instance - The example has only the \c main entry point function. - A QtSingleApplication object is created immediately. - - \printuntil return - If another instance of this application is already running, - sendMessage() will succeed, and this instance just exits - immediately. - - \printuntil show() - Otherwise the instance continues as normal and creates the - user interface. - - \printuntil return instance.exec(); - The \c logview object is also set as the application's activation - window. Every time a message is received, the window will be raised - and activated automatically. - - The messageReceived() signal is also connected to the QTextEdit's - append() slot. Every message received from further instances of - this application will be displayed in the log. - - Finally the event loop is entered. -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/INSTALL.TXT qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/INSTALL.TXT --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/INSTALL.TXT 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/INSTALL.TXT 1970-01-01 00:00:00.000000000 +0000 @@ -1,254 +0,0 @@ -INSTALLATION INSTRUCTIONS - -These instructions refer to the package you are installing as -some-package.tar.gz or some-package.zip. The .zip file is intended for use -on Windows. - -The directory you choose for the installation will be referred to as -your-install-dir. - -Note to Qt Visual Studio Integration users: In the instructions below, -instead of building from command line with nmake, you can use the menu -command 'Qt->Open Solution from .pro file' on the .pro files in the -example and plugin directories, and then build from within Visual -Studio. - -Unpacking and installation --------------------------- - -1. Unpacking the archive (if you have not done so already). - - On Unix and Mac OS X (in a terminal window): - - cd your-install-dir - gunzip some-package.tar.gz - tar xvf some-package.tar - - This creates the subdirectory some-package containing the files. - - On Windows: - - Unpack the .zip archive by right-clicking it in explorer and - choosing "Extract All...". If your version of Windows does not - have zip support, you can use the infozip tools available - from www.info-zip.org. - - If you are using the infozip tools (in a command prompt window): - cd your-install-dir - unzip some-package.zip - -2. Configuring the package. - - The configure script is called "configure" on unix/mac and - "configure.bat" on Windows. It should be run from a command line - after cd'ing to the package directory. - - You can choose whether you want to use the component by including - its source code directly into your project, or build the component - as a dynamic shared library (DLL) that is loaded into the - application at run-time. The latter may be preferable for - technical or licensing (LGPL) reasons. If you want to build a DLL, - run the configure script with the argument "-library". Also see - the note about usage below. - - (Components that are Qt plugins, e.g. styles and image formats, - are by default built as a plugin DLL.) - - The configure script will prompt you in some cases for further - information. Answer these questions and carefully read the license text - before accepting the license conditions. The package cannot be used if - you do not accept the license conditions. - -3. Building the component and examples (when required). - - If a DLL is to be built, or if you would like to build the - examples, next give the commands - - qmake - make [or nmake if your are using Microsoft Visual C++] - - The example program(s) can be found in the directory called - "examples" or "example". - - Components that are Qt plugins, e.g. styles and image formats, are - ready to be used as soon as they are built, so the rest of this - installation instruction can be skipped. - -4. Building the Qt Designer plugin (optional). - - Some of the widget components are provided with plugins for Qt - Designer. To build and install the plugin, cd into the - some-package/plugin directory and give the commands - - qmake - make [or nmake if your are using Microsoft Visual C++] - - Restart Qt Designer to make it load the new widget plugin. - - Note: If you are using the built-in Qt Designer from the Qt Visual - Studio Integration, you will need to manually copy the plugin DLL - file, i.e. copy - %QTDIR%\plugins\designer\some-component.dll - to the Qt Visual Studio Integration plugin path, typically: - C:\Program Files\Trolltech\Qt VS Integration\plugins - - Note: If you for some reason are using a Qt Designer that is built - in debug mode, you will need to build the plugin in debug mode - also. Edit the file plugin.pro in the plugin directory, changing - 'release' to 'debug' in the CONFIG line, before running qmake. - - - -Solutions components are intended to be used directly from the package -directory during development, so there is no 'make install' procedure. - - -Using a component in your project ---------------------------------- - -To use this component in your project, add the following line to the -project's .pro file (or do the equivalent in your IDE): - - include(your-install-dir/some-package/src/some-package.pri) - -This adds the package's sources and headers to the SOURCES and HEADERS -project variables respectively (or, if the component has been -configured as a DLL, it adds that library to the LIBS variable), and -updates INCLUDEPATH to contain the package's src -directory. Additionally, the .pri file may include some dependencies -needed by the package. - -To include a header file from the package in your sources, you can now -simply use: - - #include - -or alternatively, in pre-Qt 4 style: - - #include - -Refer to the documentation to see the classes and headers this -components provides. - - - -Install documentation (optional) --------------------------------- - -The HTML documentation for the package's classes is located in the -your-install-dir/some-package/doc/html/index.html. You can open this -file and read the documentation with any web browser. - -To install the documentation into Qt Assistant (for Qt version 4.4 and -later): - -1. In Assistant, open the Edit->Preferences dialog and choose the - Documentation tab. Click the Add... button and select the file - your-install-dir/some-package/doc/html/some-package.qch - -For Qt versions prior to 4.4, do instead the following: - -1. The directory your-install-dir/some-package/doc/html contains a - file called some-package.dcf. Execute the following commands in a - shell, command prompt or terminal window: - - cd your-install-dir/some-package/doc/html/ - assistant -addContentFile some-package.dcf - -The next time you start Qt Assistant, you can access the package's -documentation. - - -Removing the documentation from assistant ------------------------------------------ - -If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later: - -1. In Assistant, open the Edit->Preferences dialog and choose the - Documentation tab. In the list of Registered Documentation, select - the item com.trolltech.qtsolutions.some-package_version, and click - the Remove button. - -For Qt versions prior to 4.4, do instead the following: - -1. The directory your-install-dir/some-package/doc/html contains a - file called some-package.dcf. Execute the following commands in a - shell, command prompt or terminal window: - - cd your-install-dir/some-package/doc/html/ - assistant -removeContentFile some-package.dcf - - - -Using the component as a DLL ----------------------------- - -1. Normal components - - The shared library (DLL) is built and placed in the - some-package/lib directory. It is intended to be used directly - from there during development. When appropriate, both debug and - release versions are built, since the run-time linker will in some - cases refuse to load a debug-built DLL into a release-built - application or vice versa. - - The following steps are taken by default to help the dynamic - linker to locate the DLL at run-time (during development): - - Unix: The some-package.pri file will add linker instructions to - add the some-package/lib directory to the rpath of the - executable. (When distributing, or if your system does not support - rpath, you can copy the shared library to another place that is - searched by the dynamic linker, e.g. the "lib" directory of your - Qt installation.) - - Mac: The full path to the library is hardcoded into the library - itself, from where it is copied into the executable at link time, - and ready by the dynamic linker at run-time. (When distributing, - you will want to edit these hardcoded paths in the same way as for - the Qt DLLs. Refer to the document "Deploying an Application on - Mac OS X" in the Qt Reference Documentation.) - - Windows: the .dll file(s) are copied into the "bin" directory of - your Qt installation. The Qt installation will already have set up - that directory to be searched by the dynamic linker. - - -2. Plugins - - For Qt Solutions plugins (e.g. image formats), both debug and - release versions of the plugin are built by default when - appropriate, since in some cases the release Qt library will not - load a debug plugin, and vice versa. The plugins are automatically - copied into the plugins directory of your Qt installation when - built, so no further setup is required. - - Plugins may also be built statically, i.e. as a library that will be - linked into your application executable, and so will not need to - be redistributed as a separate plugin DLL to end users. Static - building is required if Qt itself is built statically. To do it, - just add "static" to the CONFIG variable in the plugin/plugin.pro - file before building. Refer to the "Static Plugins" section in the - chapter "How to Create Qt Plugins" for explanation of how to use a - static plugin in your application. The source code of the example - program(s) will also typically contain the relevant instructions - as comments. - - - -Uninstalling ------------- - - The following command will remove any fils that have been - automatically placed outside the package directory itself during - installation and building - - make distclean [or nmake if your are using Microsoft Visual C++] - - If Qt Assistant documentation or Qt Designer plugins have been - installed, they can be uninstalled manually, ref. above. - - -Enjoy! :) - -- The Qt Solutions Team. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LGPL_EXCEPTION.txt qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LGPL_EXCEPTION.txt --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LGPL_EXCEPTION.txt 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LGPL_EXCEPTION.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Nokia Qt LGPL Exception version 1.0 - -As a special exception to the GNU Lesser General Public License -version 2.1, the object code form of a "work that uses the Library" -may incorporate material from a header file that is part of the -Library. You may distribute such object code under terms of your -choice, provided that the incorporated material (i) does not exceed -more than 5% of the total size of the Library; and (ii) is limited to -numerical parameters, data structure layouts, accessors, macros, -inline functions and templates. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.GPL3 qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.GPL3 --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.GPL3 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.GPL3 1970-01-01 00:00:00.000000000 +0000 @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.LGPL qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.LGPL --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.LGPL 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/LICENSE.LGPL 1970-01-01 00:00:00.000000000 +0000 @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/qtsingleapplication.pro qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/qtsingleapplication.pro --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/qtsingleapplication.pro 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/qtsingleapplication.pro 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -TEMPLATE=subdirs -CONFIG += ordered -include(common.pri) -qtsingleapplication-uselib:SUBDIRS=buildlib -SUBDIRS+=examples diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/README.TXT qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/README.TXT --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/README.TXT 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/README.TXT 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Single Application v2.6 - -The QtSingleApplication component provides support for -applications that can be only started once per user. - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.cpp 2009-10-01 08:42:43.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,204 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include "qtlocalpeer.h" -#include -#include - -#if defined(Q_OS_WIN) -#include -#include -typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*); -static PProcessIdToSessionId pProcessIdToSessionId = 0; -#endif -#if defined(Q_OS_UNIX) -#include -#include -#endif - -namespace QtLP_Private { -#include "qtlockedfile.cpp" -#if defined(Q_OS_WIN) -#include "qtlockedfile_win.cpp" -#else -#include "qtlockedfile_unix.cpp" -#endif -} - -const char* QtLocalPeer::ack = "ack"; - -QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) - : QObject(parent), id(appId) -{ - QString prefix = id; - if (id.isEmpty()) { - id = QCoreApplication::applicationFilePath(); -#if defined(Q_OS_WIN) - id = id.toLower(); -#endif - prefix = id.section(QLatin1Char('/'), -1); - } - prefix.remove(QRegExp("[^a-zA-Z]")); - prefix.truncate(6); - - QByteArray idc = id.toUtf8(); - quint16 idNum = qChecksum(idc.constData(), idc.size()); - socketName = QLatin1String("qtsingleapp-") + prefix - + QLatin1Char('-') + QString::number(idNum, 16); - -#if defined(Q_OS_WIN) - if (!pProcessIdToSessionId) { - QLibrary lib("kernel32"); - pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId"); - } - if (pProcessIdToSessionId) { - DWORD sessionId = 0; - pProcessIdToSessionId(GetCurrentProcessId(), &sessionId); - socketName += QLatin1Char('-') + QString::number(sessionId, 16); - } -#else - socketName += QLatin1Char('-') + QString::number(::getuid(), 16); -#endif - - server = new QLocalServer(this); - QString lockName = QDir(QDir::tempPath()).absolutePath() - + QLatin1Char('/') + socketName - + QLatin1String("-lockfile"); - lockFile.setFileName(lockName); - lockFile.open(QIODevice::ReadWrite); -} - - - -bool QtLocalPeer::isClient() -{ - if (lockFile.isLocked()) - return false; - - if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) - return true; - - bool res = server->listen(socketName); -#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) - // ### Workaround - if (!res && server->serverError() == QAbstractSocket::AddressInUseError) { - QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName); - res = server->listen(socketName); - } -#endif - if (!res) - qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString())); - QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection())); - return false; -} - - -bool QtLocalPeer::sendMessage(const QString &message, int timeout) -{ - if (!isClient()) - return false; - - QLocalSocket socket; - bool connOk = false; - for(int i = 0; i < 2; i++) { - // Try twice, in case the other instance is just starting up - socket.connectToServer(socketName); - connOk = socket.waitForConnected(timeout/2); - if (connOk || i) - break; - int ms = 250; -#if defined(Q_OS_WIN) - Sleep(DWORD(ms)); -#else - struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; - nanosleep(&ts, NULL); -#endif - } - if (!connOk) - return false; - - QByteArray uMsg(message.toUtf8()); - QDataStream ds(&socket); - ds.writeBytes(uMsg.constData(), uMsg.size()); - bool res = socket.waitForBytesWritten(timeout); - res &= socket.waitForReadyRead(timeout); // wait for ack - res &= (socket.read(qstrlen(ack)) == ack); - return res; -} - - -void QtLocalPeer::receiveConnection() -{ - QLocalSocket* socket = server->nextPendingConnection(); - if (!socket) - return; - - while (socket->bytesAvailable() < (int)sizeof(quint32)) - socket->waitForReadyRead(); - QDataStream ds(socket); - QByteArray uMsg; - quint32 remaining; - ds >> remaining; - uMsg.resize(remaining); - int got = 0; - char* uMsgBuf = uMsg.data(); - do { - got = ds.readRawData(uMsgBuf, remaining); - remaining -= got; - uMsgBuf += got; - } while (remaining && got >= 0 && socket->waitForReadyRead(2000)); - if (got < 0) { - qWarning() << "QtLocalPeer: Message reception failed" << socket->errorString(); - delete socket; - return; - } - QString message(QString::fromUtf8(uMsg)); - socket->write(ack, qstrlen(ack)); - socket->waitForBytesWritten(1000); - delete socket; - emit messageReceived(message); //### (might take a long time to return) -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.h qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.h --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.h 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlocalpeer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include -#include -#include - -namespace QtLP_Private { -#include "qtlockedfile.h" -} - -class QtLocalPeer : public QObject -{ - Q_OBJECT - -public: - QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); - bool isClient(); - bool sendMessage(const QString &message, int timeout); - QString applicationId() const - { return id; } - -Q_SIGNALS: - void messageReceived(const QString &message); - -protected Q_SLOTS: - void receiveConnection(); - -protected: - QString id; - QString socketName; - QLocalServer* server; - QtLP_Private::QtLockedFile lockFile; - -private: - static const char* ack; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtLockedFile qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtLockedFile --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtLockedFile 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtLockedFile 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#include "qtlockedfile.h" diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,199 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#include "qtlockedfile.h" - -/*! - \class QtLockedFile - - \brief The QtLockedFile class extends QFile with advisory locking - functions. - - A file may be locked in read or write mode. Multiple instances of - \e QtLockedFile, created in multiple processes running on the same - machine, may have a file locked in read mode. Exactly one instance - may have it locked in write mode. A read and a write lock cannot - exist simultaneously on the same file. - - The file locks are advisory. This means that nothing prevents - another process from manipulating a locked file using QFile or - file system functions offered by the OS. Serialization is only - guaranteed if all processes that access the file use - QLockedFile. Also, while holding a lock on a file, a process - must not open the same file again (through any API), or locks - can be unexpectedly lost. - - The lock provided by an instance of \e QtLockedFile is released - whenever the program terminates. This is true even when the - program crashes and no destructors are called. -*/ - -/*! \enum QtLockedFile::LockMode - - This enum describes the available lock modes. - - \value ReadLock A read lock. - \value WriteLock A write lock. - \value NoLock Neither a read lock nor a write lock. -*/ - -/*! - Constructs an unlocked \e QtLockedFile object. This constructor - behaves in the same way as \e QFile::QFile(). - - \sa QFile::QFile() -*/ -QtLockedFile::QtLockedFile() - : QFile() -{ -#ifdef Q_OS_WIN - wmutex = 0; - rmutex = 0; -#endif - m_lock_mode = NoLock; -} - -/*! - Constructs an unlocked QtLockedFile object with file \a name. This - constructor behaves in the same way as \e QFile::QFile(const - QString&). - - \sa QFile::QFile() -*/ -QtLockedFile::QtLockedFile(const QString &name) - : QFile(name) -{ -#ifdef Q_OS_WIN - wmutex = 0; - rmutex = 0; -#endif - m_lock_mode = NoLock; -} - -/*! - Opens the file in OpenMode \a mode. - - This is identical to QFile::open(), with the one exception that the - Truncate mode flag is disallowed. Truncation would conflict with the - advisory file locking, since the file would be modified before the - write lock is obtained. If truncation is required, use resize(0) - after obtaining the write lock. - - Returns true if successful; otherwise false. - - \sa QFile::open(), QFile::resize() -*/ -bool QtLockedFile::open(OpenMode mode) -{ - if (mode & QIODevice::Truncate) { - qWarning("QtLockedFile::open(): Truncate mode not allowed."); - return false; - } - return QFile::open(mode); -} - -/*! - Returns \e true if this object has a in read or write lock; - otherwise returns \e false. - - \sa lockMode() -*/ -bool QtLockedFile::isLocked() const -{ - return m_lock_mode != NoLock; -} - -/*! - Returns the type of lock currently held by this object, or \e - QtLockedFile::NoLock. - - \sa isLocked() -*/ -QtLockedFile::LockMode QtLockedFile::lockMode() const -{ - return m_lock_mode; -} - -/*! - \fn bool QtLockedFile::lock(LockMode mode, bool block = true) - - Obtains a lock of type \a mode. The file must be opened before it - can be locked. - - If \a block is true, this function will block until the lock is - aquired. If \a block is false, this function returns \e false - immediately if the lock cannot be aquired. - - If this object already has a lock of type \a mode, this function - returns \e true immediately. If this object has a lock of a - different type than \a mode, the lock is first released and then a - new lock is obtained. - - This function returns \e true if, after it executes, the file is - locked by this object, and \e false otherwise. - - \sa unlock(), isLocked(), lockMode() -*/ - -/*! - \fn bool QtLockedFile::unlock() - - Releases a lock. - - If the object has no lock, this function returns immediately. - - This function returns \e true if, after it executes, the file is - not locked by this object, and \e false otherwise. - - \sa lock(), isLocked(), lockMode() -*/ - -/*! - \fn QtLockedFile::~QtLockedFile() - - Destroys the \e QtLockedFile object. If any locks were held, they - are released. -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.h qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.h --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.h 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#ifndef QTLOCKEDFILE_H -#define QTLOCKEDFILE_H - -#include -#ifdef Q_OS_WIN -#include -#endif - -#if defined(Q_WS_WIN) -# if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) -# define QT_QTLOCKEDFILE_EXPORT -# elif defined(QT_QTLOCKEDFILE_IMPORT) -# if defined(QT_QTLOCKEDFILE_EXPORT) -# undef QT_QTLOCKEDFILE_EXPORT -# endif -# define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport) -# elif defined(QT_QTLOCKEDFILE_EXPORT) -# undef QT_QTLOCKEDFILE_EXPORT -# define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport) -# endif -#else -# define QT_QTLOCKEDFILE_EXPORT -#endif - -class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile -{ -public: - enum LockMode { NoLock = 0, ReadLock, WriteLock }; - - QtLockedFile(); - QtLockedFile(const QString &name); - ~QtLockedFile(); - - bool open(OpenMode mode); - - bool lock(LockMode mode, bool block = true); - bool unlock(); - bool isLocked() const; - LockMode lockMode() const; - -private: -#ifdef Q_OS_WIN - Qt::HANDLE wmutex; - Qt::HANDLE rmutex; - QVector rmutexes; - QString mutexname; - - Qt::HANDLE getMutexHandle(int idx, bool doCreate); - bool waitMutex(Qt::HANDLE mutex, bool doBlock); - -#endif - LockMode m_lock_mode; -}; - -#endif diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_unix.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_unix.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_unix.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_unix.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#include -#include -#include -#include - -#include "qtlockedfile.h" - -bool QtLockedFile::lock(LockMode mode, bool block) -{ - if (!isOpen()) { - qWarning("QtLockedFile::lock(): file is not opened"); - return false; - } - - if (mode == NoLock) - return unlock(); - - if (mode == m_lock_mode) - return true; - - if (m_lock_mode != NoLock) - unlock(); - - struct flock fl; - fl.l_whence = SEEK_SET; - fl.l_start = 0; - fl.l_len = 0; - fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; - int cmd = block ? F_SETLKW : F_SETLK; - int ret = fcntl(handle(), cmd, &fl); - - if (ret == -1) { - if (errno != EINTR && errno != EAGAIN) - qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); - return false; - } - - - m_lock_mode = mode; - return true; -} - - -bool QtLockedFile::unlock() -{ - if (!isOpen()) { - qWarning("QtLockedFile::unlock(): file is not opened"); - return false; - } - - if (!isLocked()) - return true; - - struct flock fl; - fl.l_whence = SEEK_SET; - fl.l_start = 0; - fl.l_len = 0; - fl.l_type = F_UNLCK; - int ret = fcntl(handle(), F_SETLKW, &fl); - - if (ret == -1) { - qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); - return false; - } - - m_lock_mode = NoLock; - return true; -} - -QtLockedFile::~QtLockedFile() -{ - if (isOpen()) - unlock(); -} - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_win.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_win.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_win.cpp 2010-06-06 11:08:01.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtlockedfile_win.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -#include "qtlockedfile.h" -#include -#include - -#define MUTEX_PREFIX "QtLockedFile mutex " -// Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS -#define MAX_READERS MAXIMUM_WAIT_OBJECTS - -Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) -{ - if (mutexname.isEmpty()) { - QFileInfo fi(*this); - mutexname = QString::fromLatin1(MUTEX_PREFIX) - + fi.absoluteFilePath().toLower(); - } - QString mname(mutexname); - if (idx >= 0) - mname += QString::number(idx); - - Qt::HANDLE mutex; - if (doCreate) { - QT_WA( { mutex = CreateMutexW(NULL, FALSE, reinterpret_cast(mname.utf16())); }, - { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); - if (!mutex) { - qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); - return 0; - } - } - else { - QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, reinterpret_cast(mname.utf16())); }, - { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); - if (!mutex) { - if (GetLastError() != ERROR_FILE_NOT_FOUND) - qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); - return 0; - } - } - return mutex; -} - -bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock) -{ - Q_ASSERT(mutex); - DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0); - switch (res) { - case WAIT_OBJECT_0: - case WAIT_ABANDONED: - return true; - break; - case WAIT_TIMEOUT: - break; - default: - qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed"); - } - return false; -} - - - -bool QtLockedFile::lock(LockMode mode, bool block) -{ - if (!isOpen()) { - qWarning("QtLockedFile::lock(): file is not opened"); - return false; - } - - if (mode == NoLock) - return unlock(); - - if (mode == m_lock_mode) - return true; - - if (m_lock_mode != NoLock) - unlock(); - - if (!wmutex && !(wmutex = getMutexHandle(-1, true))) - return false; - - if (!waitMutex(wmutex, block)) - return false; - - if (mode == ReadLock) { - int idx = 0; - for (; idx < MAX_READERS; idx++) { - rmutex = getMutexHandle(idx, false); - if (!rmutex || waitMutex(rmutex, false)) - break; - CloseHandle(rmutex); - } - bool ok = true; - if (idx >= MAX_READERS) { - qWarning("QtLockedFile::lock(): too many readers"); - rmutex = 0; - ok = false; - } - else if (!rmutex) { - rmutex = getMutexHandle(idx, true); - if (!rmutex || !waitMutex(rmutex, false)) - ok = false; - } - if (!ok && rmutex) { - CloseHandle(rmutex); - rmutex = 0; - } - ReleaseMutex(wmutex); - if (!ok) - return false; - } - else { - Q_ASSERT(rmutexes.isEmpty()); - for (int i = 0; i < MAX_READERS; i++) { - Qt::HANDLE mutex = getMutexHandle(i, false); - if (mutex) - rmutexes.append(mutex); - } - if (rmutexes.size()) { - DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), - TRUE, block ? INFINITE : 0); - if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { - if (res != WAIT_TIMEOUT) - qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); - m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky - unlock(); - return false; - } - } - } - - m_lock_mode = mode; - return true; -} - -bool QtLockedFile::unlock() -{ - if (!isOpen()) { - qWarning("QtLockedFile::unlock(): file is not opened"); - return false; - } - - if (!isLocked()) - return true; - - if (m_lock_mode == ReadLock) { - ReleaseMutex(rmutex); - CloseHandle(rmutex); - rmutex = 0; - } - else { - foreach(Qt::HANDLE mutex, rmutexes) { - ReleaseMutex(mutex); - CloseHandle(mutex); - } - rmutexes.clear(); - ReleaseMutex(wmutex); - } - - m_lock_mode = QtLockedFile::NoLock; - return true; -} - -QtLockedFile::~QtLockedFile() -{ - if (isOpen()) - unlock(); - if (wmutex) - CloseHandle(wmutex); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtSingleApplication qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtSingleApplication --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtSingleApplication 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/QtSingleApplication 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#include "qtsingleapplication.h" diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,351 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include "qtsingleapplication.h" -#include "qtlocalpeer.h" -#include - - -/*! - \class QtSingleApplication qtsingleapplication.h - \brief The QtSingleApplication class provides an API to detect and - communicate with running instances of an application. - - This class allows you to create applications where only one - instance should be running at a time. I.e., if the user tries to - launch another instance, the already running instance will be - activated instead. Another usecase is a client-server system, - where the first started instance will assume the role of server, - and the later instances will act as clients of that server. - - By default, the full path of the executable file is used to - determine whether two processes are instances of the same - application. You can also provide an explicit identifier string - that will be compared instead. - - The application should create the QtSingleApplication object early - in the startup phase, and call isRunning() or sendMessage() to - find out if another instance of this application is already - running. Startup parameters (e.g. the name of the file the user - wanted this new instance to open) can be passed to the running - instance in the sendMessage() function. - - If isRunning() or sendMessage() returns false, it means that no - other instance is running, and this instance has assumed the role - as the running instance. The application should continue with the - initialization of the application user interface before entering - the event loop with exec(), as normal. The messageReceived() - signal will be emitted when the application receives messages from - another instance of the same application. - - If isRunning() or sendMessage() returns true, another instance is - already running, and the application should terminate or enter - client mode. - - If a message is received it might be helpful to the user to raise - the application so that it becomes visible. To facilitate this, - QtSingleApplication provides the setActivationWindow() function - and the activateWindow() slot. - - Here's an example that shows how to convert an existing - application to use QtSingleApplication. It is very simple and does - not make use of all QtSingleApplication's functionality (see the - examples for that). - - \code - // Original - int main(int argc, char **argv) - { - QApplication app(argc, argv); - - MyMainWidget mmw; - - mmw.show(); - return app.exec(); - } - - // Single instance - int main(int argc, char **argv) - { - QtSingleApplication app(argc, argv); - - if (app.isRunning()) - return 0; - - MyMainWidget mmw; - - app.setActivationWindow(&mmw); - - mmw.show(); - return app.exec(); - } - \endcode - - Once this QtSingleApplication instance is destroyed(for example, - when the user quits), when the user next attempts to run the - application this instance will not, of course, be encountered. The - next instance to call isRunning() or sendMessage() will assume the - role as the new running instance. - - For console (non-GUI) applications, QtSingleCoreApplication may be - used instead of this class, to avoid the dependency on the QtGui - library. - - \sa QtSingleCoreApplication -*/ - - -void QtSingleApplication::sysInit(const QString &appId) -{ - actWin = 0; - peer = new QtLocalPeer(this, appId); - connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); -} - - -/*! - Creates a QtSingleApplication object. The application identifier - will be QCoreApplication::applicationFilePath(). \a argc, \a - argv, and \a GUIenabled are passed on to the QAppliation constructor. - - If you are creating a console application (i.e. setting \a - GUIenabled to false), you may consider using - QtSingleCoreApplication instead. -*/ - -QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled) - : QApplication(argc, argv, GUIenabled) -{ - sysInit(); -} - - -/*! - Creates a QtSingleApplication object with the application - identifier \a appId. \a argc and \a argv are passed on to the - QAppliation constructor. -*/ - -QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) - : QApplication(argc, argv) -{ - sysInit(appId); -} - - -/*! - Creates a QtSingleApplication object. The application identifier - will be QCoreApplication::applicationFilePath(). \a argc, \a - argv, and \a type are passed on to the QAppliation constructor. -*/ -QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) - : QApplication(argc, argv, type) -{ - sysInit(); -} - - -#if defined(Q_WS_X11) -/*! - Special constructor for X11, ref. the documentation of - QApplication's corresponding constructor. The application identifier - will be QCoreApplication::applicationFilePath(). \a dpy, \a visual, - and \a cmap are passed on to the QApplication constructor. -*/ -QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap) - : QApplication(dpy, visual, cmap) -{ - sysInit(); -} - -/*! - Special constructor for X11, ref. the documentation of - QApplication's corresponding constructor. The application identifier - will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a - argv, \a visual, and \a cmap are passed on to the QApplication - constructor. -*/ -QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) - : QApplication(dpy, argc, argv, visual, cmap) -{ - sysInit(); -} - -/*! - Special constructor for X11, ref. the documentation of - QApplication's corresponding constructor. The application identifier - will be \a appId. \a dpy, \a argc, \a - argv, \a visual, and \a cmap are passed on to the QApplication - constructor. -*/ -QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) - : QApplication(dpy, argc, argv, visual, cmap) -{ - sysInit(appId); -} -#endif - - -/*! - Returns true if another instance of this application is running; - otherwise false. - - This function does not find instances of this application that are - being run by a different user (on Windows: that are running in - another session). - - \sa sendMessage() -*/ - -bool QtSingleApplication::isRunning() -{ - return peer->isClient(); -} - - -/*! - Tries to send the text \a message to the currently running - instance. The QtSingleApplication object in the running instance - will emit the messageReceived() signal when it receives the - message. - - This function returns true if the message has been sent to, and - processed by, the current instance. If there is no instance - currently running, or if the running instance fails to process the - message within \a timeout milliseconds, this function return false. - - \sa isRunning(), messageReceived() -*/ -bool QtSingleApplication::sendMessage(const QString &message, int timeout) -{ - return peer->sendMessage(message, timeout); -} - - -/*! - Returns the application identifier. Two processes with the same - identifier will be regarded as instances of the same application. -*/ -QString QtSingleApplication::id() const -{ - return peer->applicationId(); -} - - -/*! - Sets the activation window of this application to \a aw. The - activation window is the widget that will be activated by - activateWindow(). This is typically the application's main window. - - If \a activateOnMessage is true (the default), the window will be - activated automatically every time a message is received, just prior - to the messageReceived() signal being emitted. - - \sa activateWindow(), messageReceived() -*/ - -void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage) -{ - actWin = aw; - if (activateOnMessage) - connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); - else - disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); -} - - -/*! - Returns the applications activation window if one has been set by - calling setActivationWindow(), otherwise returns 0. - - \sa setActivationWindow() -*/ -QWidget* QtSingleApplication::activationWindow() const -{ - return actWin; -} - - -/*! - De-minimizes, raises, and activates this application's activation window. - This function does nothing if no activation window has been set. - - This is a convenience function to show the user that this - application instance has been activated when he has tried to start - another instance. - - This function should typically be called in response to the - messageReceived() signal. By default, that will happen - automatically, if an activation window has been set. - - \sa setActivationWindow(), messageReceived(), initialize() -*/ -void QtSingleApplication::activateWindow() -{ - if (actWin) { - actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized); - actWin->raise(); - actWin->activateWindow(); - } -} - - -/*! - \fn void QtSingleApplication::messageReceived(const QString& message) - - This signal is emitted when the current instance receives a \a - message from another instance of this application. - - \sa sendMessage(), setActivationWindow(), activateWindow() -*/ - - -/*! - \fn void QtSingleApplication::initialize(bool dummy = true) - - \obsolete -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.h qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.h --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.h 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include - -class QtLocalPeer; - -#if defined(Q_WS_WIN) -# if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) -# define QT_QTSINGLEAPPLICATION_EXPORT -# elif defined(QT_QTSINGLEAPPLICATION_IMPORT) -# if defined(QT_QTSINGLEAPPLICATION_EXPORT) -# undef QT_QTSINGLEAPPLICATION_EXPORT -# endif -# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) -# elif defined(QT_QTSINGLEAPPLICATION_EXPORT) -# undef QT_QTSINGLEAPPLICATION_EXPORT -# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) -# endif -#else -# define QT_QTSINGLEAPPLICATION_EXPORT -#endif - -class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication -{ - Q_OBJECT - -public: - QtSingleApplication(int &argc, char **argv, bool GUIenabled = true); - QtSingleApplication(const QString &id, int &argc, char **argv); - QtSingleApplication(int &argc, char **argv, Type type); -#if defined(Q_WS_X11) - QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); - QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0); - QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); -#endif - - bool isRunning(); - QString id() const; - - void setActivationWindow(QWidget* aw, bool activateOnMessage = true); - QWidget* activationWindow() const; - - // Obsolete: - void initialize(bool dummy = true) - { isRunning(); Q_UNUSED(dummy) } - -public Q_SLOTS: - bool sendMessage(const QString &message, int timeout = 5000); - void activateWindow(); - - -Q_SIGNALS: - void messageReceived(const QString &message); - - -private: - void sysInit(const QString &appId = QString()); - QtLocalPeer *peer; - QWidget *actWin; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.pri qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.pri --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.pri 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsingleapplication.pri 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -include(../common.pri) -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD -QT *= network - -qtsingleapplication-uselib:!qtsingleapplication-buildlib { - LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME -} else { - SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp - HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h -} - -win32 { - contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTSINGLEAPPLICATION_EXPORT - else:qtsingleapplication-uselib:DEFINES += QT_QTSINGLEAPPLICATION_IMPORT -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.cpp qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.cpp 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include "qtsinglecoreapplication.h" -#include "qtlocalpeer.h" - -/*! - \class QtSingleCoreApplication qtsinglecoreapplication.h - \brief A variant of the QtSingleApplication class for non-GUI applications. - - This class is a variant of QtSingleApplication suited for use in - console (non-GUI) applications. It is an extension of - QCoreApplication (instead of QApplication). It does not require - the QtGui library. - - The API and usage is identical to QtSingleApplication, except that - functions relating to the "activation window" are not present, for - obvious reasons. Please refer to the QtSingleApplication - documentation for explanation of the usage. - - A QtSingleCoreApplication instance can communicate to a - QtSingleApplication instance if they share the same application - id. Hence, this class can be used to create a light-weight - command-line tool that sends commands to a GUI application. - - \sa QtSingleApplication -*/ - -/*! - Creates a QtSingleCoreApplication object. The application identifier - will be QCoreApplication::applicationFilePath(). \a argc and \a - argv are passed on to the QCoreAppliation constructor. -*/ - -QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this); - connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); -} - - -/*! - Creates a QtSingleCoreApplication object with the application - identifier \a appId. \a argc and \a argv are passed on to the - QCoreAppliation constructor. -*/ -QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this, appId); - connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); -} - - -/*! - Returns true if another instance of this application is running; - otherwise false. - - This function does not find instances of this application that are - being run by a different user (on Windows: that are running in - another session). - - \sa sendMessage() -*/ - -bool QtSingleCoreApplication::isRunning() -{ - return peer->isClient(); -} - - -/*! - Tries to send the text \a message to the currently running - instance. The QtSingleCoreApplication object in the running instance - will emit the messageReceived() signal when it receives the - message. - - This function returns true if the message has been sent to, and - processed by, the current instance. If there is no instance - currently running, or if the running instance fails to process the - message within \a timeout milliseconds, this function return false. - - \sa isRunning(), messageReceived() -*/ - -bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) -{ - return peer->sendMessage(message, timeout); -} - - -/*! - Returns the application identifier. Two processes with the same - identifier will be regarded as instances of the same application. -*/ - -QString QtSingleCoreApplication::id() const -{ - return peer->applicationId(); -} - - -/*! - \fn void QtSingleCoreApplication::messageReceived(const QString& message) - - This signal is emitted when the current instance receives a \a - message from another instance of this application. - - \sa sendMessage() -*/ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.h qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.h --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.h 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - - -#include - -class QtLocalPeer; - -class QtSingleCoreApplication : public QCoreApplication -{ - Q_OBJECT - -public: - QtSingleCoreApplication(int &argc, char **argv); - QtSingleCoreApplication(const QString &id, int &argc, char **argv); - - bool isRunning(); - QString id() const; - -public Q_SLOTS: - bool sendMessage(const QString &message, int timeout = 5000); - - -Q_SIGNALS: - void messageReceived(const QString &message); - - -private: - QtLocalPeer* peer; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.pri qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.pri --- qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.pri 2009-07-20 13:04:34.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/qtsingleapplication/src/qtsinglecoreapplication.pri 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD -HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h -SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp - -QT *= network - -win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { - DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/README qesteidutil-0.3.1/=unpacked-tar1=/README --- qesteidutil-0.3.1/=unpacked-tar1=/README 2010-10-13 20:56:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -QEsteidUtil -=========== - -QEsteidUtil is a user-friendly application for managing Estonian ID Cards. -It can be used to to change and unlock PIN codes, examine the personal -information stored on the card, extract and view the certificates, set -up mobile ID and configure a personal @eesti.ee e-mail address. - - -Dependencies -============ - -cmake >= 2.6.0 -libp11 -openssl -qt >= 4.4.0 -smartcardpp >= 0.2.0 -pkcs11 library (e.g. opensc) - - -BUILD INSTRUCTIONS -================== - -1. Run build with cmake - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make -j4 -2. Install the application to a system wide directory - make install diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.cpp 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,734 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "CertUpdate.h" - -#include "common/PinDialog.h" -#include "common/SslCertificate.h" - -#include -#include - -#define LENOF(a) (sizeof(a)/sizeof(*(a))) -#define MAKEVECTOR(a) ByteVec(a,a + LENOF(a) ) - -#define HEADER 28 - -CertUpdate::CertUpdate( int reader, QObject *parent ) -: QObject( parent ) -, card( 0 ) -, cardMgr( 0 ) -, sock( 0 ) -, step( 0 ) -, serverStep( 0 ) -, generateKeys( false ) -, m_authCert( 0 ) -{ - cardMgr = new PCSCManager(); - - card = new EstEidCard(*cardMgr); - if ( !card->isInReader( reader ) ) - throw std::runtime_error( "no card in specified reader" ); - card->connect( reader ); - m_authCert = new JsCertData( this ); - m_authCert->loadCert( card, JsCertData::AuthCert ); - updateUrl = QUrl( ( !m_authCert || m_authCert->isTest() ) ? "http://demo.digidoc.ee:80/iduuendusproxy/" : "http://www.sk.ee:80/id-kontroll2/usk/" ); - QByteArray c( QByteArray::number( QDateTime::currentDateTime().toTime_t() ) ); - memcpy( (void*)challenge, c, 8 ); - - sock = new QTcpSocket( this ); -} - -CertUpdate::~CertUpdate() -{ - if ( sock && sock->state() == QTcpSocket::ConnectedState ) - sock->disconnectFromHost(); - if ( m_authCert ) - delete m_authCert; - if ( card ) - delete card; - if ( cardMgr ) - delete cardMgr; -} - -bool CertUpdate::checkConnection() const -{ - if ( sock && sock->state() != QTcpSocket::ConnectedState ) - { - sock->connectToHost( updateUrl.host(), updateUrl.port() ); - if ( !sock->waitForConnected( 5000 ) ) - return false; - } - return true; -} - -bool CertUpdate::checkUpdateAllowed() -{ - QByteArray result = QByteArray::fromHex( runStep( step ) ); - if ( result.isEmpty() || result.size() != 22 || result.size() < 22 ) - throwError( tr("Check internet connection").toUtf8() ); - if ( result.at(4) == 0x06 ) - generateKeys = true; - if ( !(result.size() > 20 && result.at( 21 ) == 0x00) ) - throwError( tr("update not allowed!").toUtf8() ); - return true; -} - -void CertUpdate::startUpdate() -{ - QByteArray result; - for( step = 1; step < 36; step++ ) - result = runStep( step, result ); -} - -void CertUpdate::throwError( const QString &msg ) -{ throw std::runtime_error( msg.toStdString() ); } - -QByteArray CertUpdate::runStep( int s, QByteArray result ) -{ - QCoreApplication::processEvents(); - switch( s ) - { - case 1: card->setSecEnv( 1 ); break; - case 2: - { - std::string id = card->readCardID(); - memcpy( (void*)personCode, id.c_str(), id.size() ); - break; - } - case 3: - { - card->selectMF(); - card->setSecEnv( 3 ); - card->selectDF( 0xEEEE ); - card->selectEF( 0x0033 ); - card->setSecEnv( 3 ); - } - break; - case 4: - { - PinDialog *p = new PinDialog( qApp->activeWindow() ); - try { - SslCertificate c = m_authCert->cert(); - if ( !card->isSecureConnection() && m_pin.isEmpty() ) - { - p->init( PinDialog::Pin1Type, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); - if( !p->exec() ) - throw std::runtime_error( "" ); - m_pin = p->text(); - } else if ( card->isSecureConnection() ) { - p->init( PinDialog::Pin1PinpadType, c.toString( c.isTempel() ? "CN serialNumber" : "GN SN serialNumber" ) ); - p->show(); - QApplication::processEvents(); - } - card->enterPin( EstEidCard::PIN_AUTH, PinString( m_pin.toLatin1() ) ); - } catch( const AuthError &e ) { - delete p; - throw std::runtime_error( "step4 auth error: " + e.desc ); - } - delete p; - break; - } - case 5: break; - case 6: - { - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || ( generateKeys && result.size() != 19) || ( !generateKeys && result.size() != 114 ) ) - throw std::runtime_error( "step6" ); - if ( !generateKeys ) - step = 25; - break; - } - case 7: break; - case 8: - { - byte tmp[18]; - memcpy( (void*)tmp, result, 18 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = r.size() ? QByteArray( (char*)&r[0], r.size() ) : ""; - } catch( CardError e ) { - throw std::runtime_error( "step8 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime8: " << e.what(); - throw std::runtime_error( "step8 runtime error" ); - } - if ( result.isEmpty() || result.size() != 33 || result.size() < 22 ) - throw std::runtime_error( "step8" ); - - if( result.at(11) == 0x12 ) - authKey = 0x11; - else - authKey = 0x12; - if( result.at(21) == 0x01 ) - signKey = 0x02; - else - signKey = 0x01; - break; - } - case 9: - { - step10 = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( step10.isEmpty() || step10.size() != 194 ) - throw std::runtime_error( "step10" ); - break; - } - case 10: break; - case 11: - { - card->selectEF( 0x0013 ); - break; - } - case 12: - { - byte tmp[96]; - memcpy( (void*)tmp, step10, 96 ); - memset( tmpResult, 0, sizeof(tmpResult)); - QByteArray tmpByte; - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - tmpByte = QByteArray( (char*)&r[0], r.size() ); - memcpy( (void*)tmpResult, tmpByte, 14 ); - } catch( CardError e ) { - throw std::runtime_error( "step12 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime12: " << e.what(); - throw std::runtime_error( "step12 runtime error" ); - } - if ( tmpByte.isEmpty() || tmpByte.size() != 14 ) - throw std::runtime_error( "step12" ); - break; - } - case 13: - { - byte tmp[96]; - QByteArray tmp13 = step10; - tmp13.chop( 1 ); - memcpy( (void*)tmp, tmp13.right(96), 96 ); - QByteArray tmpByte; - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - tmpByte = QByteArray( (char*)&r[0], r.size() ); - memcpy( (void*)&tmpResult[14], tmpByte, 14 ); - } catch( CardError e ) { - throw std::runtime_error( "step13 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime13: " << e.what(); - throw std::runtime_error( "step13 runtime error" ); - } - if ( tmpByte.isEmpty() || tmpByte.size() != 14 ) - throw std::runtime_error( "step13" ); - break; - } - case 14: - { - card->selectEF( 0x1000 ); - break; - } - case 15: - { - try { - ByteVec r = card->cardChallenge(); - memcpy( (void*)&tmpResult[28], QByteArray( (char*)&r[0], r.size() ), 8 ); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } - break; - } - case 16: - { - result = QByteArray::fromHex( queryServer( s, QByteArray( (char*)tmpResult, sizeof( tmpResult ) ) ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 54 ) - throw std::runtime_error( "step16" ); - break; - } - case 17: - { - byte tmp[53]; - memcpy( (void*)tmp, result, 53 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step17 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime17: " << e.what(); - throw std::runtime_error( "step17 runtime error" ); - } - if ( result.isEmpty() || result.size() != 48 ) - throw std::runtime_error( "step17a" ); - - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 22 ) - throw std::runtime_error( "step17b" ); - break; - } - case 18: - { - byte tmp[] = {0x00,0x22,0x41,0xB6,0x02,0x83,0x00}; - try { - card->runCommand( MAKEVECTOR(tmp) ); - } catch( CardError e ) { - throw std::runtime_error( "step18 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime18: " << e.what(); - throw std::runtime_error( "step18 runtime error" ); - } - break; - } - case 19: - { - byte tmp[] = {0x00,0x22,0x41,0xA4,0x05,0x83,0x03,0x80,authKey,0x00}; - try { - card->runCommand( MAKEVECTOR(tmp) ); - } catch( CardError e ) { - throw std::runtime_error( "step19 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime19: " << e.what(); - throw std::runtime_error( "step19 runtime error" ); - } - break; - } - case 20: - { - byte tmp[21]; - memcpy( (void*)tmp, result, 21 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step20 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime20: " << e.what(); - throw std::runtime_error( "step20 runtime error" ); - } - if ( result.isEmpty() || result.size() != 14 ) - throw std::runtime_error( "step20a" ); - - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 19 ) - throw std::runtime_error( "step20b" ); - break; - } - case 21: - { - byte tmp[18]; - memcpy( (void*)tmp, result, 18 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step21 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime21: " << e.what(); - throw std::runtime_error( "step21 runtime error" ); - } - if ( result.isEmpty() || result.size() != 147 || result.size() < 134 ) - throw std::runtime_error( "step21a" ); - - QByteArray tmpResult = result; - - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 22 ) - throw std::runtime_error( "step21b" ); - - if ((unsigned char)tmpResult.at( 132 ) == 0x34 && (unsigned char)tmpResult.at( 133 ) >= 0x80 ) - { - runStep( 3 ); - runStep( 4 ); - runStep( 11 ); - runStep( 12 ); - step = 13; - } - break; - } - case 22: - { - byte tmp[] = {0x00,0x22,0x41,0xB6,0x05,0x83,0x03,0x80,signKey,0x00}; - try { - card->runCommand( MAKEVECTOR(tmp) ); - } catch( CardError e ) { - throw std::runtime_error( "step22 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime22: " << e.what(); - throw std::runtime_error( "step22 runtime error" ); - } - break; - } - case 23: - { - byte tmp[] = {0x00,0x22,0x41,0xA4,0x05,0x83,0x03,0x80,authKey,0x00}; - try { - card->runCommand( MAKEVECTOR(tmp) ); - } catch( CardError e ) { - throw std::runtime_error( "step23 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime23: " << e.what(); - throw std::runtime_error( "step23 runtime error" ); - } - break; - } - case 24: - { - serverStep = 9; - byte tmp[21]; - memcpy( (void*)tmp, result, 21 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = r.size() ? QByteArray( (char*)&r[0], r.size() ) : ""; - } catch( CardError e ) { - throw std::runtime_error( "step24 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime24: " << e.what(); - throw std::runtime_error( "step24 runtime error" ); - } - if ( result.isEmpty() || result.size() != 14 ) - throw std::runtime_error( "step24a" ); - - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 19 ) - throw std::runtime_error( "step24b" ); - break; - } - case 25: - { - byte tmp[18]; - memcpy( (void*)tmp, result, 18 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step25 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime25: " << e.what(); - throw std::runtime_error( "step25 runtime error" ); - } - if ( result.isEmpty() || result.size() != 147 || result.size() < 134 ) - throw std::runtime_error( "step25a" ); - - QByteArray tmpResult = result; - - result = QByteArray::fromHex( queryServer( s, result ).remove( 0, 16 ) ); - if ( result.isEmpty() || result.size() != 114 ) - throw std::runtime_error( "step25b" ); - - if ( (unsigned char)tmpResult.at( 132 ) == 0x34 && (unsigned char)tmpResult.at( 133 ) >= 0x80 ) - { - runStep( 3 ); - runStep( 4 ); - runStep( 11 ); - runStep( 13 ); - runStep( 14 ); - runStep( 15 ); - runStep( 16 ); - runStep( 17 ); - step = 21; - } - break; - } - case 26: - runStep( 3 ); - break; - case 27: - runStep( 4 ); - break; - case 28: - { - card->selectEF( 0xAACE ); - break; - } - case 29: - { - memcpy( (void*)certInfo[0], result, result.size() ); - char request[] = { 0x4F, 0x4B }; - for ( int i = 1;; i++ ) - { - result = QByteArray::fromHex( queryServer( s, QByteArray( (char*)&request, 2 ) ).remove( 0, 16 ) ); - if ( result.isEmpty() || ( result.size() != 114 && result.size() != 39 ) ) - throw std::runtime_error( "step29" ); - memcpy( (void*)certInfo[i], result, result.size() ); - if ( result.size() == 39 ) - break; - } - break; - } - case 30: - { - for ( int i = 0; i < 16; i++ ) - { - byte tmp[113]; - memcpy( (void*)tmp, certInfo[i], 113 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step30 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime30: " << e.what(); - throw std::runtime_error( "step30 runtime error" ); - } - - if ( result.isEmpty() || result.size() != 14 ) - throw std::runtime_error( "step30" ); - } - break; - } - case 31: - { - card->selectEF( 0xDDCE ); - break; - } - case 32: - { - for ( int i = 16; i < 32; i++ ) - { - byte tmp[113]; - memcpy( (void*)tmp, certInfo[i], 113 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step32 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime32: " << e.what(); - throw std::runtime_error( "step32 runtime error" ); - } - - if ( result.isEmpty() || result.size() != 14 ) - throw std::runtime_error( "step32" ); - } - if ( !generateKeys ) - step = 36;//done - break; - } - case 33: - { - card->selectEF( 0x0033 ); - break; - } - case 34: - { - byte tmp[38]; - memcpy( (void*)tmp, certInfo[32], 38 ); - try { - ByteVec r = card->runCommand( MAKEVECTOR(tmp) ); - result = QByteArray( (char*)&r[0], r.size() ); - } catch( CardError e ) { - throw std::runtime_error( "step34 card error: " + e.desc ); - } catch( std::runtime_error e ) { - qDebug() << "runtime34: " << e.what(); - throw std::runtime_error( "step34 runtime error" ); - } - - if ( result.isEmpty() || result.size() != 14 ) - throw std::runtime_error( "step34" ); - - result = queryServer( s, result ).remove( 0, 16 ); - break; - } - default: - result = queryServer( s, result ); - } - return result; -} - -QByteArray CertUpdate::queryServer( int s, QByteArray result ) -{ - if ( !checkConnection() ) - throwError( tr("Check internet connection").toUtf8() ); - - const char serviceCode[] = { 0x31, 0x00 }; - QByteArray packet; - - serverStep++; - - switch( s ) - { - case 0: - { - std::string id = card->readDocumentID(); - memcpy( (void*)documentNumber, id.c_str(), id.size() ); - - char query[HEADER+44]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 44 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[28], card->readCardID().c_str(), 11 ); - memcpy( (void*)&query[39], documentNumber, 8 ); - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 6: - { - char query[HEADER+39]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 39 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], personCode, 11 ); - const char tmp[] = { generateKeys ? 0x01 : 0x00 }; - memcpy( (void*)&query[47], tmp, 1 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 9: - { - char query[HEADER+33]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 33 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 33 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 16: - { - char query[HEADER+36]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 36 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 36 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 17: - { - char query[HEADER+48]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 48 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 48 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 20: - case 24: - { - char query[HEADER+14]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 14 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 14 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 21: - case 25: - { - char query[HEADER+147]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 147 ), 3 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 147 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 29: - { - char query[HEADER+2]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 2 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 2 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - case 34: - { - char query[HEADER+14]; - memset( query, 0, sizeof(query)); - memcpy( (void*)query, serviceCode, 2 ); - memcpy( (void*)&query[2], QByteArray::number( serverStep ), 2 ); - memcpy( (void*)&query[4], QByteArray::number( 14 ), 2 ); - memcpy( (void*)&query[12], documentNumber, 8 ); - memcpy( (void*)&query[20], challenge, 8 ); - memcpy( (void*)&query[28], result, 14 ); - - packet = QByteArray( (char*)query, sizeof( query ) ).toHex(); - break; - } - default: - return QByteArray(); - } - qDebug() << "step " << s << " serverStep: " << serverStep << " send: " << packet.toUpper(); - QByteArray data = "POST "; - data += updateUrl.path(); - data += " HTTP/1.1\r\nHost: "; - data += updateUrl.host(); - data += "\r\nContent-Type: text/plain\r\nContent-Length: " + QByteArray::number(packet.size()) + "\r\nConnection: close\r\n\r\n" + packet.toUpper() + "\r\n"; - sock->write( data ); - if ( !sock->waitForReadyRead( 60000 ) ) - { - qDebug() << sock->errorString(); - return result; - } - result = sock->readAll(); - if ( result.contains( "\r\n\r\n" ) ) - result = result.remove( 0, result.indexOf( "\r\n\r\n" ) + 4 ); - qDebug() << "step " << s << " serverStep: " << serverStep << " receive: " << result; - sock->disconnectFromHost(); - - //veakoodide kontroll - QByteArray hex = QByteArray::fromHex( result ); - if ( hex.size() > 4 ) - { - switch( hex.at(4) ) - { - case 0x01: throw std::runtime_error( tr( "Server sai vale arvu baite, samm: %1" ).arg( s ).toStdString() ); - case 0x02: - case 0x03: - case 0x07: - case 0x08: throw std::runtime_error( tr( "Serveri ts tekkisid vead, samm: %1" ).arg( s ).toStdString() ); - case 0x04: throw std::runtime_error( tr( "Kaardi vastuse parsimisel tekkis viga, samm: %1" ).arg( s ).toStdString() ); - case 0x05: throw std::runtime_error( tr( "Sertifitseerimiskeskus ei vasta, samm: %1" ).arg( s ).toStdString() ); - } - } - return result; -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.h qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.h 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/CertUpdate.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include -#include -#include - -#include "jscardmanager.h" -#include - -class CertUpdate: public QObject -{ - Q_OBJECT - -public: - - CertUpdate( int reader, QObject *parent = 0 ); - ~CertUpdate(); - - bool checkUpdateAllowed(); - void startUpdate(); - -private: - void throwError( const QString &msg ); - - QString m_pin; - EstEidCard *card; - PCSCManager *cardMgr; - QTcpSocket *sock; - char challenge[8]; - char personCode[11], documentNumber[8], tmpResult[36], certInfo[33][114]; - int step, serverStep, authKey, signKey; - bool generateKeys; - QByteArray step10; - - bool checkConnection() const; - QByteArray runStep( int step, QByteArray result = "" ); - QByteArray queryServer( int step, QByteArray result ); - JsCertData *m_authCert; - QUrl updateUrl; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.cpp 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,288 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "DiagnosticsDialog.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#if defined(Q_OS_WIN32) -#include -#elif defined(Q_OS_LINUX) -#include -#elif defined(Q_OS_MAC) -#include -#include -#endif - -DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) -: QDialog( parent ) -{ - setupUi( this ); - setAttribute( Qt::WA_DeleteOnClose, true ); - - QString info; - QTextStream s( &info ); - - s << "" << tr("ID-card utility version:") << " "; - s << QCoreApplication::applicationVersion() << "
"; - - s << "" << tr("OS:") << " "; -#if defined(Q_OS_WIN32) - OSVERSIONINFOEX osvi; - ZeroMemory( &osvi, sizeof( OSVERSIONINFOEX ) ); - osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFOEX ); - if( !GetVersionEx( (OSVERSIONINFO *) &osvi) ) - { - switch( QSysInfo::WindowsVersion ) - { - case QSysInfo::WV_2000: s << "Windows 2000"; break; - case QSysInfo::WV_XP: s << "Windows XP"; break; - case QSysInfo::WV_2003: s << "Windows 2003"; break; - case QSysInfo::WV_VISTA: s << "Windows Vista"; break; - case QSysInfo::WV_WINDOWS7: s << "Windows 7"; break; - default: s << "Unknown version (" << QSysInfo::WindowsVersion << ")"; - } - } else { - switch( osvi.dwMajorVersion ) - { - case 5: - { - switch( osvi.dwMinorVersion ) - { - case 0: - s << "Windows 2000 "; - s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Professional" : "Server" ); - break; - case 1: - s << "Windows XP "; - s << ( osvi.wSuiteMask & VER_SUITE_PERSONAL ? "Home" : "Professional" ); - break; - case 2: - if ( GetSystemMetrics( SM_SERVERR2 ) ) - s << "Windows Server 2003 R2"; - else if ( osvi.wProductType == VER_NT_WORKSTATION ) - s << "Windows XP Professional"; - else - s << "Windows Server 2003"; - break; - } - break; - } - case 6: - { - switch( osvi.dwMinorVersion ) - { - case 0: s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008" ); break; - case 1: s << ( osvi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2" ); break; - } - break; - } - default: s << "Unknown version (" << QSysInfo::WindowsVersion << ")"; - } - } -#elif defined(Q_OS_LINUX) - QProcess p; - p.start( "lsb_release", QStringList() << "-s" << "-d" ); - p.waitForReadyRead(); - s << p.readAll(); -#elif defined(Q_OS_MAC) - SInt32 major, minor, bugfix; - - if(Gestalt(gestaltSystemVersionMajor, &major) == noErr && Gestalt(gestaltSystemVersionMinor, &minor) == noErr && Gestalt(gestaltSystemVersionBugFix, &bugfix) == noErr) { - s << "Mac OS " << major << "." << minor << "." << bugfix; - } else { - s << "Mac OS 10.3"; - } -#endif - -#if defined(Q_OS_WIN) - QString bits = "32"; - typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); - LPFN_ISWOW64PROCESS fnIsWow64Process; - BOOL bIsWow64 = false; - //check if kernel32 supports this function - fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress( GetModuleHandle(TEXT("kernel32")), "IsWow64Process" ); - if ( fnIsWow64Process != NULL ) - { - if ( fnIsWow64Process( GetCurrentProcess(), &bIsWow64 ) ) - if ( bIsWow64 ) - bits = "64"; - } else { - SYSTEM_INFO sysInfo; - GetSystemInfo( &sysInfo ); - if ( sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ) - bits = "64"; - } - s << " (" << bits << ")

"; -#else - s << " (" << QSysInfo::WordSize << ")

"; -#endif - - s << "" << tr("Library paths:") << " "; - s << QCoreApplication::libraryPaths().join( ";" ) << "
"; - - s << "" << tr("Libraries") << "
"; -#if defined(Q_OS_WIN32) - s << getLibVersion( "advapi32") << "
"; - s << getLibVersion( "libeay32" ) << "
"; - s << getLibVersion( "ssleay32" ) << "
"; -#elif defined(Q_OS_MAC) - s << getLibVersion( "PCSC" ) << "
"; -#elif defined(Q_OS_LINUX) - s << getLibVersion( "pcsclite" ) << "
"; - s << getLibVersion( "ssl" ) << "
"; - s << getLibVersion( "crypto" ) << "
"; -#endif - s << getLibVersion( "opensc-pkcs11" ) << "
"; - s << "QT (" << qVersion() << ")
"; - s << "
"; - -#if defined(Q_OS_WIN32) - s << "" << tr("Smart Card service status: ") << ""; -#else - s << "" << tr("PCSC service status: ") << ""; -#endif - s << " " << (isPCSCRunning() ? tr("Running") : tr("Not running")); - s << "

"; - - s << "" << tr("Card readers") << "
"; - s << getReaderInfo(); - s << "
"; - - diagnosticsText->setHtml( info ); -} - -QString DiagnosticsDialog::getLibVersion( const QString &lib ) const -{ - try - { - return QString( "%1 (%2)" ).arg( lib ) - .arg( QString::fromStdString( DynamicLibrary( lib.toLatin1() ).getVersionStr() ) ); - } - catch( const std::runtime_error & ) - { return tr("%1 - failed to get version info").arg( lib ); } -} - -QString DiagnosticsDialog::getReaderInfo() const -{ - QString d; - QTextStream s( &d ); - - QHash readers; - PCSCManager *m = 0; - QString reader; - try { - m = new PCSCManager(); - int readersCount = m->getReaderCount( true ); - for( int i = 0; i < readersCount; i++ ) - { - reader = QString::fromStdString( m->getReaderName( i ) ); - if ( !QString::fromStdString( m->getReaderState( i ) ).contains( "EMPTY" ) ) - { - EstEidCard card( *m ); - card.connect( i ); - readers[reader] = tr( "ID - %1" ).arg( QString::fromStdString( card.readCardID() ) ); - } - else - readers[reader] = ""; - } - } catch( const std::runtime_error &e ) { - readers[reader] = tr("Error reading card data:") + e.what(); - } - delete m; - - for( QHash::const_iterator i = readers.constBegin(); - i != readers.constEnd(); ++i ) - { - s << "* " << i.key(); - if( !i.value().isEmpty() ) - s << "

" << i.value() << "

"; - else - s << "
"; - } - - return d; -} - -#if defined(Q_OS_WIN32) -bool DiagnosticsDialog::isPCSCRunning() const -{ - bool result = false; - SC_HANDLE h = OpenSCManager( NULL, NULL, SC_MANAGER_CONNECT ); - if( h ) - { - SC_HANDLE s = OpenService( h, "SCardSvr", SERVICE_QUERY_STATUS ); - if( s ) - { - SERVICE_STATUS status; - QueryServiceStatus( s, &status ); - result = (status.dwCurrentState == SERVICE_RUNNING); - CloseServiceHandle( s ); - } - CloseServiceHandle( h ); - } - return result; -} -#elif defined(Q_OS_LINUX) -bool DiagnosticsDialog::isPCSCRunning() const -{ - QProcess p; - p.start( "pidof", QStringList() << "pcscd" ); - p.waitForFinished(); - return !p.readAll().trimmed().isEmpty(); -} -#elif defined(Q_OS_MAC) -bool DiagnosticsDialog::isPCSCRunning() const -{ - QProcess p; - p.start( "sh -c \"ps ax | grep -v grep | grep pcscd\"" ); - p.waitForFinished(); - return !p.readAll().trimmed().isEmpty(); -} -#else -bool DiagnosticsDialog::isPCSCRunning() const { return true; } -#endif - -void DiagnosticsDialog::save() -{ - QString filename = QFileDialog::getSaveFileName( this, tr("Save as"), QString( "%1%2qesteidutil_diagnostics.txt" ) - .arg( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) ).arg( QDir::separator() ), - tr("Text files (*.txt)") ); - if( filename.isEmpty() ) - return; - QFile f( filename ); - if( f.open( QIODevice::WriteOnly ) ) - { - QTextStream( &f ) << diagnosticsText->toPlainText(); - f.close(); - } - else - QMessageBox::warning( this, tr("Error occurred"), tr("Failed write to file!") ); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.h qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/DiagnosticsDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include "ui_DiagnosticsDialog.h" - -class DiagnosticsDialog: public QDialog, private Ui::DiagnosticsDialog -{ - Q_OBJECT -public: - DiagnosticsDialog( QWidget *parent = 0 ); - -private slots: - void save(); - -private: - bool isPCSCRunning() const; - QString getLibVersion( const QString &lib ) const; - QString getReaderInfo() const; -}; Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/button.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/button.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/buttonSelected.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/buttonSelected.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/digidoc_icon_16x16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/digidoc_icon_16x16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/digidoc_icon_32x32.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/digidoc_icon_32x32.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_english.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_english.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_estonian.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_estonian.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_russian.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/flag_russian.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_16x16.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_16x16.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_32x32.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_32x32.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_48x48.ico and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_48x48.ico differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_48x48.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_48x48.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_big.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/id_icon_big.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/linegray.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/linegray.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/logo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/logo.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/logotext.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/logotext.png differ Binary files /tmp/O7i4lJx5Ki/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/topLogo.png and /tmp/D1Zciv5vzN/qesteidutil-0.3.1/=unpacked-tar1=/src/html/images/topLogo.png differ diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/html/index.html qesteidutil-0.3.1/=unpacked-tar1=/src/html/index.html --- qesteidutil-0.3.1/=unpacked-tar1=/src/html/index.html 2011-10-12 18:12:02.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,455 +0,0 @@ - - - - - - - - -
-
- -
-
    -
  • -
  • -
  • -
-
- -
- -
-
-
 
- -
 
-
 
-
-
    -
  • :
  • - -
  • :
  • -
  • :
  • -
  • :
  • -
  • :
  • -
-
-
- -
-
- -
-
-
    -
  • -
  • -
  • -
  • -
-
-
-
    -
  • -
  • -
  • -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/html/lang.js qesteidutil-0.3.1/=unpacked-tar1=/src/html/lang.js --- qesteidutil-0.3.1/=unpacked-tar1=/src/html/lang.js 2011-05-26 08:56:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/html/lang.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,261 +0,0 @@ -var defaultLanguage = "et"; -var language = defaultLanguage; - -var helpUrl_et = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp"; -var helpUrl_en = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp?wl=en"; -var helpUrl_ru = "http://code.google.com/p/esteid/wiki/QEsteidUtilHelp?wl=ru"; - -//code: (est, eng, rus) -var htmlStrings = { - "Active": new tr( "sertifikaadid on aktiivsed ja Mobiil-ID kasutamine on võimalik.", "certificates are active and Mobile-ID is usable.", "сертификаты активны, и использование Modiil-ID возможно." ), - "Not Active": new tr( "sertifikaadid on aktiveerimata, Mobiil-ID kasutamiseks on vajalik sertifikaatide aktiveerimine.", "certificates are inactive, to use Mobile-ID certificates must be activated.", "сертификаты не активированы, для использования Mobiil-ID требуется активация сертификатов." ), - "Suspended": new tr( "sertifikaadid on peatatud, Mobiil-ID kasutamiseks on vajalik peatatuse lõpetamine.", "certificates are suspended. To use Mobile-Id these must be active.", "сертификаты приостановлены, для использования Mobiil-ID следует их возобновить." ), - "Revoked": new tr( "sertifikaadid on tunnistatud kehtetuks. Mobiil-ID kasutamiseks on vajalik hankida operaatorilt uus Mobiil-ID SIM kaart.", "certificates are revoked. To use Mobile-ID, a new SIM card must be requested from service provider.", "сертификаты признаны недействительными. Для использования Mobiil-ID следует взять новую Mobiil-ID SIM карту у оператора." ), - "Unknown": new tr( "sertifikaadi olek teadmata.", "certificates status is unknown", "состояние сертификата неизвестно." ), - "Expired": new tr( "sertifikaadid on aegunud. Vajalik on operaatorilt uue SIM kaardi hankimine.", "certificates are expired. New SIM card has to be requested from Service provider.", "сертификаты устарели. У оператора следует взять новую SIM карту." ), - "mobileNoCert": new tr( "Kasutajal puuduvad Mobiil-ID sertifikaadid!", "User has no Mobile-ID certificates.", "У пользователя отсутствуют Mobiil-ID сертификаты!" ), - "mobileNotActive": new tr( "Kasutaja Mobiil-id sertifikaadid ei ole aktiivsed, info kuvamine ei ole võimalik!", "Mobile-id not active. Not possible to display info.", "Пользовательские сертификаты ID-карты неактивны, получение информации невозможно!" ), - "mobileInternalError": new tr( "Teenuse sisemine viga!", "Service internal error!", "Внутренняя ошибка услуги!" ), - "mobileInterfaceNotReady": new tr( "Liides ei ole veel töökorras!", "Mobile interface not ready!", "Интерфейс ещё не работает!" ), - "noIDCert": new tr( "Server ei suutnud lugeda või valideerida ID-kaardi sertifikaati!", "Server could not read or validate ID card certificate!", "Сервер не смог прочитать или распознать сертификат ID карты!"), - - "linkDiagnostics": new tr( "Diagnostika", "Diagnostics", "Диагностика" ), - "linkSettings": new tr( "Seaded", "Settings", "Настройки" ), - "linkHelp": new tr( "Abi", "Help", "Помощь" ), - - "personName": new tr( "Nimi", "Name", "Имя" ), - "personCode": new tr( "Isikukood", "Personal Code", "Личный номер" ), - "regcode": new tr( "Registrikood", "Reg nr", "Регистрационный номер" ), - "personBirth": new tr( "Sündinud", "Birth", "День рождения" ), - "personCitizen": new tr( "Kodakondsus", "Citizenship", "Гражданство" ), - "personEmail": new tr( "E-post", "E-mail", "Эл. почта" ), - - "labelCardInReaderID": new tr( "Lugejas on ID-kaart", "Card in reader", "Карта в считывателе" ), - "labelThisIs": new tr( "See on", "This is", "Это" ), - "labelIsValid": new tr( "kehtiv", "valid", "действующий" ), - "labelIsInValid": new tr( "kehtetu", "expired", "недействителен" ), - "labelDocument": new tr( "dokument", "document", "документ" ), - "labelCardValidTill": new tr( "Kaart on kehtiv kuni ", "Card is valid till ", "Карта действительна до " ), - "labelCardGetNew": new tr( "Juhised uue ID-kaardi taotlemiseks leiad siit", "Instructions how to get a new ID card you can find here", "Инструкции по ходатайству новой ID карты находятся здесь" ), - - "labelAuthCert": new tr( "Isikutuvastamise sertifikaat", "Authentication certificate", "Идент. сертификат" ), - "labelSignCert": new tr( "Allkirjastamise sertifikaat", "Signature certificate", "Сертификат подписи" ), - "labelCertIs": new tr( "Sertifikaat on", "Certificate is", "Сертификат" ), - "labelCertIsValidTill": new tr( "Sertifikaat kehtib kuni", "Certificate is valid till", "Сертификат действителен до" ), - "labelCertWillExpire": new tr( "Sertifikaat aegub %d päeva pärast", "Certificate will expire in %d days", "Сертификат истекает через %d дня" ), - "labelAuthUsed": new tr( "Sertifikaati on kasutatud isikutuvastamiseks", "Authentication certificate has been used", "Сертификат использован для аутентикации" ), - "labelSignUsed": new tr( "Sertifikaati on kasutatud allkirjastamiseks", "Signature certificate has been used", "Сертификат использован для подписи" ), - "labelTimes": new tr( "korda", "times", "раз" ), - - "labelCertBlocked": new tr( "Sertifikaat on blokeeritud.", "Certificate is blocked.", "Сертификат заблокирован." ), - "labelAuthKeyBlocked": new tr( "Selle ID-kaardiga ei ole hetkel võimalik autentida, kuna PIN1 koodi on sisestatud 3 korda valesti.", "It is not possible to authenticate with this ID-card, because PIN1 was inserted 3 times incorrectly.", "С данной ID-картой невозможно идентифицироваться, т.к. PIN1 был введён 3 раза неверно." ), - "labelSignKeyBlocked": new tr( "Selle ID-kaardiga ei ole hetkel võimalik anda digitaalallkirja, kuna PIN2 koodi on sisestatud 3 korda valesti.", "It is not possible to digitally sign with this ID-card, because PIN2 was inserted 3 times incorrectly.", "С данной ID-картой невозможно создать цифровую подпись, т.к. PIN2 был введён 3 раза неверно." ), - "labelAuthCertBlocked": new tr( "Isikutuvastamise sertifikaat on blokeeritud.", "Authentication certificate is blocked." , "Идентификационный сертификат заблокирован." ), - "labelSignCertBlocked": new tr( "Allkirjastamise sertifikaat on blokeeritud.", "Signing certificate is blocked.", "Сертификат подписи заблокирован." ), - "labelCertUnblock": new tr( "Sertfikaadi blokeeringu tühistamiseks sisesta kaardi PUK kood.", "To unblock certificate you have to enter PUK code.", "Для разблокировки сертификата введите PUK код." ), - "labelCertUnblock1": new tr( "PUK koodi leiad ID-kaardi koodiümbrikus, kui sa pole seda vahepeal muutnud.", "You can find your PUK code inside ID-card codes envelope.", "PUK код находится в конверте с кодами, который выдаётся при получении ID-карты или смене сертификатов." ), - "labelCertUnblock2": new tr( "Kui sa ei tea oma ID-kaardi PUK koodi, külasta klienditeeninduspunkti, kust saad uue koodiümbriku.", "If you do not know PUK code for your ID-card, please visit service center where you can get the new codes.", "Если вы не знаете PUK код своей ID-карты, посетите центр обслуживания, где вы сможете получить конверт с кодами." ), - - "labelChangingPIN1": new tr( "PIN1 koodi vahetus", "Change PIN1 code", "Замена PIN1 кода" ), - "labelChangingPIN11": new tr( "PIN1 koodi kasutatakse isikutuvastamise sertifikaadile juurdepääsemiseks.", "PIN1 code is used for accessing identification certificates.", "PIN1 код, используемый для доступа к сертификатам индентификации личности." ), - "labelChangingPIN12": new tr( "Kui sisestad PIN1 koodi kolm korda valesti, siis isikutuvastamise sertifikaat blokeeritakse ning ID-kaarti pole võimalik isikutuvastamiseks kasutada enne blokeeringu tühistamist PUK koodi abil.", "If PIN1 is inserted 3 times inccorectly, then identification certificate will be blocked and it will be impossible to use ID-card to verify identification, until it is unblocked via PUK code.", "Если PIN1 введён 3 раза неверно, тогда блокируется идентификационный сертификат и использовать ID- карту невозможно, пока блокировка не снята PUK кодом." ), - "labelChangingPIN13": new tr( "Kui olete unustanud PIN1 koodi, kuid teate PUK koodi, siis siin saate määrata uue PIN1 koodi.", "If you have forgotten PIN1, but know PUK, then here you can enter new PIN1.", "Если вы забыли PIN1, при помощи PUK кода можно ввести новый PIN1 код." ), - "linkPIN1withPUK": new tr( "Muuda PIN1 kood PUK koodi abil", "Change PIN1 using PUK code", "Изменить PIN1 код с помощью PUK кода" ), - - "labelChangingPIN2": new tr( "PIN2 koodi vahetus", "Change PIN2 code", "Смена кода PIN2" ), - "labelChangingPIN21": new tr( "PIN2 koodi kasutatakse digitaalallkirja andmiseks.", "PIN2 code is used to digitally sign documents.", "PIN2 код, что используется для дигитальной подписи." ), - "labelChangingPIN22": new tr( "Kui sisestad PIN2 koodi kolm korda valesti, siis allkirjastamise sertifikaat blokeeritakse ning ID-kaarti pole võimalik allkirjastamiseks kasutada enne blokeeringu tühistamist PUK koodi abil.", "If PIN2 is inserted 3 times inccorectly, then signing certificate will be blocked and it will be impossible to use ID-card for digital signing, until it is unblocked via PUK code.", "Если PIN2 введён 3 раза неверно, тогда блокируется сертификат цифровой подписи и использовать ID- карту для цифровой подписи невозможно, пока блокировка не снята PUK кодом." ), - "labelChangingPIN23": new tr( "Kui olete unustanud PIN2 koodi, kuid teate PUK koodi, siis siin saate määrata uue PIN2 koodi.", "If you have forgotten PIN2, but know PUK, then here you can enter new PIN2.", "Если забыли PIN2 код, но знаете PUK код, тогда можете создать новый PIN2 код." ), - "linkPIN2withPUK": new tr( "Muuda PIN2 kood PUK koodi abil", "Change PIN2 using PUK code", "Изменить PIN2 код с помощью PUK кода" ), - - "labelChangingPUK": new tr( "PUK koodi vahetus", "Change PUK code", "Смена PUK кода" ), - "labelChangingPUK2": new tr( "Kui peale vahetamist PUK kood läheb meelest ära ja sertifikaat jääb blokeerituks kolme vale PIN1 või PIN2 sisetamise järel, siis ainus võimalus ID-kaart jälle tööle saada on pöörduda klienditeeninduspunkti poole.", "If you forget PUK code or certificates remain unblocked, then it is needed to turn to service provider to get your ID-card working again.", "Если после смены PUK код забывается и сетрификат блокируется из-за неверно введённых PIN1 или PIN2, то единственной возможностью восстановить работоспособность ID- карты, это обратиться в бюро обслуживания." ), - - "labelInputPUK": new tr( "PUK koodi abil saab tühistada sertifikaadi blokeeringu, kui PIN1 või PIN2 koodi on 3 korda järjest valesti sisestatud.", "PUK code ise used for unblocking certificates, when PIN1 or PIN2 has been entered 3 times incorrectly.", "PUK код - это код, разблокирующий заблокированные сертификаты, если код PIN1 или PIN2 был введён неверно 3 раза подряд." ), - "labelInputPUK2": new tr( "PUK kood on kirjas koodiümbrikus, mida väljastatakse koos ID-kaardiga või sertifikaatide vahetamisel.", "PUK code is written in the envelpole, that was given with the ID-card or when certificates were changed.", "PUK код находится в конверте с кодами, который выдаётся при получении ID-карты или смене сертификатов." ), - "labelPUKBlocked": new tr( "PUK kood on blokeeritud!
Uue PUK koodi saamiseks, külasta klienditeeninduspunkti, kust saad koodiümbriku uute koodidega. Lisainfo", "PUK code is blocked!
For getting new PUK code for your ID-card, please visit service center where you can get the new codes. Additional information", "PUK код заблокирован!
Для получения нового PUK кода для своей ID-карты, посетите центр обслуживания, где вы сможете получить конверт с кодами. Дополнительная информация" ), - - "inputCert": new tr( "Sertifikaadid", "Certificates", "Сертификаты" ), - "inputEmail": new tr( "@eesti.ee e-post", "@eesti.ee e-mail", "@eesti.ee" ), - "inputActivateEmail": new tr( "Aktiveeri @eesti.ee e-post", "Activate @eesti.ee email", "Активируй @eesti.ee эл. почту" ), - "inputCheckEmails": new tr( "Kontrolli @eesti.ee e-posti seadistust", "Check your @eesti.ee email settings", "Проверь настройки эл. почты @eesti.ee" ), - "emailCheckID": new tr( "E-posti seadistamine on lubatud ainult ID-kaardiga.", "It is possible to change email settings only with an ID-card.", "Настройка эл. почты возможна только с ID-картой." ), - "inputMobile": new tr( "Mobiil-ID", "Mobile-ID", "Mobiil-ID" ), - "inputActivateMobile": new tr( "Aktiveeri Mobiil-ID teenus", "Activate Mobile-ID", "Активируй услугу Mobiil-ID" ), - "inputCheckMobile": new tr( "Kontrolli Mobiil-ID staatust", "Check Mobile-ID status", "Проверь статус Mobiil-ID" ), - "inputPUK": new tr( "PUK kood", "PUK code", "PUK код" ), - - "inputChange": new tr( "Muuda", "Change", "Изменить" ), - "inputCancel": new tr( "Tühista", "Cancel", "Отмена" ), - "inputChangePIN1": new tr( "Muuda PIN1", "Change PIN1", "Поменять PIN1" ), - "inputChangePIN2": new tr( "Muuda PIN2", "Change PIN2", "Поменять PIN2" ), - "inputChangePUK": new tr( "Muuda PUK", "Change PUK", "Поменять PUK" ), - "inputCertDetails": new tr( "Vaata üksikasju", "View details", "Просмотреть детали" ), - "inputUpdateCert": new tr( "Uuenda sertifikaat", "Update certificate", "Обнови сертификат" ), - "inputUnblock": new tr ( "Tühista blokeering", "Revoke blocking", "Отменить блокировку" ), - - "labelCurrentPIN1": new tr( "Kehtiv PIN1 kood", "Current PIN1 code", "Действующий PIN1 код" ), - "labelNewPIN1": new tr( "Uus PIN1 kood", "New PIN1 code", "Новый PIN1 код" ), - "labelNewPIN12": new tr( "Uus PIN1 kood uuesti", "Repeat new PIN1 code", "Новый PIN1 код заново" ), - "labelCurrentPIN2": new tr( "Kehtiv PIN2 kood", "Current PIN2 code", "Действующий PIN2 код" ), - "labelNewPIN2": new tr( "Uus PIN2 kood", "New PIN2 code", "Новый PIN2 код" ), - "labelNewPIN22": new tr( "Uus PIN2 kood uuesti", "Repeat new PIN2 code", "Новый PIN2 код заново" ), - "labelCurrentPUK": new tr( "Kehtiv PUK kood", "Current PUK code", "Действующий PUK код" ), - "labelNewPUK": new tr( "Uus PUK kood", "New PUK code", "Новый PUK код" ), - "labelNewPUK2": new tr( "Uus PUK kood uuesti", "Repeat new PUK code", "Новый PUK код заново" ), - "labelPUK": new tr( "PUK kood", "PUK code", "PUK код" ), - - "labelEmailAddress": new tr( "E-posti aadress, kuhu suunatakse sinu @eesti.ee kirjad", "Email addres where your @eesti.ee emails will be forwarded", "Адрес эл. почты, куда перенаправляют Вашу почту с @eesti.ee" ), - "labelEmailUrl": new tr( "Täiuslikuma ametliku e-posti suunamise häälestamisvahendi leiad portaalist", "For more detailed official email address forwarding, please visit", "Более подробную информацию по настройке пересылки электронной почты найдёте на портале eesti.ee" ), - - "labelMobile": new tr( "Mobiil-ID on võimalus kasutada isikutuvastamiseks ja digitaalallkirja andmiseks ID-kaardi asemel mobiiltelefoni.", "Mobile-id is possibility to use mobile phone instead of ID-card for identification and digital signing.", "Mobiil-ID - это возможность идентифицировать личность и ставить цифровую подпись при помощи мобильного телефона, наравне с ID-картой." ), - "labelMobile2": new tr( "Mobiil-ID kasutamiseks on vajalik uus SIM-kaart, mille sa saad endale mobiilsideoperaatori käest. Kui selline kaart on sul juba olemas, tuleb teenus aktiveerida.", "To use Mobile-id it is needed to use a SIM card that supports this feature. If such a SIM card is already purchased, then it has to be activated.", "Для пользования Mobiil-ID вам понадобится SIM-карта с поддержкой этой технологии. Новую карту можно получить у вашего мобильного оператора. Если такая карта уже установлена, следует активировать услугу." ), - "labelMobileReadMore": new tr( "Loe täpsemalt id.ee kodulehelt", "More info from id.ee", "Подробности - на портале id.ee" ), - "mobileNumber": new tr( "Mobiili number", "Mobile number", "Номер моб. телефона" ), - "mobileOperator": new tr( "Mobiili operaator", "Mobile operator", "Оператор моб. телефона" ), - "mobileStatus": new tr( "Staatus", "Mobile status", "Статус" ), - - "errorFound": new tr( "Tekkis viga: ", "Error occurred: ", "Возникла ошибка:" ), - "loadEmail": new tr( "Laen e-posti seadeid", "Loading e-mail settings", "Загружаю настройки эл. почты" ), - "activatingEmail": new tr( "Aktiveerin e-posti seadeid", "Activating e-mail settings", "настройки эл. почты" ), - "forwardFailed": new tr( "E-posti suunamise aktiveerimine ebaõnnestus.", "Failed activating e-mail forwards.", "Активация перенаправления с эл. почты провалилась." ), - "loadFailed": new tr( "E-posti aadresside laadimine ebaõnnestus.", "Failed loading e-mail settings.", "Активация перенаправления с эл. почты провалилась" ), - "emailEnter": new tr( "E-posti aadress sisestamata või vigane!", "E-mail address missing or invalid!", "Введите адрес эл. почты!" ), - "loadPicture": new tr( "Lae pilt", "Load picture", "Загрузить фотографию" ), - "savePicture": new tr( "salvesta", "save", "сохранить" ), - "savePicFailed": new tr( "Pildi salvestamine ebaõnnestus!", "Saving picture failed!", "Сохранение картинки неуспешно!" ), - "loadPic": new tr( "Laen pilti", "Loading picture", "Загружаю фотографию" ), - "loadPicFailed": new tr( "Pildi laadimine ebaõnnestus!", "Loading picture failed!", "Загрузка картинки неуспешна!" ), - "loadPicFailed2": new tr( "Pildi laadimine ebaõnnestus - tundmatu pildiformaat!", "Loading picture failed - unknown picture format!", "Загрузка картинки неуспешна- неизвестный формат!" ), - "loadPicFailed3": new tr( "Pildi laadimine ebaõnnestus - viga salvestamisel!", "Loading picture failed - error saving file!", "Загрузка картинки неуспешна- ошибка при сохранении!" ), - "loadCardData": new tr( "Loen andmeid", "Reading data", "Данные считываются" ), - "updateCert": new tr( "Sertifikaatide uuendamine...", "Updating certificates", "Обновление сертификатов" ), - "updateCertOk": new tr( "Sertifikaatide uuendamine õnnestus", "Updating certificates successful", "Успешное обновление сертификатов" ) -}; - -//codes from eesti.ee -var eestiStrings = { - "0": new tr( "Toiming õnnestus", "Success", "Выполнение успешно!" ), - "1": new tr( "ID-kaart pole väljastatud riiklikult tunnustatud sertifitseerija poolt.", "ID-card has not been published by locally recognized verification provider.", "ID- карта не была выдана разрешённым сертифицирующим органом." ), - "2": new tr( "Sisestati vale PIN kood, katkestati PIN koodi sisestamine, tekkisid probleemid sertifikaatidega või puudub ID-kaardi tugi brauseris.","Wrong PIN was entered or cancelled, there was a problem with certificates or browser does not support ID-card.", "Ввели неверный PIN код, прервали введение PIN кода, возникли проблемы с сертификатами или отсутствует поддержка ID- карты в браузере." ), - "3": new tr( "ID-kaardi sertifikaat ei kehti.", "ID-card certificate is not valid.", "Сертификат ID- карты недействителен." ), - "4": new tr( "Sisemine on lubatud ainult Eesti isikukoodiga.", "Entrance is permitted only with Estonian personal code.", "Вход разрешён только с эстонским личным кодом." ), - "10": new tr( "Tundmatu viga.", "Unknown error", "Неизвестная ошибка." ), - "11": new tr( "KMA päringu tegemisel tekkis viga.", "There was an error with request to KMA." ,"В запросе КМА возникла ошибка." ), - "12": new tr( "Äriregistri päringu tegemisel tekkis viga.", "There was an error with request to Äriregister.", "В запросе к Äriregister возникла ошибка." ), - "20": new tr( "Ühtegi ametliku e-posti suunamist ei leitud.", "No official email forwarding adresses was found", "Не было найдено ни одной официальной пересылки эл. почты." ), - "21": new tr( "Teie e-posti konto on suletud. Avamiseks saatke palun e-kiri aadressil toimetaja@eesti.ee või helistage telefonil 663 0215.", "Your email account has been blocked. To open it, please send an e-mail to toimetaja@eesti.ee or call 663 0215.", "Ваша учётная запись эл. почты закрыта. Для открытия пошлите письмо на toimetaja@eesti.ee или позвоните по телефону 663 0215." ), - "22": new tr( "Vigane e-posti aadress.", "Invalid e-mail address", "Неверный адрес эл. почты." ), - "23": new tr( "Suunamine on salvestatud, ning sinule on saadetud kiri edasisuunamisaadressi aktiveerimisvõtmega. Suunamine on kasutatav ainult pärast aktiveerimisvõtme sisestamist.", "Forwarding is activated and you have been sent an email with activation key. Forwarding will be activated only after confirming the key.", "Переадресация сохранена и Вам послано письмо с ключом активации. Переадресация активна только после введения ключа." ) -}; - -var eidStrings = { - "noCard": new tr( "Ei leitud ühtegi ID-kaarti", "No card found", "Не найдена ID-карта" ), - "noReaders": new tr( "Ühtegi kiipkaardi lugejat pole ühendatud", "No readers found", "Считывающее устройство не обнаружено" ), - "certValid": new tr( "kehtiv ja kasutatav", "valid and applicable", "действителен и пригоден" ), - "certBlocked": new tr( "kehtetu", "expired", "недействительно" ), - "validBlocked": new tr( "kehtiv kuid blokeeritud", "valid but blocked", "действительно, но заблокировано" ), - "invalidBlocked": new tr( "kehtetu ja blokeeritud", "invalid and blocked", "недействительно и заблокировано" ), - - "PINCheck": new tr( "PIN1 ja PIN2 ei tohi sisaldada sünnikuupäeva ja -aastat", "PIN1 and PIN2 have to be different than date of birth or year of birth", "PIN1 и PIN2 не должны содержать дату рождения" ), - "PIN1Enter": new tr( "Sisesta kehtiv PIN1 kood", "Current PIN1 code", "Введите старый PIN1 код" ), - "PIN1Length": new tr( "PIN1 pikkus peab olema 4-12 numbrit", "PIN1 length has to be between 4 and 12", "Длина PIN1 должна быть 4-12 номера" ), - "PIN1InvalidRetry": new tr( "Vale PIN1 kood. Saad veel proovida %d korda.", "Wrong PIN1 code. You can try %d more times.", "Неверный PIN1 код. Попыток ещё: %d" ), - "PIN1Invalid": new tr( "Vale PIN1 kood.", "Wrong PIN1 code.", "Неверный PIN1 код." ), - "PIN1EnterNew": new tr( "Sisesta uus PIN1 kood", "Enter new PIN1 code", "Неверный PIN1 код. Попыток ещё" ), - "PIN1Retry": new tr( "Korda uut PIN1 koodi", "Retry your new PIN1 code", "Повторите новый PIN1 код" ), - "PIN1Different": new tr( "Uued PIN1 koodid on erinevad", "New PIN1 codes doesn't match", "Новые PIN1 коды не сходятся" ), - "PIN1Changed": new tr( "PIN1 kood muudetud!", "PIN1 changed!", "PIN1 код изменён!" ), - "PIN1Unsuccess": new tr( "PIN1 muutmine ebaõnnestus.", "Changing PIN1 failed", "Смена PIN1 кода неудачна." ), - "PIN1UnblockFailed": new tr( "Blokeeringu tühistamine ebaõnnestus.\nUus PIN peab erinema eelmisest PINist!", "Unblock failed.\nYour new PIN1 has to be different than current!", "Снятие блокировки неуспешно.\nНовый PIN должен отличаться от старого!" ), - "PIN1UnblockSuccess": new tr( "PIN1 kood on muudetud ja sertifikaadi blokeering tühistatud!", "PIN1 changed and you current sertificates blocking has been removed!", "PIN1 код изменён и сертификат разблокирован!" ), - "PIN1Blocked": new tr( "PIN1 blokeeritud.", "PIN1 blocked", "PIN1 заблокирован." ), - "PIN1NewOldSame": new tr( "Kehtiv ja uus PIN1 peavad olema erinevad!", "Old and new PIN1 has to be different!", "Старый и новый PIN1 должны отличаться!" ), - "PIN1ValidateFailed": new tr( "PIN1 koodi valideerimine ebaõnnestus", "PIN1 validation failed", "Не удалось распознать PIN1" ), - - "PIN2Enter": new tr( "Sisesta kehtiv PIN2 kood", "Current PIN2 code", "Введите старый PIN2 код" ), - "PIN2Length": new tr( "PIN2 pikkus peab olema 5-12 numbrit", "PIN2 length has to be between 5 and 12", "Длина PIN2 должна быть 5-12 номера" ), - "PIN2InvalidRetry": new tr( "Vale PIN2 kood. Saad veel proovida %d korda.", "Wrong PIN2 code. You can try %d more times.", "Неверный PIN2 код. Попыток ещё: %d" ), - "PIN2NewDifferent": new tr( "Uued PIN2 koodid on erinevad.", "New PIN2 codes doesn't match", "Новые PIN2 коды не сходятся" ), - "PIN2EnterNew": new tr( "Sisesta uus PIN2 kood.", "Enter new PIN2 code", "Неверный PIN2 код. Попыток ещё" ), - "PIN2Retry": new tr( "Korda uut PIN2 koodi.", "Retry your new PIN2 code", "Повторите новый PIN2 код" ), - "PIN2Different": new tr( "Uued PIN2 koodid on erinevad", "New PIN2 codes doesn't match", "Новые PIN2 коды не сходятся" ), - "PIN2Changed": new tr( "PIN2 kood muudetud!", "PIN2 changed!", "PIN2 код изменён!" ), - "PIN2Unsuccess": new tr( "PIN2 muutmine ebaõnnestus.", "Changing PIN2 failed", "Смена PIN2 кода неудачна." ), - "PIN2UnblockFailed": new tr( "Blokeeringu tühistamine ebaõnnestus.\nUus PIN peab erinema eelmisest PINist!", "Unblock failed.\nYour new PIN2 has to be different than current!", "Снятие блокировки неуспешно.\nНовый PIN должен отличаться от старого!" ), - "PIN2UnblockSuccess": new tr( "PIN2 kood on muudetud ja sertifikaadi blokeering tühistatud!", "PIN2 changed and you current sertificates blocking has been removed!", "PIN2 код изменён и сертификат разблокирован!" ), - "PIN2Blocked": new tr( "PIN2 blokeeritud.", "PIN2 blocked", "PIN2 заблокирован." ), - "PIN2NewOldSame": new tr( "Kehtiv ja uus PIN2 peavad olema erinevad!", "Old and new PIN2 has to be different!", "Старый и новый PIN2 должны отличаться!" ), - "PIN2ValidateFailed": new tr( "PIN2 koodi valideerimine ebaõnnestus", "PIN2 validation failed", "Не удалось распознать PIN2" ), - - "PUKEnter": new tr( "Sisesta PUK kood.", "Enter PUK code.", "Введите PUK код" ), - "PUKLength": new tr( "PUK koodi pikkus peab olema 8-12 numbrit.", "PUK length has to be between 8 and 12.", "Длина PUK должна быть 8-12 номера" ), - "PUKEnterOld": new tr( "Sisesta kehtiv PUK kood.", "Enter current PUK code.", "Введите старый PUK код" ), - "PUKEnterNew": new tr( "Sisesta uus PUK kood.", "Enter new PUK code.", "Неверный PUK код. Попыток ещё" ), - "PUKRetry": new tr( "Korda uut PUK koodi.", "Retry your new PUK code.", "Повторите новый PUK код" ), - "PUKDifferent": new tr( "Uued PUK koodid on erinevad", "New PUK codes doesn't match", "Новые PUK коды не сходятся" ), - "PUKChanged": new tr( "PUK kood muudetud!", "PUK changed!", "PUK код изменён!" ), - "PUKUnsuccess": new tr( "PUK koodi muutmine ebaõnnestus!", "Changing PUK failed!", "Смена PUK кода неудачна!" ), - "PUKInvalidRetry": new tr( "Vale PUK kood. Saad veel proovida %d korda.", "Wrong PUK code. You can try %d more times.", "Неверный PUK код. Попыток ещё: %d" ), - "PUKBlocked": new tr( "PUK kood blokeeritud.", "PUK blocked", "PUK заблокирован." ), - "PUKNewOldSame": new tr( "Kehtiv ja uus PUK peavad olema erinevad!", "Old and new PUK has to be different!", "Старый и новый PUK должны отличаться!" ), - "PUKValidateFailed": new tr( "PUK koodi valideerimine ebaõnnestus", "PUK validation failed", "Не удалось распознать PUK" ) -}; - -function selectLanguage() -{ - var select = document.getElementById('headerSelect'); - language = select.options[select.selectedIndex].value; - translateHTML(); - readCardData( true ); - extender.setLanguage( language ); - document.getElementById( 'forUpdate' ).innerHTML += "."; -} - -function tr( est, eng, rus ) -{ - this.et = est; - this.en = eng; - this.ru = rus; -} - -function _( code, defaultString ) -{ - if ( typeof htmlStrings[code] != "undefined" ) - { - if ( eval( "htmlStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "htmlStrings[\"" + code + "\"]." + language ) == "") - return eval( "htmlStrings[\"" + code + "\"]." + defaultLanguage ); - return eval( "htmlStrings[\"" + code + "\"]." + language ); - } else if ( typeof eidStrings[code] != "undefined" ) { - if ( eval( "eidStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "eidStrings[\"" + code + "\"]." + language ) == "" ) - return eval( "eidStrings[\"" + code + "\"]." + defaultLanguage ); - return eval( "eidStrings[\"" + code + "\"]." + language ); - } else if ( typeof eestiStrings[code] != "undefined" ) { - if ( eval( "eestiStrings[\"" + code + "\"]." + language ) == "undefined" || eval( "eestiStrings[\"" + code + "\"]." + language ) == "") - return eval( "eestiStrings[\"" + code + "\"]." + defaultLanguage ); - return eval( "eestiStrings[\"" + code + "\"]." + language ); - } - return (typeof defaultString != "undefined" ) ? defaultString : code; -} - -function translateHTML() -{ - var trTags = document.getElementsByTagName('trTag'); - for( i=0;i= 0 ) - { - buttons[i].focus(); - buttons[i].click(); - return; - } - } - var ahrefs = document.getElementById('headerMenus').getElementsByTagName('a'); - for( i=0;i= 0 ) - { - ahrefs[i].focus(); - ahrefs[i].onclick(); - return; - } - } -} - -function checkNumeric(e) -{ - if ( e.charCode == 13 || e.charCode == 9 || e.charCode == 8 || e.charCode == 0 || String.fromCharCode(e.charCode).match(/[\d]/) ) - return true; - return false; -} - -function handlekey(nextItem) -{ - if ( window.event.charCode != 13 && window.event.charCode != 9 ) - return; - - var el = document.getElementById(nextItem) - if ( (typeof el == "undefined") || (typeof el.type == "undefined") ) - return; - - if ( el.type == "password" ) - el.focus(); - else if ( el.type == "button" ) - el.click(); -} - -function checkEnter( e, obj ) -{ - if ( e.charCode == 13 && ( typeof obj.click != "undefined" ) && obj.click ) - obj.click(); -} - -function cardInserted(i) -{ - //alert("Kaart sisestati lugejasse " + i + " - " + cardManager.getReaderName(i)) - checkReaderCount(); - setActive('cert',document.getElementById('buttonCert')); - - var inReader = false; - try { - if ( !cardManager.isInReader( activeCardId ) ) - { - disableFields(); - document.getElementById('cardInfoNoCard').style.display='none'; - activeCardId = ""; - emailsLoaded = false; - if ( i != -1 ) - { - extender.showLoading( _('loadCardData') ); - var retry = 3; - while( retry > 0 ) - { - cardManager.selectReader( i ); - if ( esteidData.canReadCard() ) - { - activeCardId = esteidData.getDocumentId(); - break; - } - retry--; - } - if ( activeCardId != '' || !cardManager.anyCardsInReader() ) - extender.closeLoading(); - } - } else - inReader = true; - } catch ( err ) {} - - if ( activeCardId == "" && !cardManager.anyCardsInReader() ) - document.getElementById('cardInfoNoCard').style.display='block'; - - document.getElementById( 'forUpdate' ).innerHTML += "."; - if ( !inReader && activeCardId != '' ) - readCardData(); - cardManager.allowRead(); -} - -function cardRemoved(i) -{ - //alert("Kaart eemaldati lugejast " + cardManager.getReaderName(i) + " " + activeCardId ); - checkReaderCount(); - setActive('cert',document.getElementById('buttonCert')); - - var inReader = false; - try { - if ( !cardManager.isInReader( activeCardId ) ) - { - if ( cardManager.anyCardsInReader() ) - extender.showLoading( _('loadCardData') ); - emailsLoaded = false; - activeCardId = ""; - disableFields(); - var retry = 3; - while( retry > 0 ) - { - cardManager.findCard(); - if ( esteidData.canReadCard() ) - { - activeCardId = esteidData.getDocumentId(); - break; - } - retry--; - } - } else - inReader = true; - } catch( err ) {} - - extender.closeLoading(); - document.getElementById( 'forUpdate' ).innerHTML += "."; - if ( !inReader ) - readCardData(); - cardManager.allowRead(); -} - -function selectReader() -{ - setActive('cert',document.getElementById('buttonCert')); - extender.showLoading( _('loadCardData') ); - disableFields(); - var select = document.getElementById('readerSelect'); - - try { - cardManager.selectReader( select.options[select.selectedIndex].value ); - } catch( err ) {} - - if ( esteidData.canReadCard() ) - activeCardId = esteidData.getDocumentId(); - - extender.closeLoading(); - document.getElementById( 'forUpdate' ).innerHTML += "."; - readCardData(); -} - -function checkReaderCount() -{ - var cards = 0; - var reader = document.getElementById( 'readerSelect' ); - while ( reader.options.length > 0 ) - reader.remove(0); - - try { - for( var i = 0; i < cardManager.getReaderCount(); i++ ) - { - if ( cardManager.isInReader( i ) ) - { - var el = document.createElement( 'option' ); - el.text = cardManager.cardId( i ); - el.value = i; - if ( activeCardId != "" && el.text == activeCardId ) - el.selected = true; - reader.add( el, null ); - cards++; - } - } - } catch ( err ) {} - - if ( cards < 2 ) - { - document.getElementById( 'headerMenus' ).style.right = '100px'; - document.getElementById( 'readerSelectDiv' ).style.display = 'none'; - } else { - document.getElementById( 'headerMenus' ).style.right = '200px'; - document.getElementById( 'readerSelectDiv' ).style.display = 'block'; - } -} - -function readCardData( translate ) -{ - try { - if ( translate == null ) - { - if ( cardManager.getReaderCount() == 0 || !esteidData.canReadCard() ) - { - disableFields(); - return; - } else - enableFields(); - - if ( activeCardId == "" ) - activeCardId = esteidData.getDocumentId(); - - checkReaderCount(); - } - var pukRetry = esteidData.getPukRetryCount(); - var esteidIsValid = esteidData.isValid(); - - document.getElementById('documentId').innerHTML = activeCardId; - document.getElementById('email').innerHTML = esteidData.authCert.getEmail(); - document.getElementById('labelCardValidity').innerHTML = _( esteidIsValid ? 'labelIsValid' : 'labelIsInValid' ); - document.getElementById('labelCardValidity').style.color = esteidIsValid ? '#509b00' : '#e80303'; - document.getElementById('labelCardValidTo').innerHTML = !esteidIsValid ? _('labelCardGetNew') : _('labelCardValidTill') + '' + esteidData.getExpiry( language ) + ''; - - if ( esteidData.authCert.isTempel() ) - { - document.getElementById('photo').innerHTML = '
'; - document.getElementById('id').innerHTML = esteidData.authCert.getSerialNum(); - document.getElementById('personCode').innerHTML = _('regcode'); - document.getElementById('firstName').innerHTML = esteidData.authCert.getSubjCN(); - document.getElementById('liPersonBirth').style.display = 'none'; - document.getElementById('liPersonCitizen').style.display = 'none'; - } else { - document.getElementById('personCode').innerHTML = _('personCode'); - document.getElementById('liPersonBirth').style.display = 'block'; - document.getElementById('liPersonCitizen').style.display = 'block'; - document.getElementById('firstName').innerHTML = esteidData.getFirstName(); - document.getElementById('middleName').innerHTML = esteidData.getMiddleName(); - document.getElementById('surName').innerHTML = esteidData.getSurName(); - document.getElementById('id').innerHTML = esteidData.getId(); - document.getElementById('birthDate').innerHTML = esteidData.getBirthDate( language ); - document.getElementById('birthPlace').innerHTML = (esteidData.getBirthPlace() != "" ? ", " + esteidData.getBirthPlace() : "" ); - document.getElementById('citizen').innerHTML = esteidData.getCitizen(); - } - - var pin1Retry = esteidData.getPin1RetryCount(); - var pin2Retry = esteidData.getPin2RetryCount(); - - document.getElementById('authCertValidTo').innerHTML = esteidData.authCert.getValidTo( language ); - var days = esteidData.authCert.validDays(); - if ( days >= 0 && days <= 105 && pin1Retry != 0 ) - { - document.getElementById('authCertWillExpire').style.display = 'block'; - document.getElementById('authCertWillExpire').innerHTML = _( 'labelCertWillExpire' ).replace( /%d/, days ); - } else - document.getElementById('authCertWillExpire').style.display = 'none'; - - document.getElementById('authKeyUsage').innerHTML = esteidData.getAuthUsageCount(); - - document.getElementById('signCertValidTo').innerHTML = esteidData.signCert.getValidTo( language ); - days = esteidData.signCert.validDays(); - if ( days >= 0 && days <= 105 && pin2Retry != 0 ) - { - document.getElementById('signCertWillExpire').style.display = 'block'; - document.getElementById('signCertWillExpire').innerHTML = _( 'labelCertWillExpire' ).replace( /%d/, days ); - } else - document.getElementById('signCertWillExpire').style.display = 'none'; - document.getElementById('signKeyUsage').innerHTML = esteidData.getSignUsageCount(); - - if ( pin1Retry != 0 ) - { - document.getElementById('authCertStatus').className=esteidData.authCert.isValid() ? 'statusValid' : 'statusBlocked'; - document.getElementById('authCertStatus').innerHTML=_( esteidData.authCert.isValid() ? 'certValid' : 'certBlocked' ); - document.getElementById('authKeyText').style.display='block'; - document.getElementById('authKeyBlocked').style.display='none'; - document.getElementById('authValidButtons').style.display='block'; - document.getElementById('authBlockedButtons').style.display='none'; - } else { - document.getElementById('authCertStatus').className='statusBlocked'; - document.getElementById('authCertStatus').innerHTML=_( esteidData.authCert.isValid() ? 'validBlocked' : 'invalidBlocked' ); - document.getElementById('authKeyText').style.display='none'; - document.getElementById('authKeyBlocked').style.display='block'; - document.getElementById('spanAuthKeyBlocked').innerHTML=_("labelAuthKeyBlocked"); - if ( language != "ru" ) - document.getElementById('spanAuthKeyBlocked').innerHTML+="
"+_("labelCertBlocked"); - document.getElementById('authValidButtons').style.display='none'; - document.getElementById('authBlockedButtons').style.display=(pukRetry == 0 ? 'none' : 'block'); - } - document.getElementById('authCertValidTo').className=(esteidData.authCert.isValid() ? 'certValid' : 'certBlocked'); - - if ( pin2Retry != 0 ) - { - document.getElementById('signCertStatus').className=esteidData.signCert.isValid() ? 'statusValid' : 'statusBlocked'; - document.getElementById('signCertStatus').innerHTML=_( esteidData.signCert.isValid() ? 'certValid' : 'certBlocked' ); - document.getElementById('signKeyText').style.display='block'; - document.getElementById('signKeyBlocked').style.display='none'; - document.getElementById('signValidButtons').style.display='block'; - document.getElementById('signBlockedButtons').style.display='none'; - } else { - document.getElementById('signCertStatus').className='statusBlocked'; - document.getElementById('signCertStatus').innerHTML=_( esteidData.signCert.isValid() ? 'validBlocked' : 'invalidBlocked' ); - document.getElementById('signKeyText').style.display='none'; - document.getElementById('signKeyBlocked').style.display='block'; - document.getElementById('spanSignKeyBlocked').innerHTML=_("labelSignKeyBlocked"); - if ( language != "ru" ) - document.getElementById('spanSignKeyBlocked').innerHTML+="
"+_("labelCertBlocked"); - document.getElementById('signValidButtons').style.display='none'; - document.getElementById('signBlockedButtons').style.display=(pukRetry == 0 ? 'none' : 'block');; - } - document.getElementById('signCertValidTo').className=(esteidData.signCert.isValid() ? 'certValid' : 'certBlocked'); - - //update cert button - days = esteidData.authCert.validDays(); - if ( ( days <= 105 || esteidData.signCert.validDays() <= 105 ) && pin1Retry > 0 && esteidIsValid ) - { - document.getElementById('authUpdateDiv').style.display='block'; - var width = 0; - if ( document.getElementById('authValidButtons').style.display == 'block' ) - width = parseInt(document.defaultView.getComputedStyle(document.getElementById('authValidButtons1'), "").getPropertyValue('width')) + - parseInt(document.defaultView.getComputedStyle(document.getElementById('authValidButtons2'), "").getPropertyValue('width')) + 5; - else if ( document.getElementById('authBlockedButtons').style.display == 'block' ) - width = parseInt(document.defaultView.getComputedStyle(document.getElementById('authBlockedButtons1'), "").getPropertyValue('width')); - document.getElementById('authUpdateButton').style.width=width + 'px'; - } else - document.getElementById('authUpdateDiv').style.display='none'; - - if(pukRetry == 0) - setActive('puk',document.getElementById('buttonPUK')); - } catch ( err ) { } -} - -function setActive( content, el ) -{ - if ( el != '' ) - { - if ( typeof el == 'string' ) - el = document.getElementById( el ); - var buttons = document.getElementById('leftMenus').getElementsByTagName('input'); - for( i=0;i'; - document.getElementById('savePhoto').style.display = 'block'; - } - extender.closeLoading(); -} - -function setEmailActivate( msg ) -{ - //emails activated, lets load again - if ( msg == "0" ) - { - document.getElementById('emailsContentActivate').style.display = "none"; - extender.loadEmails(); - return; - } - extender.closeLoading(); - document.getElementById('emailsContent').innerHTML = _(msg); -} - -function setEmails( code, msg ) -{ - extender.closeLoading(); - if ( code == "0" && msg.indexOf( ' - ' ) == -1 ) - code = "20"; - //not activated - if ( code == "20" ) - { - document.getElementById('emailAddress').focus(); - document.getElementById('emailsContentActivate').style.display = "block"; - } - //success - if ( code != "0" && code != "20" ) - _alert( 'error', _(code) ); - else { - if ( code == "0" ) - code = msg; - document.getElementById('emailsContent').innerHTML = _(code); - } - if ( code != "loadFailed" ) - emailsLoaded = true; - if ( emailsLoaded ) - document.getElementById('emailsContentCheck').style.display = 'none'; -} - -function activateEmail() -{ - var txt = document.getElementById('emailAddress').value; - if ( txt == "" || txt.indexOf('@') == -1 || txt.indexOf('.') == -1 || txt.indexOf(' ') != -1 ) - { - _alert( 'warning', _('emailEnter') ); - document.getElementById('emailAddress').focus(); - return; - } - extender.showLoading( _('activatingEmail') ); - extender.activateEmail( document.getElementById('emailAddress').value ); - document.getElementById('emailAddress').value = ""; -} - -function handleError(msg) -{ - if ( msg == "" ) - return; - if ( msg.indexOf("smart card API error") != -1 || msg.indexOf("No card in specified reader") != -1 ) - { - extender.closeLoading(); - return; - } - if ( msg == "PIN1InvalidRetry" || msg == "PIN1Invalid" ) - { - msg = "PIN1InvalidRetry"; - var ret = esteidData.getPin1RetryCount( true ); - if ( ret == -1 || ret > 3 ) - return; - if ( ret == 0 ) - { - _alert( 'error', _("PIN1Blocked") ); - readCardData(); - } else - _alert( 'error', _( msg ).replace( /%d/, ret ) ); - return; - } - _alert( 'error', _('errorFound') + _( msg ) ) -} - -function handleNotice(msg) -{ - if ( msg == "" ) - return; - _alert( 'notice', _( msg ) ) -} - -function disableFields() -{ - var divs = document.getElementsByTagName('div'); - for( i=0;i'; - document.getElementById('savePhoto').style.display = 'none'; - document.getElementById('emailsContentActivate').style.display = "none"; - document.getElementById('emailsContentCheckID').style.display = "none"; - - try { - if ( !cardManager.anyCardsInReader() ) - { - cardManager.disableRead(); - activeCardId = ""; - document.getElementById('cardInfoNoCard').style.display='block'; - document.getElementById('cardInfoNoCardText').innerHTML='' + _( cardManager.getReaderCount() == 0 ? 'noReaders' : 'noCard' ) + ''; - if ( cardManager.getReaderCount() == 0 ) - cardManager.newManager(); - cardManager.allowRead(); - } - } catch( err ) { cardManager.allowRead(); } -} - -function enableFields() -{ - document.getElementById('cardInfo').style.display='block'; - document.getElementById('cardInfoNoCard').style.display='none'; - var buttons = document.getElementById('leftMenus').getElementsByTagName('input'); - var selected = ""; - for( i=0;i 1 ) - { - setActive('smobile',''); - if ( strings[2] == "Active" ) - { - document.getElementById('activateMobileButton').style.display = "none"; - document.getElementById('mobileStatus').style.color = "#509b00"; - } else { - document.getElementById('mobileStatus').style.color = "#e80303"; - document.getElementById('inputActivateMobile').attributes["onclick"].value = "extender.openUrl('" + strings[3] + "');"; - document.getElementById('activateMobileButton').style.display = "block"; - } - document.getElementById('mobileNumber').innerHTML = strings[0]; - document.getElementById('mobileOperator').innerHTML = strings[1]; - document.getElementById('mobileStatus').innerHTML = _(strings[2]); - } -} - -function updateCert() -{ - cardManager.disableRead(); - extender.showLoading( _('updateCert') ); - if ( !extender.updateCertAllowed() ) - { - extender.closeLoading(); - cardManager.allowRead(); - return; - } - var ok = false; - try { - ok = extender.updateCert(); - } catch( err ){} - if ( ok ) - { - extender.closeLoading(); - _alert( 'info', _( 'updateCertOk' ) ); - activeCardId = ""; - var activeNum = cardManager.activeReaderNum(); - cardManager.newManager(); - cardInserted( activeNum ); - } - cardManager.allowRead(); - extender.closeLoading(); -} - -function changePin1() -{ changePin( 1 ); } - -function changePin2() -{ changePin( 2 ); } - -function changePin( type ) -{ - var oldVal=document.getElementById('pin' + type + 'OldPin').value; - if (oldVal==null || oldVal.length < 4) - { - _alert( 'warning', _( 'PIN' + type + 'Enter' ) ); - document.getElementById('pin' + type + 'OldPin').focus(); - return; - } - if ( !eval("esteidData.validatePin" + type + "(oldVal)") ) - { - ret = eval("esteidData.getPin" + type + "RetryCount() "); - if ( ret == 0 || ret > 3 ) - { - document.getElementById('pin' + type + 'OldPin').value = ""; - document.getElementById('pin' + type + 'NewPin').value = ""; - document.getElementById('pin' + type + 'NewPin2').value = ""; - if ( ret == 0 ) - { - _alert( 'error', _("PIN" + type + "Blocked") ); - readCardData(); - setActive('cert',''); - } else - _alert( 'error', _("PIN" + type + "ValidateFailed") ); - return; - } - _alert( 'warning', _( 'PIN' + type + 'InvalidRetry' ).replace( /%d/, ret ) ); - document.getElementById('pin' + type + 'OldPin').focus(); - return; - } - - var newVal=document.getElementById('pin' + type + 'NewPin').value; - var newVal2=document.getElementById('pin' + type + 'NewPin2').value; - if (newVal==null || newVal == "") - { - _alert( 'warning', _( 'PIN' + type + 'EnterNew' ) ); - document.getElementById('pin' + type + 'NewPin').focus(); - return; - } - if ( oldVal == newVal ) - { - _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); - document.getElementById('pin' + type + 'NewPin').focus(); - return; - } - //PIN1 length 4-12, PIN2 5-12 - if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || - (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) - { - _alert( 'warning', _( 'PIN' + type + 'Length' ) ); - document.getElementById('pin' + type + 'NewPin').focus(); - return; - } - //check date of birth and birth year inside pin - if ( !esteidData.checkPin( newVal ) ) - { - _alert( 'warning', _( 'PINCheck' ) ); - document.getElementById('pin' + type + 'NewPin').focus(); - return; - } - if (newVal2==null || newVal2 == "" ) - { - _alert( 'warning', _( 'PIN' + type + 'Retry' ) ); - document.getElementById('pin' + type + 'NewPin2').focus(); - return; - } - if ( newVal != newVal2 ) - { - _alert( 'warning', _( 'PIN' + type + 'Different' ) ); - document.getElementById('pin' + type + 'NewPin2').focus(); - return; - } - if (eval("esteidData.changePin" + type + "(newVal, oldVal)")) - { - document.getElementById('pin' + type + 'OldPin').value = ""; - document.getElementById('pin' + type + 'NewPin').value = ""; - document.getElementById('pin' + type + 'NewPin2').value = ""; - _alert( 'notice', _( 'PIN' + type + 'Changed' ) ); - setActive('cert',''); - } else - _alert( 'error', _( 'PIN' + type + 'Unsuccess' ) ); -} - -function changePin1PUK() -{ changePinPUK( 1 ); } - -function changePin2PUK() -{ changePinPUK( 2 ); } - -function changePinPUK( type ) -{ - var oldVal=document.getElementById('ppin' + type + 'OldPin').value; - if (oldVal==null || oldVal.length < 4) - { - _alert( 'warning', _( 'PUKEnterOld' ) ); - document.getElementById('ppin' + type + 'OldPin').focus(); - return; - } - if ( !esteidData.validatePuk(oldVal) ) - { - ret = esteidData.getPukRetryCount(); - if ( ret == 0 || ret > 3 ) - { - document.getElementById('ppin' + type + 'OldPin').value = ""; - document.getElementById('ppin' + type + 'NewPin').value = ""; - document.getElementById('ppin' + type + 'NewPin2').value = ""; - if ( ret == 0 ) - { - _alert( 'error', _("PUKBlocked") ); - readCardData(); - setActive('cert',''); - } else - _alert( 'error', _("PUKValidateFailed") ); - return; - } - _alert( 'warning', _('PUKInvalidRetry').replace( /%d/, ret ) ); - document.getElementById('ppin' + type + 'OldPin').focus(); - return; - } - - var newVal=document.getElementById('ppin' + type + 'NewPin').value; - var newVal2=document.getElementById('ppin' + type + 'NewPin2').value; - if (newVal==null || newVal == "") - { - _alert( 'warning', _( 'PIN' + type + 'EnterNew' ) ); - document.getElementById('ppin' + type + 'NewPin').focus(); - return; - } - if ( oldVal == newVal ) - { - _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); - document.getElementById('ppin' + type + 'NewPin').focus(); - return; - } - //PIN1 length 4-12, PIN2 5-12 - if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || - (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) - { - _alert( 'warning', _( 'PIN' + type + 'Length' ) ); - document.getElementById('ppin' + type + 'NewPin').focus(); - return; - } - //check date of birth and birth year inside pin - if ( !esteidData.checkPin( newVal ) ) - { - _alert( 'warning', _( 'PINCheck' ) ); - document.getElementById('ppin' + type + 'NewPin').focus(); - return; - } - if (newVal2==null || newVal2 == "" ) - { - _alert( 'warning', _( 'PIN' + type + 'Retry' ) ); - document.getElementById('ppin' + type + 'NewPin2').focus(); - return; - } - if ( newVal != newVal2 ) - { - _alert( 'warning', _( 'PIN' + type + 'Different' ) ); - document.getElementById('ppin' + type + 'NewPin2').focus(); - return; - } - if ( eval("esteidData.validatePin" + type + "(newVal)") ) - { - _alert( 'warning', _( 'PIN' + type + 'NewOldSame' ) ); - document.getElementById('ppin' + type + 'NewPin').focus(); - return; - } - if ( eval('esteidData.unblockPin' + type + '(newVal, oldVal)') ) - { - document.getElementById('ppin' + type + 'OldPin').value = ""; - document.getElementById('ppin' + type + 'NewPin').value = ""; - document.getElementById('ppin' + type + 'NewPin2').value = ""; - _alert( 'notice', _( 'PIN' + type + 'Changed' ) ); - setActive('cert',''); - } else - _alert( 'error', _( 'PIN' + type + 'Unsuccess' ) ); -} - -function changePuk() -{ - var oldVal=document.getElementById('pukOldPin').value; - if (oldVal==null || oldVal == "") - { - _alert( 'warning', _('PUKEnterOld') ); - document.getElementById('pukOldPin').focus(); - return; - } - if ( !esteidData.validatePuk(oldVal) ) - { - ret = esteidData.getPukRetryCount(); - if ( ret == 0 || ret > 3 ) - { - document.getElementById('pukOldPin').value = ""; - document.getElementById('pukNewPin').value = ""; - document.getElementById('pukNewPin2').value = ""; - if ( ret == 0 ) - { - _alert( 'error', _("PUKBlocked") ); - readCardData(); - setActive('cert',''); - } else - _alert( 'error', _("PUKValidateFailed") ); - return; - } - _alert( 'warning', _('PUKInvalidRetry').replace( /%d/, ret ) ); - document.getElementById('pukOldPin').focus(); - return; - } - - var newVal=document.getElementById('pukNewPin').value; - var newVal2=document.getElementById('pukNewPin2').value; - if (newVal==null || newVal == "") - { - _alert( 'warning', _('PUKEnterNew') ); - document.getElementById('pukNewPin').focus(); - return; - } - if ( oldVal == newVal ) - { - _alert( 'warning', _( 'PUKNewOldSame' ) ); - document.getElementById('pin' + type + 'NewPin').focus(); - return; - } - //PUK length 8-12 - if ( newVal.length<8 || newVal.length > 12 ) - { - _alert( 'warning', _( 'PUKLength' ) ); - document.getElementById('pukNewPin').focus(); - return; - } - - if (newVal2==null || newVal2 == "") - { - _alert( 'warning', _('PUKRetry') ); - document.getElementById('pukNewPin2').focus(); - return; - } - if ( newVal != newVal2 ) - { - _alert( 'warning', _('PUKDifferent') ); - document.getElementById('pukNewPin2').focus(); - return; - } - if (esteidData.changePuk(newVal, oldVal)) - { - document.getElementById('pukOldPin').value = ""; - document.getElementById('pukNewPin').value = ""; - document.getElementById('pukNewPin2').value = ""; - _alert( 'notice', _('PUKChanged') ); - setActive('puk',''); - } else - _alert( 'error', _('PUKUnsuccess') ); -} - -function unblockPin1() -{ unblockPin( 1 ); } - -function unblockPin2() -{ unblockPin( 2 ); } - -function unblockPin( type ) -{ - var oldVal=document.getElementById('bpin' + type + 'OldPin').value; - if (oldVal==null || oldVal.length < 4) - { - _alert( 'warning', _('PUKEnter') ); - document.getElementById('bpin' + type + 'OldPin').focus(); - return; - } - if ( !esteidData.validatePuk(oldVal) ) - { - ret = esteidData.getPukRetryCount(); - if ( ret == 0 || ret > 3 ) - { - document.getElementById('bpin' + type + 'OldPin').value = ""; - document.getElementById('bpin' + type + 'NewPin').value = ""; - document.getElementById('bpin' + type + 'NewPin2').value = ""; - if ( ret == 0 ) - { - _alert( 'error', _("PUKBlocked") ); - readCardData(); - setActive('cert',''); - } else - _alert( 'error', _("PUKValidateFailed") ); - return; - } - _alert( 'warning', _("PUKInvalidRetry").replace( /%d/, ret ) ); - document.getElementById('bpin' + type + 'OldPin').focus(); - return; - } - - var newVal=document.getElementById('bpin' + type + 'NewPin').value; - var newVal2=document.getElementById('bpin' + type + 'NewPin2').value; - if (newVal==null || newVal == "") - { - _alert( 'warning', _('PIN' + type + 'EnterNew') ); - document.getElementById('bpin' + type + 'NewPin').focus(); - return; - } - //PIN1 length 4-12, PIN2 5-12 - if ( (type == 1 && (newVal.length<4 || newVal.length > 12) ) || - (type == 2 && (newVal.length<5 || newVal.length > 12) ) ) - { - _alert( 'warning', _( 'PIN' + type + 'Length' ) ); - document.getElementById('bpin' + type + 'NewPin').focus(); - return; - } - //check date of birth and birth year inside pin - if ( !esteidData.checkPin( newVal ) ) - { - _alert( 'warning', _( 'PINCheck' ) ); - document.getElementById('bpin' + type + 'NewPin').focus(); - return; - } - if (newVal2==null || newVal2 == "") - { - _alert( 'warning', _('PIN' + type + 'Retry') ); - document.getElementById('bpin' + type + 'NewPin2').focus(); - return; - } - if ( newVal != newVal2 ) - { - _alert( 'warning', _('PIN' + type + 'Different') ); - document.getElementById('bpin' + type + 'NewPin2').focus(); - return; - } - if (eval('esteidData.unblockPin' + type + '(newVal, oldVal)')) - { - document.getElementById('bpin' + type + 'OldPin').value = ""; - document.getElementById('bpin' + type + 'NewPin').value = ""; - document.getElementById('bpin' + type + 'NewPin2').value = ""; - _alert( 'notice', _('PIN' + type + 'UnblockSuccess') ); - readCardData(); - setActive('cert',''); - } else - _alert( 'error', _('PIN' + type + 'UnblockFailed') ); -} - -function _alert( type, text ) -{ extender.showMessage( type, text ); } diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/html/style.css qesteidutil-0.3.1/=unpacked-tar1=/src/html/style.css --- qesteidutil-0.3.1/=unpacked-tar1=/src/html/style.css 2010-09-16 13:38:20.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/html/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -body { cursor: default; margin: 0px; } -input[type="button"] { cursor: hand; } - -#headerBackground {position: relative; background: #00355f; height: 45px;} -#headerLogo { float: left; margin: 8px 0px 0px 20px; background-image: url('qrc:/html/images/topLogo.png'); z-index: 20; width: 92px; height: 28px; } - -#readerSelectDiv { position: absolute; right: 100px; top: 10px; } -#headerSelectDiv { position: absolute; right: 5px; top: 10px; } -#readerSelect, #headerSelect { background: #00355f; border: 0px; -webkit-text-fill-color: #FFFFFF; font-family: "Arial, Liberation Sans"; font-size: 12px; } -#readerSelect:focus, #readerSelect:hover, #headerSelect:focus, #headerSelect:hover { text-decoration: underline; } - -#headerMenus { position: absolute; right: 100px; top: 14px; color: #afc6d1; font-family: "Arial, Liberation Sans"; font-size: 12px; } -#headerMenus ul { display: inline; } -#headerMenus ul li { list-style: none; padding: 0px 5px 0px 10px; margin: 0px; display: inline; border-left: 1px solid #325e80; font-weight: bold; } -#headerMenus ul li:first-child { border-left: none; padding-left: 0px;} -#headerMenus a:link, #headerMenus a:visited {color: #afc6d1; text-decoration: none;} -#headerMenus a:hover, #headerMenus a:focus {color: #afc6d1; text-decoration: underline;} - -#topBackground {position: relative; background: #c6ddfa; height: 200px; z-index: -10;} - -#linegray {position: absolute; top:145px; width:585; height:165px; background-image: url('qrc:/html/images/linegray.png'); z-index: -1;} - -#logo {position: absolute; top:65px; left:45px; width:90px; height:84px; background-image: url('qrc:/html/images/logo.png');} -#logotext {position: absolute; top:72px; left:155px; width:176px; height:35px; background-image: url('qrc:/html/images/logotext.png'); background-repeat: no-repeat;} - -#leftMenus { position: absolute; top:155px; left: 5px; width:146; z-index: 1; } -#leftMenus ul {list-style: none; text-indent:-1.7em; line-height: 31px; } -.buttonSelected, .button { width: 146px; height: 25px; text-align: left; -webkit-border-radius: 3px; font-family: "Arial, Liberation Sans"; font-weight: bold; font-size: 14px; } -.buttonSelected, .button:hover, .buttonBottom:hover , .button:focus, .buttonBottom:focus - { background-image: url('qrc:/html/images/buttonSelected.png'); border: 1px solid #ce911b; color: #00355f;} - -.button { background-image: url('qrc:/html/images/button.png'); border: 1px solid #1a4b79; color: #ffffff;} - -#personalInfo { position: absolute; top:81px; left:180px; width:385; height:138px; - background-color: rgba(255,255,255,0.7); border: 1px solid #cddbeb; z-index: 1;-webkit-border-radius: 5px; - color: #668696; font-weight: bold; font-family: "Arial, Liberation Sans"; font-size: 12px; line-height: 18px;} -#personalInfo ul {list-style: none; text-indent:-2.1em; margin-top: 5px; width:240; word-wrap: break-word; } - -#smobileContent ul {list-style: none; text-indent:-2.1em; margin-top: 5px; width:500px; word-wrap: break-word; } -#smobileContent {color: #355670; font-family: "Arial, Liberation Sans"; font-size: 12px;} - -#photo {position: absolute; top:90px; left:467px; width:90px; height:120px; border: 1px solid black; z-index:1; background: #FFFFFF; text-align: center;} -#savePhoto {position: absolute; top:194px; left:468px; width: 90px; height:16px; border-top: 1px solid black; z-index:2; background: rgba(255,255,255,0.8); text-align: center; display: none;} - -.cardInfo { position: absolute; top:226px; left:180px; width:385; height:72px; - background-color: rgba(255,255,255,0.7); border: 1px solid #cddbeb; z-index: 1;-webkit-border-radius: 5px; - color: #54859b; font-weight: bold; font-family: "Arial, Liberation Sans"; font-size: 16px;} -.cardInfo ul {list-style: none; text-indent:-1.7em; margin-top: 7px;} -.noCard { padding-top:5px; font-size:18px; font-weight: bold; color:#ec2b2b; } -.pukBlocked { padding-top:5px; font-size:16px; font-weight: bold; color:#ec2b2b; } - -.content {position: relative; top: 70px; padding-left: 35px; padding-right: 35px;} -.contentHeader {color: #54859b; font-family: "Arial, Liberation Sans"; font-weight: bold; font-size: 16px; } -.content p {color: #355670; font-family: "Arial, Liberation Sans"; font-size: 12px;} -.statusValid {color: #509b00; font-weight: bold;} -.statusBlocked, .certBlocked {color: #e80303; font-weight: bold; } -.certValid {font-weight: bold;} - -.leftContent {position: absolute; left: 40px; width: 240px; height: 180px; border-right: 1px solid #dfdfdf; margin-top: 10px; padding-right: 10px; } -.buttonSelectedBottom, .buttonBottom { height: 23px; -webkit-border-radius: 3px; font-family: "Arial, Liberation Sans"; font-size: 12px; margin-left: 0px;} -.buttonSelectedBottom { background-image: url('qrc:/html/images/buttonSelected.png'); border: 1px solid #ce911b; color: #00355f;} -.buttonBottom { background-image: url('qrc:/html/images/button.png'); border: 1px solid #1a4b79; color: #ffffff;} - -.rightContent {position: absolute; left: 290px; width: 245px; margin-top: 10px; height: 180px; padding-left: 30px;} -#signBottomButtons, #authBottomButtons { position: absolute; bottom:0px; left: 0px; height: 30px; width:250; z-index: 1; } -#signUpdateDiv, #authUpdateDiv { position: absolute; bottom:30px; left: 0px; height: 25px; width:250; z-index: 1; } - -.keyBlocked { position: absolute; bottom: 35px; width: 220px; padding: 5px; - font-family: "Arial, Liberation Sans"; font-size: 12px; font-weight: bold; color: #e80303; border: 1px solid #e80303; -webkit-border-radius: 5px; } - -a:link, a:visited {color: #509b00; text-decoration: none;} -a:hover, a:focus {color: #509b00; text-decoration: underline;} - -label {color: #355670; font-weight: bold;} - -#statusBar { position: absolute; left: 10px; bottom:5px; width: 500px; height: 20px; } - -#firstName, #middleName, #surName, #department, #id, #birthDate, #birthPlace, #citizen, #email { color: #355670; } diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.cpp 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,310 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include - -#include "jscardmanager.h" -#include "DiagnosticsDialog.h" -#include - -using namespace std; - -JsCardManager::JsCardManager(JsEsteidCard *jsEsteidCard) -: QObject( jsEsteidCard ) -, cardMgr( 0 ) -, m_jsEsteidCard( jsEsteidCard ) -, readAllowed( true ) -{ - try { - cardMgr = new PCSCManager(); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } - - connect(&pollTimer, SIGNAL(timeout()), - this, SLOT(pollCard())); - - //wait javascript/html to initialize - QTimer::singleShot( 2000, this, SLOT(pollCard()) ); -} - -JsCardManager::~JsCardManager() -{ - if( cardMgr ) - delete cardMgr; -} - -void JsCardManager::pollCard() -{ - - if ( !pollTimer.isActive() ) - pollTimer.start( 500 ); - - if ( !readAllowed ) - return; - - int numReaders = 0; - try { - QString insert,remove; - bool foundConnected = false; - - if (!cardMgr) - cardMgr = new PCSCManager(); - - // Build current device list with statuses - QHash tmp; - numReaders = cardMgr->getReaderCount( true ); - for (int i = 0; i < numReaders; i++) { - ReaderState reader; - reader.id = i; - reader.name = QString::fromStdString(cardMgr->getReaderName(i)); - reader.state = QString::fromStdString( cardMgr->getReaderState( i ) ); - if ( reader.state.contains( "PRESENT" ) ) - reader.state = "PRESENT"; - reader.connected = false; - if ( !cardReaders.contains(reader.name) || ( cardReaders.contains(reader.name) && cardReaders.value(reader.name).state != reader.state ) ) - { - //card in use - if ( !reader.state.contains( "EMPTY" ) ) - { - EstEidCard card(*cardMgr); - if ( card.isInReader(i) ) - { - card.connect( i ); - reader.cardId = QString::fromStdString( card.readDocumentID() ); - reader.connected = true; - foundConnected = true; - insert = reader.name; - } - } else if ( !cardReaders.value(reader.name).cardId.isEmpty() && cardReaders.value(reader.name).connected ) - remove = reader.name; - } else if ( cardReaders.value(reader.name).connected ) { - foundConnected = true; - reader.connected = true; - reader.cardId = cardReaders.value(reader.name).cardId; - } - tmp[reader.name] = reader; - } - // check if connected card or reader has removed - if ( cardReaders.size() > tmp.size() ) - { - foreach( const ReaderState &r, cardReaders ) - { - if ( r.connected && ( !tmp.contains( r.name ) || tmp[r.name].cardId.isEmpty() ) ) - { - remove = r.name; - break; - } - } - if ( remove.isEmpty() ) - remove = "empty"; - } else if ( cardReaders.size() < tmp.size() && insert.isEmpty() ) - insert = "empty"; - - if ( !remove.isEmpty() ) - { - if ( m_jsEsteidCard->m_card && m_jsEsteidCard->getDocumentId() == cardReaders[remove].cardId ) - m_jsEsteidCard->setCard( 0 ); - cardReaders = tmp; - readAllowed = false; - emit cardEvent( "cardRemoved", remove != "empty" ? cardReaders[remove].id : -1 ); - } - cardReaders = tmp; - if ( !insert.isEmpty() ) - { - readAllowed = false; - emit cardEvent( "cardInserted", insert != "empty" ? cardReaders[insert].id : -1 ); - } else if ( !foundConnected ) {// Didn't find any connected reader, lets find one - findCard(); - } else if ( foundConnected && !m_jsEsteidCard->canReadCard() ) { //card connected but not fully readable, let's try again - findCard(); - if ( m_jsEsteidCard->canReadCard() ) - emit cardEvent( "cardInserted", activeReaderNum() ); - } - } catch (std::runtime_error &e) { - qDebug() << e.what(); - if ( cardReaders.size() > 0 && numReaders == 0 ) - { - cardReaders = QHash(); - emit cardEvent( "cardRemoved", cardReaders.value(0).id ); - } - // For now ignore any errors that might have happened during polling. - // We don't want to spam users too often. - } -} - -bool JsCardManager::isInReader( const QString &cardId ) -{ - if ( cardId == "" ) - return false; - foreach( const ReaderState &r, cardReaders ) - if ( r.cardId == cardId ) - return true; - return false; -} - -bool JsCardManager::isInReader( int readerNum ) -{ - foreach( const ReaderState &r, cardReaders ) - if ( r.id == readerNum && !r.state.contains( "EMPTY") ) - return true; - return false; -} - -QString JsCardManager::cardId( int readerNum ) -{ - foreach( const ReaderState &r, cardReaders ) - if ( r.id == readerNum && !r.state.contains( "EMPTY") ) - return r.cardId; - return ""; -} - -void JsCardManager::findCard() -{ - if ( !cardMgr ) - return; - - try { - if ( getReaderCount() < 1 ) - return; - } catch ( const std::runtime_error &e ) { - qDebug() << e.what(); - return; - } - - m_jsEsteidCard->setCard( 0 ); - QCoreApplication::processEvents(); - foreach( const ReaderState &reader, cardReaders ) - { - if( reader.connected && !reader.name.isEmpty() ) - { - selectReader( reader ); - return; - } - } -} - -bool JsCardManager::anyCardsInReader() -{ - if ( !cardMgr ) - return false; - - try { - if ( getReaderCount() < 1 ) - return false; - } catch ( const std::runtime_error &e ) { - qDebug() << e.what(); - return false; - } - - foreach( const ReaderState &reader, cardReaders ) - if( reader.connected && !reader.name.isEmpty() ) - return true; - return false; -} - -bool JsCardManager::selectReader(int i) -{ - QCoreApplication::processEvents(); - foreach( const ReaderState &reader, cardReaders ) - { - if( reader.id == i && reader.connected ) - return selectReader( reader ); - } - return false; -} - -bool JsCardManager::selectReader( const ReaderState &reader ) -{ - QCoreApplication::processEvents(); - EstEidCard *card = 0; - try { - if (!cardMgr) - cardMgr = new PCSCManager(); - card = new EstEidCard(*cardMgr); - card->connect( reader.id ); - QCoreApplication::processEvents(); - m_jsEsteidCard->setCard(card, reader.id); - return true; - } catch (std::runtime_error &err) { - //ignore Another application is using - if ( QString::fromStdString( err.what() ).contains( "Another " ) ) - return false; - handleError(err.what()); - } - return false; -} - -int JsCardManager::activeReaderNum() -{ - if ( !m_jsEsteidCard || !m_jsEsteidCard->m_card ) - return -1; - return m_jsEsteidCard->m_reader; -} - -int JsCardManager::getReaderCount() -{ - if (!cardMgr) - return 0; - - int readers = 0; - try { - readers = cardMgr->getReaderCount( true ); - } catch( std::runtime_error & ) {} - - return readers; -} - -QString JsCardManager::getReaderName(int i) -{ - if (!cardMgr) - return ""; - - return QString::fromStdString(cardMgr->getReaderName(i)); -} - -void JsCardManager::handleError(QString msg) -{ - qDebug() << "Error: " << msg << endl; - emit cardError( "handleError", msg); -} - -void JsCardManager::showDiagnostics() -{ - (new DiagnosticsDialog( qApp->activeWindow() ) )->exec(); - m_jsEsteidCard->reconnect(); -} - -void JsCardManager::allowRead() -{ readAllowed = true; } - -void JsCardManager::disableRead() -{ readAllowed = false; } - -void JsCardManager::newManager() -{ - m_jsEsteidCard->setCard( 0 ); - delete cardMgr; - cardMgr = 0; -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.h qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.h 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jscardmanager.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include -#include -#include - -#include -#include "jsesteidcard.h" - -class JsCardManager : public QObject -{ - Q_OBJECT - - struct ReaderState { - QString name; - bool connected; - QString cardId; - int id; - QString state; - }; - -public: - JsCardManager(JsEsteidCard *jsEsteidCard); - ~JsCardManager(); - -private: - PCSCManager *cardMgr; - JsEsteidCard *m_jsEsteidCard; - QTimer pollTimer; - - QHash cardReaders; - - void handleError(QString msg); - bool readAllowed; - -public slots: - int getReaderCount(); - QString getReaderName( int i ); - bool selectReader( int i ); - bool selectReader( const ReaderState &reader ); - bool isInReader( const QString &cardId ); - bool isInReader( int readerNum ); - QString cardId( int readerNum ); - void showDiagnostics(); - void findCard(); - bool anyCardsInReader(); - int activeReaderNum(); - void allowRead(); - void disableRead(); - void newManager(); - -private slots: - void pollCard(); - -signals: - void cardEvent(QString func, int i); - void cardError(QString func, QString err); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include - -#include "jscertdata.h" -#include "common/SslCertificate.h" - -JsCertData::JsCertData( QObject *parent ) -: QObject( parent ) -{ - m_card = NULL; - m_qcert = NULL; -} - -JsCertData::~JsCertData() -{ - if( m_qcert ) - delete m_qcert; -} - -QSslCertificate JsCertData::cert() const { return *m_qcert; } - -void JsCertData::loadCert(EstEidCard *card, CertType ct) -{ - m_card = card; - - if (!m_card) { - qDebug("No card"); - return; - } - - if( m_qcert ) - { - delete m_qcert; - m_qcert = 0; - } - - std::vector tmp; - ByteVec certBytes; - try { - // Read certificate - if (ct == AuthCert) - certBytes = m_card->getAuthCert(); - else - certBytes = m_card->getSignCert(); - - if( certBytes.size() ) - m_qcert = new QSslCertificate(QByteArray((char *)&certBytes[0], certBytes.size()), QSsl::Der); - else - m_qcert = new QSslCertificate(); - } catch ( std::runtime_error &err ) { -// doShowError(err); - qDebug() << "Error on loadCert: " << err.what(); - } -} - -QString JsCertData::toPem() -{ - if (!m_qcert) - return ""; - - return QString(m_qcert->toPem()); -} - -QString JsCertData::getEmail() -{ - if (!m_qcert) - return ""; - - if ( isTempel() ) - return m_qcert->subjectInfo( "emailAddress" ); - - QStringList mailaddresses = m_qcert->alternateSubjectNames().values(QSsl::EmailEntry); - - // return first email address - if (!mailaddresses.isEmpty()) - return mailaddresses.first(); - else - return ""; -} - -QString JsCertData::getSerialNum() -{ - if (!m_qcert) - return ""; - - return m_qcert->subjectInfo("serialNumber"); -} - -QString JsCertData::getSubjCN() -{ - if (!m_qcert) - return ""; - - return SslCertificate( *m_qcert ).subjectInfo(QSslCertificate::CommonName); -} - -QString JsCertData::getSubjSN() -{ - if (!m_qcert) - return ""; - - return m_qcert->subjectInfo("SN"); -} - -QString JsCertData::getSubjO() -{ - if (!m_qcert) - return ""; - - return m_qcert->subjectInfo(QSslCertificate::Organization); -} - -QString JsCertData::getSubjOU() -{ - if (!m_qcert) - return ""; - - return m_qcert->subjectInfo(QSslCertificate::OrganizationalUnitName); -} - -QString JsCertData::getValidFrom( const QString &locale ) -{ - if (!m_qcert) - return ""; - - return QLocale( locale ).toString( m_qcert->effectiveDate().toLocalTime(), "dd. MMMM yyyy" ); -} - -QString JsCertData::getValidTo( const QString &locale ) -{ - if (!m_qcert) - return ""; - - return QLocale( locale ).toString( m_qcert->expiryDate().toLocalTime(), "dd. MMMM yyyy" ); -} - -QString JsCertData::getIssuerCN() -{ - if (!m_qcert) - return ""; - - return m_qcert->issuerInfo(QSslCertificate::CommonName); -} - -QString JsCertData::getIssuerO() -{ - if (!m_qcert) - return ""; - - return m_qcert->issuerInfo(QSslCertificate::Organization); -} - -QString JsCertData::getIssuerOU() -{ - if (!m_qcert) - return ""; - - return m_qcert->issuerInfo(QSslCertificate::OrganizationalUnitName); -} - -bool JsCertData::isTempel() -{ - if (!m_qcert) - return false; - - return SslCertificate( *m_qcert ).isTempel(); -} - -bool JsCertData::isTest() -{ - if (!m_qcert) - return false; - - return SslCertificate( *m_qcert ).isTest(); -} - -bool JsCertData::isValid() -{ - if (!m_qcert) - return false; - - return m_qcert->expiryDate().toLocalTime() >= QDateTime::currentDateTime(); -} - -int JsCertData::validDays() -{ - if ( !m_qcert || !isValid() ) - return 0; - - return QDateTime::currentDateTime().daysTo( m_qcert->expiryDate().toLocalTime() ); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.h qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.h 2010-07-14 16:10:54.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jscertdata.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include -#include -#include - -#include - -class JsCertData : public QObject -{ - Q_OBJECT - -public: - JsCertData( QObject *parent ); - ~JsCertData(); - - enum CertType { - AuthCert, - SignCert - }; - - QSslCertificate cert() const; - void loadCert(EstEidCard *card, CertType ct); - QSslCertificate *m_qcert; - -private: - EstEidCard *m_card; - -public slots: - QString toPem(); - QString getEmail(); - QString getSubjCN(); - QString getSubjSN(); - QString getSubjO(); - QString getSubjOU(); - QString getValidFrom( const QString &locale = "en" ); - QString getValidTo( const QString &locale = "en" ); - QString getIssuerCN(); - QString getIssuerO(); - QString getIssuerOU(); - QString getSerialNum(); - - bool isTempel(); - bool isTest(); - bool isValid(); - int validDays(); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.cpp 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,513 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include -#include - -#include "jsesteidcard.h" -#include "common/CertificateWidget.h" -#include "common/SslCertificate.h" - -using namespace std; - -static QString getName( const std::string &data ) -{ - QTextCodec *c = QTextCodec::codecForName("Windows-1252"); - return SslCertificate::formatName( c->toUnicode( data.c_str() ) ); -} - -JsEsteidCard::JsEsteidCard( QObject *parent ) -: QObject( parent ) -{ - m_card = NULL; - m_authCert = new JsCertData( this ); - m_signCert = new JsCertData( this ); - authUsageCount = 0; - signUsageCount = 0; - cardOK = false; -} - -void JsEsteidCard::setCard(EstEidCard *card, int reader) -{ - if ( m_card ) - { - delete m_card; - m_card = 0; - } - - if ( !card ) - return; - - cardOK = false; - m_reader = reader; - m_card = card; - m_authCert->loadCert(card, JsCertData::AuthCert); - m_signCert->loadCert(card, JsCertData::SignCert); - reloadData(); -} - -void JsEsteidCard::handleError(QString msg) -{ - qDebug() << "Error: " << msg << endl; - emit cardError("handleError", msg); -} - -void JsEsteidCard::reloadData() { - if (!m_card) { - qDebug("No card"); - return; - } - - std::vector tmp; - try { - // Read all personal data - m_card->readPersonalData(tmp,EstEidCard::SURNAME,EstEidCard::COMMENT4); - - surName = getName( tmp[EstEidCard::SURNAME] ); - firstName = getName( tmp[EstEidCard::FIRSTNAME] ); - middleName = getName( tmp[EstEidCard::MIDDLENAME] ); - sex = tmp[EstEidCard::SEX].c_str(); - citizen = tmp[EstEidCard::CITIZEN].c_str(); - birthDate = tmp[EstEidCard::BIRTHDATE].c_str(); - id = tmp[EstEidCard::ID].c_str(); - documentId = tmp[EstEidCard::DOCUMENTID].c_str(); - expiry = tmp[EstEidCard::EXPIRY].c_str(); - birthPlace = SslCertificate::formatName( tmp[EstEidCard::BIRTHPLACE].c_str() ); - issueDate = tmp[EstEidCard::ISSUEDATE].c_str(); - residencePermit = tmp[EstEidCard::RESIDENCEPERMIT].c_str(); - comment1 = tmp[EstEidCard::COMMENT1].c_str(); - comment2 = tmp[EstEidCard::COMMENT2].c_str(); - comment3 = tmp[EstEidCard::COMMENT3].c_str(); - comment4 = tmp[EstEidCard::COMMENT4].c_str(); - - m_card->getKeyUsageCounters( authUsageCount, signUsageCount); - - cardOK = true; - } catch (runtime_error &err ) { - cout << "Error on readPersonalData: " << err.what() << endl; - cardOK = false; - } -} - -bool JsEsteidCard::canReadCard() -{ - return m_card && m_authCert && m_signCert && m_authCert->m_qcert && m_signCert->m_qcert && cardOK; -} - -bool JsEsteidCard::validatePin1(QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->validateAuthPin( PinString( oldVal.toLatin1() ), retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::changePin1(QString newVal, QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->changeAuthPin( PinString( newVal.toLatin1() ), - PinString( oldVal.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::validatePin2(QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->validateSignPin( PinString( oldVal.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::changePin2(QString newVal, QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->changeSignPin( PinString( newVal.toLatin1() ), - PinString( oldVal.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::validatePuk(QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->validatePuk( PinString( oldVal.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::changePuk(QString newVal, QString oldVal) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->changePUK( PinString( newVal.toLatin1() ), - PinString( oldVal.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::unblockPin1(QString newVal, QString puk) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->unblockAuthPin( PinString( newVal.toLatin1() ), - PinString( puk.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -bool JsEsteidCard::unblockPin2(QString newVal, QString puk) -{ - if (!m_card) { - qDebug("No card"); - return false; - } - - byte retriesLeft = 0; - - int retry = 3; - while( retry > 0 ) - { - try { - return m_card->unblockSignPin( PinString( newVal.toLatin1() ), - PinString( puk.toLatin1() ), - retriesLeft); - } catch(AuthError &) { - return false; - } catch (std::runtime_error &err) { - handleError(err.what()); - m_card->reconnectWithT0(); - } - retry--; - } - return false; -} - -QString JsEsteidCard::getSurName() -{ - return surName; -} - -QString JsEsteidCard::getFirstName() -{ - return firstName; -} - -QString JsEsteidCard::getMiddleName() -{ - return middleName; -} - -QString JsEsteidCard::getSex() -{ - return sex; -} - -QString JsEsteidCard::getCitizen() -{ - return citizen; -} - -QString JsEsteidCard::getBirthDate( const QString &locale ) -{ - return QLocale( locale ).toString( QDate::fromString( birthDate, "dd.MM.yyyy" ), "dd. MMMM yyyy" ); -} - -QString JsEsteidCard::getId() -{ - return id; -} - -QString JsEsteidCard::getDocumentId() -{ - return documentId; -} - -QString JsEsteidCard::getExpiry( const QString &locale ) -{ - return QLocale( locale ).toString( QDate::fromString( expiry, "dd.MM.yyyy" ), "dd. MMMM yyyy" ); -} - -QString JsEsteidCard::getBirthPlace() -{ - return birthPlace; -} - -QString JsEsteidCard::getIssueDate() -{ - return QDate::fromString( issueDate, "dd.MM.yyyy" ).toString( "dd. MMMM yyyy" ); -} - -QString JsEsteidCard::getResidencePermit() -{ - return residencePermit; -} - -QString JsEsteidCard::getComment1() -{ - return comment1; -} - -QString JsEsteidCard::getComment2() -{ - return comment2; -} - -QString JsEsteidCard::getComment3() -{ - return comment3; -} - -QString JsEsteidCard::getComment4() -{ - return comment4; -} - -int JsEsteidCard::getPin1RetryCount( bool connect ) -{ - if (!m_card) - return -1; - - byte puk = -1; - byte pinAuth = -1; - byte pinSign = -1; - - try { - if ( connect ) - m_card->connect( m_reader ); - m_card->getRetryCounts(puk,pinAuth,pinSign); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } - - return pinAuth; -} - -int JsEsteidCard::getPin2RetryCount() -{ - if (!m_card) - return -1; - - byte puk = -1; - byte pinAuth = -1; - byte pinSign = -1; - - try { - m_card->getRetryCounts(puk,pinAuth,pinSign); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } - - return pinSign; -} - -int JsEsteidCard::getPukRetryCount() -{ - if (!m_card) - return -1; - - byte puk = -1; - byte pinAuth = -1; - byte pinSign = -1; - - try { - m_card->getRetryCounts(puk,pinAuth,pinSign); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } - return puk; -} - -int JsEsteidCard::getAuthUsageCount() -{ - return authUsageCount; -} - -int JsEsteidCard::getSignUsageCount() -{ - return signUsageCount; -} - -bool JsEsteidCard::isValid() -{ - if (!m_card) - return false; - - return QDateTime::fromString( expiry, "dd.MM.yyyy" ) >= QDateTime::currentDateTime(); -} - -bool JsEsteidCard::checkPin( const QString &pin ) -{ - QDate date( QDate::fromString( birthDate, "dd.MM.yyyy" ) ); - if ( pin.contains( date.toString( "yyyy" ) ) || - pin.contains( date.toString( "ddMM" ) ) || - pin.contains( date.toString( "MMdd" ) ) ) - return false; - return true; -} - -void JsEsteidCard::showCert( int type ) -{ - CertificateDialog *c = new CertificateDialog; - if( type == 1 ) - c->setCertificate( m_authCert->cert() ); - else - c->setCertificate( m_signCert->cert() ); - c->show(); -} - -void JsEsteidCard::reconnect() -{ - if (!m_card) - return; - - try { - m_card->connect( m_reader ); - } catch ( std::runtime_error &e ) { - qDebug() << e.what(); - } -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.h qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.h 2011-07-01 07:38:25.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jsesteidcard.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include -#include - -#include -#include -#include "jscertdata.h" - -class JsEsteidCard : public QObject -{ - Q_OBJECT - -public: - JsEsteidCard( QObject *parent ); - - void setCard(EstEidCard *card, int reader = 0); - void reloadData(); - void reconnect(); - - EstEidCard *m_card; - int m_reader; - - JsCertData *m_authCert; - Q_PROPERTY(QObject* authCert READ getAuthCert) - QObject *getAuthCert() { return m_authCert; } - - JsCertData *m_signCert; - Q_PROPERTY(QObject* signCert READ getSignCert) - QObject *getSignCert() { return m_signCert; } - -public slots: - QString getSurName(); - QString getFirstName(); - QString getMiddleName(); - QString getSex(); - QString getCitizen(); - QString getBirthDate( const QString &locale = "en" ); - QString getId(); - QString getDocumentId(); - QString getExpiry( const QString &locale = "en" ); - QString getBirthPlace(); - QString getIssueDate(); - QString getResidencePermit(); - QString getComment1(); - QString getComment2(); - QString getComment3(); - QString getComment4(); - - bool canReadCard(); - bool isValid(); - - int getPin1RetryCount( bool connect = false ); - int getPin2RetryCount(); - int getPukRetryCount(); - - int getAuthUsageCount(); - int getSignUsageCount(); - - bool changePin1(QString newVal, QString oldVal); - bool changePin2(QString newVal, QString oldVal); - bool changePuk(QString newVal, QString oldVal); - bool unblockPin1(QString newVal, QString puk); - bool unblockPin2(QString newVal, QString puk); - bool validatePin1(QString oldVal); - bool validatePin2(QString oldVal); - bool validatePuk(QString oldVal); - bool checkPin( const QString &pin ); - - void showCert( int type ); - -signals: - void cardError(QString func, QString err); - -private: - PCSCManager *m_cardManager; - void handleError(QString msg); - dword authUsageCount; - dword signUsageCount; - - QString surName; - QString firstName; - QString middleName; - QString sex; - QString citizen; - QString birthDate; - QString id; - QString documentId; - QString expiry; - QString birthPlace; - QString issueDate; - QString residencePermit; - QString comment1; - QString comment2; - QString comment3; - QString comment4; - - bool cardOK; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.cpp 2010-10-28 18:17:57.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,484 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "CertUpdate.h" -#include "mainwindow.h" -#include "jsextender.h" -#include "common/Settings.h" -#include "SettingsDialog.h" - -JsExtender::JsExtender( MainWindow *main ) -: QObject( main ) -, m_mainWindow( main ) -, m_loading( 0 ) -{ - QString deflang; - switch( QLocale().language() ) - { - case QLocale::English: deflang = "en"; break; - case QLocale::Russian: deflang = "ru"; break; - case QLocale::Estonian: - default: deflang = "et"; break; - } - m_locale = Settings().value( "Main/Language", deflang ).toString(); - if ( m_locale.isEmpty() ) - m_locale = QLocale::system().name().left( 2 ); - setLanguage( m_locale ); - - connect( m_mainWindow->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), - this, SLOT(javaScriptWindowObjectCleared())); -} - -JsExtender::~JsExtender() -{ - if ( m_loading ) - m_loading->deleteLater(); - if ( QFile::exists( m_tempFile ) ) - QFile::remove( m_tempFile ); -} - -void JsExtender::setLanguage( const QString &lang ) -{ - m_locale = lang; - if ( m_locale == "C" ) - m_locale = "en"; - Settings().setValue( "Main/Language", m_locale ); - m_mainWindow->retranslate( m_locale ); -} - -void JsExtender::registerObject( const QString &name, QObject *object ) -{ - m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( name, object ); - - m_registeredObjects[name] = object; -} - -void JsExtender::javaScriptWindowObjectCleared() -{ - for (QMap::Iterator it = m_registeredObjects.begin(); it != m_registeredObjects.end(); ++it) - m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( it.key(), it.value() ); - - m_mainWindow->page()->mainFrame()->addToJavaScriptWindowObject( "extender", this ); -} - -QVariant JsExtender::jsCall( const QString &function, int argument ) -{ - return m_mainWindow->page()->mainFrame()->evaluateJavaScript( - QString( "%1(%2)" ).arg( function ).arg( argument ) ); -} - -QVariant JsExtender::jsCall( const QString &function, const QString &argument ) -{ - return m_mainWindow->page()->mainFrame()->evaluateJavaScript( - QString( "%1(\"%2\")" ).arg( function ).arg( argument ) ); -} - -QVariant JsExtender::jsCall( const QString &function, const QString &argument, const QString &argument2 ) -{ - return m_mainWindow->page()->mainFrame()->evaluateJavaScript( - QString( "%1(\"%2\",\"%3\")" ).arg( function ).arg( argument ).arg( argument2 ) ); -} - -void JsExtender::openUrl( const QString &url ) -{ QDesktopServices::openUrl( QUrl( url ) ); } - -QString JsExtender::checkPin() -{ - if ( !m_mainWindow->eidCard() || !m_mainWindow->eidCard()->m_card ) - throw std::runtime_error( "noCard" ); - if ( activeDocument.isEmpty() || activeDocument != m_mainWindow->eidCard()->getDocumentId() || pin.isEmpty() || - Settings().value( "Util/sessionTime").toInt() == 0 || - !m_dateTime.isValid() || m_dateTime.addSecs( Settings().value( "Util/sessionTime").toInt() * 60 ) < QDateTime::currentDateTime() ) - { - activeDocument = m_mainWindow->eidCard()->getDocumentId(); - m_dateTime = QDateTime::currentDateTime(); - return QString(); - } - return pin; -} - -QByteArray JsExtender::getUrl( SSLConnect::RequestType type, const QString &def ) -{ - QByteArray buffer; - - try { - SSLConnect sslConnect; - sslConnect.setPin( checkPin() ); - sslConnect.setCard( m_mainWindow->cardManager()->cardId( - m_mainWindow->cardManager()->activeReaderNum() ) ); - buffer = sslConnect.getUrl( type, def ); - pin = Settings().value( "Util/sessionTime").toInt() ? sslConnect.pin() : QString(); - } catch( const std::runtime_error &e ) { - throw std::runtime_error( e ); - } - m_mainWindow->eidCard()->reconnect(); - return buffer; -} - -void JsExtender::activateEmail( const QString &email ) -{ - QByteArray buffer; - try { - buffer = getUrl( SSLConnect::ActivateEmails, email ); - } catch( std::runtime_error &e ) { - jsCall( "handleError", e.what() ); - jsCall( "setEmails", "forwardFailed", "" ); - return; - } - if ( !buffer.size() ) - { - jsCall( "setEmails", "forwardFailed", "" ); - return; - } - xml.clear(); - xml.addData( buffer ); - QString result = "forwardFailed"; - while ( !xml.atEnd() ) - { - xml.readNext(); - if ( xml.isStartElement() && xml.name() == "fault_code" ) - { - result = xml.readElementText(); - break; - } - } - jsCall( "setEmailActivate", result ); -} - -void JsExtender::loadEmails() -{ - QByteArray buffer; - try { - buffer = getUrl( SSLConnect::EmailInfo, "" ); - } catch( std::runtime_error &e ) { - jsCall( "handleError", e.what() ); - jsCall( "setEmails", "loadFailed", "" ); - return; - } - - if ( !buffer.size() ) - { - jsCall( "setEmails", "loadFailed", "" ); - return; - } - xml.clear(); - xml.addData( buffer ); - QString result = "loadFailed", emails; - while ( !xml.atEnd() ) - { - xml.readNext(); - if ( xml.isStartElement() ) - { - if ( xml.name() == "fault_code" ) - { - result = xml.readElementText(); - continue; - } - if ( xml.name() == "ametlik_aadress" ) - emails += readEmailAddresses(); - } - } - if ( emails.length() > 4 ) - emails = emails.right( emails.length() - 4 ); - jsCall( "setEmails", result, emails ); -} - -QString JsExtender::readEmailAddresses() -{ - Q_ASSERT( xml.isStartElement() && xml.name() == "ametlik_aadress" ); - - QString emails; - - while ( !xml.atEnd() ) - { - xml.readNext(); - if ( xml.isStartElement() ) - { - if ( xml.name() == "epost" ) - emails += "
" + xml.readElementText(); - else if ( xml.name() == "suunamine" ) - emails += readForwards(); - } - } - return emails; -} - -QString JsExtender::readForwards() -{ - Q_ASSERT( xml.isStartElement() && xml.name() == "suunamine" ); - - bool emailActive = false, forwardActive = false; - QString email; - - while ( !xml.atEnd() ) - { - xml.readNext(); - if ( xml.isEndElement() ) - break; - if ( xml.isStartElement() ) - { - if ( xml.name() == "epost" ) - email = xml.readElementText(); - else if ( xml.name() == "aktiivne" && xml.readElementText() == "true" ) - emailActive = true; - else if ( xml.name() == "aktiiveeritud" && xml.readElementText() == "true" ) - forwardActive = true; - } - } - return (emailActive && forwardActive ) ? tr( " - %1 (active)" ).arg( email ) : tr( " - %1 (not active)" ).arg( email ); -} - -void JsExtender::loadPicture() -{ - QString result = "loadPicFailed"; - QByteArray buffer; - try { - buffer = getUrl( SSLConnect::PictureInfo, "" ); - } catch( std::runtime_error &e ) { - jsCall( "handleError", e.what() ); - jsCall( "setPicture", "", result ); - return; - } - if ( !buffer.size() ) - { - jsCall( "setPicture", "", result ); - return; - } - - QPixmap pix; - if ( pix.loadFromData( buffer ) ) - { - QTemporaryFile file( QString( "%1%2XXXXXX.jpg" ) - .arg( QDir::tempPath() ).arg( QDir::separator() ) ); - file.setAutoRemove( false ); - if ( file.open() ) - { - m_tempFile = file.fileName(); - if ( pix.save( &file ) ) - { - jsCall( "setPicture", QUrl::fromLocalFile(m_tempFile).toString(), "" ); - return; - } - } - jsCall( "setPicture", "", QString( "loadPicFailed3|%1" ).arg( file.errorString() ) ); - } else { //probably got xml error string - QString result2 = "loadPicFailed2"; - xml.clear(); - xml.addData( buffer ); - while ( !xml.atEnd() ) - { - xml.readNext(); - if ( xml.isStartElement() && xml.name() == "fault_code" ) - { - result2 = xml.readElementText(); - break; - } - } - jsCall( "setPicture", "", result2 ); - } -} - -void JsExtender::savePicture() -{ - if ( !QFile::exists( m_tempFile ) ) - { - jsCall( "handleError", "savePicFailed" ); - return; - } - QString pFile = QDesktopServices::storageLocation( QDesktopServices::PicturesLocation ); - if ( m_mainWindow->eidCard() ) - pFile += QString( "%1%2.jpg" ).arg( QDir::separator() ).arg( m_mainWindow->eidCard()->getId() ); - QString file = QFileDialog::getSaveFileName( m_mainWindow, tr( "Save picture" ), pFile, tr( "JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp)" ) ); - if( file.isEmpty() ) - return; - QString ext = QFileInfo( file ).suffix(); - if( ext != "png" && ext != "jpg" && ext != "jpeg" && ext != "tiff" && ext != "bmp" ) - file.append( ".jpg" ); - QPixmap pix; - if ( !pix.load( m_tempFile ) ) - { - jsCall( "handleError", "savePicFailed" ); - return; - } - pix.save( file ); -} - -void JsExtender::getMidStatus() -{ - QString result = "mobileFailed"; - QByteArray buffer; - - QString data = "" - "" - "" - "" - ""; - QString header = "POST /id/midstatusinfolive/ HTTP/1.1\r\n" - "Host: " + QString(SK) + "\r\n" - "Content-Type: text/xml\r\n" - "Content-Length: " + QString::number( data.size() ) + "\r\n" - "SOAPAction: \"\"\r\n" - "Connection: close\r\n\r\n"; - try { - buffer = getUrl( SSLConnect::MobileInfo, header + data ); - } catch( std::runtime_error &e ) { - jsCall( "handleError", e.what() ); - jsCall( "setMobile", "", result ); - return; - } - if ( !buffer.size() ) - { - jsCall( "setMobile", "", result ); - return; - } - //qDebug() << buffer; - if ( !buffer.isEmpty() ) - { - QDomDocument doc; - if ( !doc.setContent( buffer ) ) - { - jsCall( "handleError", result ); - return; - } - QDomElement e = doc.documentElement(); - if ( !e.elementsByTagName( "ResponseStatus" ).size() ) - { - jsCall( "handleError", result ); - return; - } - MobileResult mRes = (MobileResult)e.elementsByTagName( "ResponseStatus" ).item(0).toElement().text().toInt(); - QString mResString, mNotice; - switch( mRes ) - { - case NoCert: mNotice = "mobileNoCert"; break; - case NotActive: mNotice = "mobileNotActive"; break; - case NoIDCert: mResString = "noIDCert"; break; - case InternalError: mResString = "mobileInternalError"; break; - case InterfaceNotReady: mResString = "mobileInterfaceNotReady"; break; - case OK: - default: break; - } - if ( !mResString.isEmpty() ) - { - jsCall( "handleError", mResString ); - return; - } - if ( !mNotice.isEmpty() ) - { - jsCall( "handleNotice", mNotice ); - return; - } - mResString = QString( "%1;%2;%3;%4" ) - .arg( e.elementsByTagName( "MSISDN" ).item(0).toElement().text() ) - .arg( e.elementsByTagName( "Operator" ).item(0).toElement().text() ) - .arg( e.elementsByTagName( "Status" ).item(0).toElement().text() ) - .arg( e.elementsByTagName( "URL" ).item(0).toElement().text() ); - jsCall( "setMobile", mResString ); - } -} - -void JsExtender::httpRequestFinished( int, bool error ) -{ - if ( error) - qDebug() << "Download failed: " << m_http.errorString(); - - QByteArray result = m_http.readAll(); -} - -void JsExtender::showSettings() -{ (new SettingsDialog( m_mainWindow ) )->show(); } - -void JsExtender::showLoading( const QString &str ) -{ - bool wide = (str.size() > 20); - if ( !m_loading ) - { - m_loading = new QLabel( m_mainWindow ); - m_loading->setStyleSheet( "background-color: rgba(255,255,255,200); border: 1px solid #cddbeb; border-radius: 5px;" - "color: #509b00; font-weight: bold; font-family: Arial; font-size: 18px;" ); - m_loading->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - } - m_loading->setFixedSize( wide ? 300 : 250, 100 ); - m_loading->move( wide ? 155 : 180, 305 ); - m_loading->setText( str ); - m_loading->show(); - QCoreApplication::processEvents(); -} - -void JsExtender::closeLoading() -{ - if ( m_loading ) - m_loading->close(); -} - -void JsExtender::showMessage( const QString &type, const QString &message, const QString &title ) -{ - if ( type == "warning" ) - QMessageBox::warning( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); - else if ( type == "error" ) - QMessageBox::critical( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); - else - QMessageBox::information( m_mainWindow, title.isEmpty() ? m_mainWindow->windowTitle() : title, message, QMessageBox::Ok ); -} - -bool JsExtender::updateCertAllowed() -{ - QMessageBox::StandardButton b = QMessageBox::warning( m_mainWindow, tr("Certificate update"), - tr("For updating certificates please close all programs which are interacting with smartcard " - "(qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)
" - "After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.
" - "Do you want to continue?"), - QMessageBox::Yes|QMessageBox::No, QMessageBox::No ); - if( b == QMessageBox::No ) - return false; - bool result = false; - try { - CertUpdate *c = new CertUpdate( m_mainWindow->cardManager()->activeReaderNum(), this ); - result = c->checkUpdateAllowed(); - } catch ( std::runtime_error &e ) { - QMessageBox::warning( m_mainWindow, tr( "Certificate update" ), tr("Certificate update failed:
%1").arg( QString::fromUtf8( e.what() ) ), QMessageBox::Ok ); - } - return result; -} - -bool JsExtender::updateCert() -{ - bool result = false; - try { - CertUpdate *c = new CertUpdate( m_mainWindow->cardManager()->activeReaderNum(), this ); - if ( c->checkUpdateAllowed() && m_mainWindow->eidCard()->m_authCert ) - { - c->startUpdate(); - result = true; - } - } catch ( std::runtime_error &e ) { - QMessageBox::warning( m_mainWindow, tr( "Certificate update" ), tr("Certificate update failed: %1").arg( QString::fromUtf8( e.what() ) ), QMessageBox::Ok ); - } - return result; -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.h qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/jsextender.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include "../common/sslConnect.h" - -#include -#include -#include -#include -#include -#include - -class MainWindow; -class SettingsDialog; - -class JsExtender : public QObject -{ - Q_OBJECT - -public: - enum MobileResult { - OK = 0, - NoCert = 1, - NotActive = 2, - NoIDCert = 3, - InternalError = 100, - InterfaceNotReady = 101 - }; - JsExtender( MainWindow* ); - ~JsExtender(); - void registerObject( const QString &name, QObject *object ); - -private: - MainWindow *m_mainWindow; - QMap m_registeredObjects; - QString m_tempFile; - QXmlStreamReader xml; - QString m_locale; - QDateTime m_dateTime; - QLabel *m_loading; - QByteArray getUrl( SSLConnect::RequestType, const QString &def ); - QString pin; - QString activeDocument; - QHttp m_http; - -public slots: - void setLanguage( const QString &lang ); - void javaScriptWindowObjectCleared(); - QVariant jsCall( const QString &function, int argument ); - QVariant jsCall( const QString &function, const QString &argument ); - QVariant jsCall( const QString &function, const QString &argument, const QString &argument2 ); - QString checkPin(); - void openUrl( const QString &url ); - - void loadEmails(); - void activateEmail( const QString &email ); - QString readEmailAddresses(); - QString readForwards(); - - void loadPicture(); - void savePicture(); - - QString locale() { return m_locale; } - void showSettings(); - - void showLoading( const QString & ); - void closeLoading(); - - void getMidStatus(); - void httpRequestFinished( int, bool error ); - - void showMessage( const QString &type, const QString &message, const QString &title = "" ); - - bool updateCertAllowed(); - bool updateCert(); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/main.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/main.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/main.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include - -#include "mainwindow.h" -#include "version.h" - -int main(int argc, char *argv[]) -{ - QtSingleApplication app(argc, argv); - app.setApplicationName( APP ); - app.setApplicationVersion( VER_STR( FILE_VER_DOT ) ); - app.setOrganizationDomain( DOMAINURL ); - app.setOrganizationName( ORG ); - - if( app.isRunning() ) - { - app.activateWindow(); - return 0; - } - - SSL_load_error_strings(); - SSL_library_init(); - - MainWindow w; - app.setActivationWindow( &w ); - w.show(); - return app.exec(); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.cpp 2010-10-19 16:39:28.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "mainwindow.h" - -#include "jsextender.h" -#include "jscardmanager.h" - -#include -#include -#include -#include - -MainWindow::MainWindow( QWidget *parent ) -: QWebView( parent ) -{ - setWindowFlags( Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowTitleHint ); -#if QT_VERSION >= 0x040500 - setWindowFlags( windowFlags() | Qt::WindowCloseButtonHint ); -#else - setWindowFlags( windowFlags() | Qt::WindowSystemMenuHint ); -#endif - page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff ); - page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff ); - setContextMenuPolicy(Qt::PreventContextMenu); - setWindowIcon( QIcon( ":/html/images/id_icon_48x48.png" ) ); - setFixedSize( 585, 535 ); - - appTranslator = new QTranslator( this ); - qtTranslator = new QTranslator( this ); - commonTranslator = new QTranslator( this ); - QApplication::instance()->installTranslator( appTranslator ); - QApplication::instance()->installTranslator( qtTranslator ); - QApplication::instance()->installTranslator( commonTranslator ); - - m_jsExtender = new JsExtender( this ); - - jsEsteidCard = new JsEsteidCard( this ); - jsCardManager = new JsCardManager( jsEsteidCard ); - - connect(jsCardManager, SIGNAL(cardEvent(QString, int)), - m_jsExtender, SLOT(jsCall(QString, int))); - connect(jsCardManager, SIGNAL(cardError(QString, QString)), - m_jsExtender, SLOT(jsCall(QString, QString))); - connect(jsEsteidCard, SIGNAL(cardError(QString, QString)), - m_jsExtender, SLOT(jsCall(QString, QString))); - - m_jsExtender->registerObject("esteidData", jsEsteidCard); - m_jsExtender->registerObject("cardManager", jsCardManager); - -#if defined(Q_OS_MAC) - QMenuBar *bar = new QMenuBar; - QMenu *menu = bar->addMenu( tr("&File") ); - QAction *pref = menu->addAction( tr("Settings"), m_jsExtender, SLOT(showSettings()) ); - QAction *close = menu->addAction( tr("Close"), qApp, SLOT(quit()) ); - pref->setMenuRole( QAction::PreferencesRole ); - close->setShortcut( Qt::CTRL + Qt::Key_W ); -#endif - - load(QUrl("qrc:/html/index.html")); -} - -void MainWindow::retranslate( const QString &lang ) -{ - appTranslator->load( ":/translations/" + lang ); - qtTranslator->load( ":/translations/qt_" + lang ); - commonTranslator->load( ":/translations/common_" + lang ); - setWindowTitle(QApplication::translate("MainWindow", "ID-card utility", 0, QApplication::UnicodeUTF8)); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.h qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/mainwindow.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class JsCardManager; -class JsEsteidCard; -class JsExtender; -class QTranslator; - -class MainWindow : public QWebView -{ - Q_OBJECT - -public: - MainWindow( QWidget *parent = 0 ); - JsEsteidCard* eidCard() { return jsEsteidCard; } - JsCardManager* cardManager() { return jsCardManager; } - void retranslate( const QString &lang ); - -private: - JsExtender *m_jsExtender; - JsCardManager *jsCardManager; - JsEsteidCard *jsEsteidCard; - QTranslator *appTranslator, *qtTranslator, *commonTranslator; -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.qrc qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.qrc --- qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.qrc 2009-07-12 22:27:38.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.qrc 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - html/index.html - html/lang.js - html/script.js - html/style.css - html/images/button.png - html/images/buttonSelected.png - html/images/linegray.png - html/images/logo.png - html/images/topLogo.png - html/images/logotext.png - html/images/id_icon_48x48.png - html/images/flag_estonian.png - html/images/flag_english.png - html/images/flag_russian.png - ../common/images/ico_stamp_blue_75.png - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.rc qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.rc --- qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.rc 2009-09-23 08:53:23.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/qesteidutil.rc 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef Q_CC_BOR -# if defined(UNDER_CE) && UNDER_CE >= 400 -# include -# else -# include -# endif -#endif - -#include "version.h" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION FILE_VER -PRODUCTVERSION FILE_VER -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", ORG "\0" - VALUE "FileDescription", APP "\0" - VALUE "FileVersion", VER_STR(FILE_VER) "\0" - VALUE "InternalName", "QEstEidUtil\0" - VALUE "OriginalFilename", "QEstEidUtil.exe\0" - VALUE "ProductName", APP "\0" - VALUE "ProductVersion", VER_STR(FILE_VER) "\0" - END - END -END -/* End of Version info */ - -IDI_ICON1 ICON DISCARDABLE "html/images/id_icon_48x48.ico" diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.cpp qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.cpp --- qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.cpp 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "SettingsDialog.h" -#include "common/Settings.h" - -#include - -SettingsDialog::SettingsDialog( QWidget *parent ) -: QDialog( parent ) -{ - setupUi( this ); - setAttribute( Qt::WA_DeleteOnClose, true ); - - Settings s; - s.beginGroup( "Util" ); - sessionTime->setValue( s.value( "sessionTime", 0 ).toInt() ); - -#ifdef WIN32 - updateInterval->addItem( tr("Once a day"), "-daily" ); - updateInterval->addItem( tr("Once a week"), "-weekly" ); - updateInterval->addItem( tr("Once a month"), "-monthly" ); - updateInterval->addItem( tr("Never"), "-remove" ); - int interval = updateInterval->findText( s.value( "updateInterval" ).toString() ); - if ( interval == -1 ) - interval = 0; - updateInterval->setCurrentIndex( interval ); - autoUpdate->setChecked( s.value( "autoUpdate", true ).toBool() ); -#else - updateInterval->hide(); - updateIntervalLabel->hide(); - autoUpdate->hide(); - autoUpdateLabel->hide(); -#endif -} - -void SettingsDialog::accept() -{ - Settings s; - s.beginGroup( "Util" ); - s.setValue( "sessionTime", sessionTime->value() ); - - s.setValue( "updateInterval", updateInterval->currentText() ); - s.setValue( "autoUpdate", autoUpdate->isChecked() ); - -#ifdef WIN32 - QStringList list; - if ( !autoUpdate->isChecked() ) - list << "-remove"; - else - list << updateInterval->itemData( updateInterval->currentIndex() ).toString(); - QProcess::startDetached( "id-updater.exe", list ); -#endif - - done( 1 ); -} diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.h qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/SettingsDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include "ui_SettingsDialog.h" - -class SettingsDialog: public QDialog, private Ui::SettingsDialog -{ - Q_OBJECT -public: - SettingsDialog( QWidget *parent = 0 ); - -public slots: - void accept(); -}; diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/translations/en.ts qesteidutil-0.3.1/=unpacked-tar1=/src/translations/en.ts --- qesteidutil-0.3.1/=unpacked-tar1=/src/translations/en.ts 2011-05-26 08:56:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/translations/en.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ - - - - - CertUpdate - - update not allowed! - update not allowed! - - - Check internet connection - Check internet connection - - - Server sai vale arvu baite, samm: %1 - - - - Serveri töös tekkisid vead, samm: %1 - - - - Kaardi vastuse parsimisel tekkis viga, samm: %1 - Failed to parse responce from card, step: %1 - - - Sertifitseerimiskeskus ei vasta, samm: %1 - - - - - DiagnosticsDialog - - Diagnostics - Diagnostics - - - ID-card utility version: - ID-card utility version: - - - Library paths: - Library paths: - - - Card readers - Card readers - - - ID - %1 - ID - %1 - - - Error reading card data: - Error reading card data: - - - Save as - Save as - - - Text files (*.txt) - Text files (*.txt) - - - Error occurred - Error occurred - - - Failed write to file! - Failed write to file! - - - OS: - OS: - - - Libraries - Libraries - - - Smart Card service status: - Smart Card service status: - - - PCSC service status: - PCSC service status: - - - Running - Running - - - Not running - Not running - - - %1 - failed to get version info - %1 - failed to get version info - - - - JsExtender - - - %1 (active) - - %1 (active) - - - - %1 (not active) - - %1 (not active) - - - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - - - Save picture - Save picture - - - Certificate update - Certificate update - - - Certificate update failed: %1 - Certificate update failed: %1 - - - Certificate update failed:<br />%1 - Certificate update failed:<br />%1 - - - For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? - For updating certificates please close all programs which are interacting with smartcard (Client, Crypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? - - - - MainWindow - - ID-card utility - ID-card utility - - - &File - &File - - - Settings - Settings - - - Close - Close - - - - SettingsDialog - - Settings - Settings - - - Check updates - Check updates - - - Update automatically - Update automatically - - - Once a day - Once a day - - - Once a week - Once a week - - - Once a month - Once a month - - - Never - Never - - - Save PIN1 for specified period in minutes -0 - always ask - Save PIN1 for specified period in minutes -0 - always ask - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/translations/et.ts qesteidutil-0.3.1/=unpacked-tar1=/src/translations/et.ts --- qesteidutil-0.3.1/=unpacked-tar1=/src/translations/et.ts 2011-05-26 08:56:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/translations/et.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ - - - - - CertUpdate - - update not allowed! - uuendamine ei ole lubatud! - - - Check internet connection - kontrollige interneti ühendust - - - Server sai vale arvu baite, samm: %1 - Server sai vale arvu baite, samm: %1 - - - Serveri töös tekkisid vead, samm: %1 - Serveri töös tekkisid vead, samm: %1 - - - Kaardi vastuse parsimisel tekkis viga, samm: %1 - Kaardi vastuse parsimisel tekkis viga, samm: %1 - - - Sertifitseerimiskeskus ei vasta, samm: %1 - Sertifitseerimiskeskus ei vasta, samm: %1 - - - - DiagnosticsDialog - - Diagnostics - Diagnostika - - - ID-card utility version: - ID-kaardi haldusvahendi versioon: - - - Library paths: - Teegi otsing: - - - Card readers - Kaardilugejad - - - ID - %1 - ID - %1 - - - Error reading card data: - Kaardilt andmete lugemine ebaõnnestus: - - - Save as - Salvesta - - - Text files (*.txt) - Teksti failid (*.txt) - - - Error occurred - Tekkis viga - - - Failed write to file! - Faili kirjutamine ebaõnnestus! - - - OS: - Operatsioonisüsteem: - - - Libraries - Teegid - - - Smart Card service status: - Smart Card teenuse staatus: - - - PCSC service status: - PCSC teenuse staatus: - - - Running - Töötab - - - Not running - Ei tööta - - - %1 - failed to get version info - %1 - viga versiooniinfo lugemisel - - - - JsExtender - - - %1 (active) - - %1 (aktiivne) - - - - %1 (not active) - - %1 (mitteaktiivne) - - - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - - - Save picture - Salvesta pilt - - - Certificate update - Sertifikaatide uuendus - - - Certificate update failed: %1 - Sertifikaatide uuendamine ebaõnnestus: %1 - - - Certificate update failed:<br />%1 - Sertifikaatide uuendamine ebaõnnestus:<br />%1 - - - For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? - Sertifikaatite uuendamiseks palun sulgege kõik rakendused, mis kasutavad ID-kaarti (Klient, Krüpto, Firefox, Safari, Internet Explorer...)<br />Pärast sertifikaatide uuendamist ei ole võimalik enam dekrüpteerida vana sertifikaadiga krüpteeritud dokumente!< br />Kas soovite jätkata sertifikaatide uuendamisega? - - - - MainWindow - - ID-card utility - ID-kaardi haldusvahend - - - &File - &Fail - - - Settings - Seaded - - - Close - Sulge - - - - SettingsDialog - - Settings - Seaded - - - Check updates - Kontrolli uuendusi - - - Update automatically - Uuenda automaatselt - - - Once a day - Kord päevas - - - Once a week - Kord nädalas - - - Once a month - Kord kuus - - - Never - Mitte kunagi - - - Save PIN1 for specified period in minutes -0 - always ask - Salvesta PIN1 määratud minutiteks -0 - küsi iga kord - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/translations/ru.ts qesteidutil-0.3.1/=unpacked-tar1=/src/translations/ru.ts --- qesteidutil-0.3.1/=unpacked-tar1=/src/translations/ru.ts 2011-05-26 08:56:30.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/translations/ru.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ - - - - - CertUpdate - - update not allowed! - oбновление не разрешено! - - - Check internet connection - Проверте подключение к интернету - - - Server sai vale arvu baite, samm: %1 - Сервер получил неправильное количество байтов, шаг: %1 - - - Serveri töös tekkisid vead, samm: %1 - В работе сервера произошла ошибка, шаг: %1 - - - Kaardi vastuse parsimisel tekkis viga, samm: %1 - - - - Sertifitseerimiskeskus ei vasta, samm: %1 - Центр сертифицирования не отвечает, шаг: %1 - - - - DiagnosticsDialog - - ID-card utility version: - Версия: - - - OS: - Оп. система: - - - Library paths: - Поиск по тэгам: - - - Libraries - Тэги - - - Smart Card service status: - Статус Smart Card сервиса: - - - PCSC service status: - Статус PCSC сервиса: - - - Running - Работает - - - Not running - Не работает - - - Card readers - Считыватели карт - - - %1 - failed to get version info - %1 - ошибка при чтении версии - - - ID - %1 - ID - %1 - - - Error reading card data: - Ошибка при чтении с карты: - - - Save as - Сохранить - - - Text files (*.txt) - Текстовые файлы (*.txt) - - - Error occurred - Возникла ошибка - - - Failed write to file! - Запись файла неудачна! - - - Diagnostics - Диагностика - - - - JsExtender - - - %1 (active) - - %1 (активно) - - - - %1 (not active) - - %1 (неактивно) - - - Save picture - Cохранить картинку - - - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - JPEG (*.jpg *.jpeg);;PNG (*.png);;TIFF (*.tif *.tiff);;24-bit Bitmap (*.bmp) - - - Certificate update - Обновление сертификата - - - Certificate update failed: %1 - Неудачное обновление сертификата: %1 - - - Certificate update failed:<br />%1 - Неудачное обновление сертификата:<br />%1 - - - For updating certificates please close all programs which are interacting with smartcard (qdigidocclient, qdigidoccrypto, Firefox, Safari, Internet Explorer...)<br />After updating certificates it will no longer be possible to decrypt documents that were encrypted with the old certificate.<br />Do you want to continue? - Для обновления сертификата пожалуйста закройте все приложения, которые используют ID-карту (Клиент, Crypto, Firefox, Safari, Internet Explorer...)<br />После обновления сертификатов шифровка документов будет невозможна!<br />Хотите продолжить? - - - - MainWindow - - ID-card utility - Oбсуживание ID-карты - - - &File - &Файл - - - Settings - Настройки - - - Close - Закрыть - - - - SettingsDialog - - Settings - Настройки - - - Save PIN1 for specified period in minutes -0 - always ask - Сохранять PIN1 на обозначенный период в минутах -0 - всегда спрашивать - - - Check updates - Проверить на обновления - - - Update automatically - Обновлять автоматически - - - Once a day - Раз в день - - - Once a week - Раз в неделю - - - Once a month - Раз в месяц - - - Never - Никогда - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/translations/tr.qrc.cmake qesteidutil-0.3.1/=unpacked-tar1=/src/translations/tr.qrc.cmake --- qesteidutil-0.3.1/=unpacked-tar1=/src/translations/tr.qrc.cmake 2009-12-29 13:11:47.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/translations/tr.qrc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - @QM_DIR@/en.qm - @QM_DIR@/et.qm - @QM_DIR@/ru.qm - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/ui/DiagnosticsDialog.ui qesteidutil-0.3.1/=unpacked-tar1=/src/ui/DiagnosticsDialog.ui --- qesteidutil-0.3.1/=unpacked-tar1=/src/ui/DiagnosticsDialog.ui 2009-05-25 00:31:14.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/ui/DiagnosticsDialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ - - - DiagnosticsDialog - - - - 0 - 0 - 400 - 300 - - - - - 400 - 300 - - - - - 400 - 300 - - - - Diagnostics - - - #DiagnosticsDialog { background: #F5F5F5; } - -QPushButton { height: 25px; border-radius: 3px; font-family: Arial; font-size: 12px; width: 80px; border: 1px solid #1a4b79; color: #ffffff; background-image: url(:/html/images/button.png); } -QPushButton::hover, QPushButton::focus { background-image: url(:/html/images/buttonSelected.png); border: 1px solid #ce911b; color: #00355f } - - - - - - - true - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close|QDialogButtonBox::Save - - - - - - - - - - - buttonBox - rejected() - DiagnosticsDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - buttonBox - accepted() - DiagnosticsDialog - save() - - - 248 - 254 - - - 157 - 274 - - - - - - save() - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/ui/SettingsDialog.ui qesteidutil-0.3.1/=unpacked-tar1=/src/ui/SettingsDialog.ui --- qesteidutil-0.3.1/=unpacked-tar1=/src/ui/SettingsDialog.ui 2009-10-31 11:02:10.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/ui/SettingsDialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ - - - SettingsDialog - - - - 0 - 0 - 398 - 155 - - - - Settings - - - #SettingsDialog { background: #F5F5F5; } -QLabel { color: #355670; font-family: Arial; font-size: 14px; } -QSpinBox { border: 1px solid #cddbeb; } - -QPushButton { height: 25px; border-radius: 3px; font-family: Arial; font-size: 12px; width: 80px; border: 1px solid #1a4b79; color: #ffffff; background-image: url(:/html/images/button.png); } -QPushButton::hover, QPushButton::focus { background-image: url(:/html/images/buttonSelected.png); border: 1px solid #ce911b; color: #00355f } - - - - - - - - Save PIN1 for specified period in minutes -0 - always ask - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Check updates - - - - - - - Qt::Vertical - - - - 20 - 56 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close|QDialogButtonBox::Save - - - - - - - Update automatically - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - buttonBox - accepted() - SettingsDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - SettingsDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru qesteidutil-0.3.1/=unpacked-tar1=/src/version.h qesteidutil-0.3.1/=unpacked-tar1=/src/version.h --- qesteidutil-0.3.1/=unpacked-tar1=/src/version.h 2010-03-25 13:28:17.000000000 +0000 +++ qesteidutil-0.3.1/=unpacked-tar1=/src/version.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* - * QEstEidUtil - * - * Copyright (C) 2009-2010 Estonian Informatics Centre - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#define MAJOR_VER 0 -#define MINOR_VER 1 -#define RELEASE_VER 0 - -#ifndef BUILD_VER -#define BUILD_VER 0 -#endif - -#define FILE_VER MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER -#define FILE_VER_DOT MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER -#define VER_STR_HELPER(x) #x -#define VER_STR(x) VER_STR_HELPER(x) - -#define ORG "Estonian ID Card" -#define APP "ID kaardi haldusvahend" -#define DOMAINURL "eesti.ee"