Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/qt3support/dialogs/q3filedialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    508508}
    509509
    510 // Don't remove the lines below!
    511 //
    512 // resolving the W methods manually is needed, because Windows 95 doesn't include
    513 // these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
    514 // when Qt calls getEsistingDirectory(), etc.
    515510#if defined(Q_WS_WIN)
    516 
    517 typedef UINT (WINAPI *PtrExtractIconEx)(LPCTSTR,int,HICON*,HICON*,UINT);
    518 static PtrExtractIconEx ptrExtractIconEx = 0;
    519 
    520 static void resolveLibs()
    521 {
    522 #ifndef Q_OS_WINCE
    523     static bool triedResolve = false;
    524 
    525     if (!triedResolve) {
    526 #ifndef QT_NO_THREAD
    527         // protect initialization
    528         QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
    529         // check triedResolve again, since another thread may have already
    530         // done the initialization
    531         if (triedResolve) {
    532             // another thread did initialize the security function pointers,
    533             // so we shouldn't do it again.
    534             return;
    535         }
    536 #endif
    537         triedResolve = true;
    538         if (qt_winUnicode()) {
    539             QLibrary lib(QLatin1String("shell32"));
    540             ptrExtractIconEx = (PtrExtractIconEx) lib.resolve("ExtractIconExW");
    541         }
    542     }
    543 #endif
    544 }
    545 #ifdef Q_OS_WINCE
    546 #define PtrExtractIconEx ExtractIconEx
    547 #endif
    548 
    549511class QWindowsIconProvider : public Q3FileIconProvider
    550512{
     
    632594    void keyPressEvent(QKeyEvent *e);
    633595    void focusOutEvent(QFocusEvent *e);
     596    void emitDoRename();
    634597
    635598signals:
     
    11441107void QRenameEdit::focusOutEvent(QFocusEvent *)
    11451108{
    1146     if (!doRenameAlreadyEmitted) {
    1147         doRenameAlreadyEmitted = true;
    1148         emit doRename();
    1149     }
     1109    if (!doRenameAlreadyEmitted)
     1110        emitDoRename();
    11501111}
    11511112
    11521113void QRenameEdit::slotReturnPressed()
     1114{
     1115    emitDoRename();
     1116}
     1117
     1118void QRenameEdit::emitDoRename()
    11531119{
    11541120    doRenameAlreadyEmitted = true;
    11551121    emit doRename();
     1122    doRenameAlreadyEmitted = false;
    11561123}
    11571124
     
    25622529
    25632530    d->previewContents = new QToolButton(this, "preview info view");
    2564 #if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
    2565     if ((qWinVersion() & Qt::WV_NT_based) > Qt::WV_NT)
    2566 #else
    25672531    if (!qstrcmp(style()->className(), "QWindowsStyle"))
    2568 #endif
    25692532    {
    25702533        d->goBack->setAutoRaise(true);
     
    38753838        }
    38763839        if (i->isSelected() && !((Q3FileDialogPrivate::File *)i)->info.isDir())
    3877             str += QString(QLatin1String("\"%1\" ")).arg(i->text(0));
     3840            str += QString::fromLatin1("\"%1\" ").arg(i->text(0));
    38783841        i = i->nextSibling();
    38793842    }
     
    39273890        if (d->moreFiles->isSelected(i)
    39283891             && !((Q3FileDialogPrivate::File*)(mcitem)->i)->info.isDir()) {
    3929             str += QString(QLatin1String("\"%1\" ")).arg(i->text());
     3892                 str += QString::fromLatin1("\"%1\" ").arg(i->text());
    39303893            if (j == 0)
    39313894                j = i;
     
    46074570Q3FileDialog::PreviewMode Q3FileDialog::previewMode() const
    46084571{
    4609     if (d->infoPreview && d->infoPreviewWidget->isVisible())
     4572    if (d->infoPreview && d->infoPreviewWidget->isVisibleTo(const_cast<Q3FileDialog *>(this)))
    46104573        return Info;
    4611     else if (d->contentsPreview && d->contentsPreviewWidget->isVisible())
     4574    else if (d->contentsPreview
     4575             && d->contentsPreviewWidget->isVisibleTo(const_cast<Q3FileDialog *>(this)))
    46124576        return Contents;
    4613 
    46144577    return NoPreview;
    46154578}
     
    48744837{
    48754838    QString s;
    4876     QT_WA({
    4877         char buf[1024];
    4878         DWORD bsz = sizeof(buf);
    4879         int r = RegQueryValueEx(key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)buf, &bsz);
    4880         if (r == ERROR_SUCCESS) {
    4881             s = QString::fromUcs2((unsigned short *)buf);
    4882         } else if (r == ERROR_MORE_DATA) {
    4883             char *ptr = new char[bsz+1];
    4884             r = RegQueryValueEx(key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)ptr, &bsz);
    4885             if (r == ERROR_SUCCESS)
    4886                 s = QLatin1String(ptr);
    4887             delete [] ptr;
    4888         }
    4889     } , {
    4890         char buf[512];
    4891         DWORD bsz = sizeof(buf);
    4892         int r = RegQueryValueExA(key, subKey.local8Bit(), 0, 0, (LPBYTE)buf, &bsz);
    4893         if (r == ERROR_SUCCESS) {
    4894             s = QLatin1String(buf);
    4895         } else if (r == ERROR_MORE_DATA) {
    4896             char *ptr = new char[bsz+1];
    4897             r = RegQueryValueExA(key, subKey.local8Bit(), 0, 0, (LPBYTE)ptr, &bsz);
    4898             if (r == ERROR_SUCCESS)
    4899                 s = QLatin1String(ptr);
    4900             delete [] ptr;
    4901         }
    4902     });
     4839
     4840    wchar_t buf[1024];
     4841    DWORD bsz = sizeof(buf) / sizeof(wchar_t);
     4842    int r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)buf, &bsz);
     4843    if (r == ERROR_SUCCESS) {
     4844        s = QString::fromWCharArray(buf);
     4845    } else if (r == ERROR_MORE_DATA) {
     4846        char *ptr = new char[bsz+1];
     4847        r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)ptr, &bsz);
     4848        if (r == ERROR_SUCCESS)
     4849            s = QLatin1String(ptr);
     4850        delete [] ptr;
     4851    }
     4852
    49034853    return s;
    49044854}
     
    49214871    HKEY k;
    49224872    HICON si;
    4923     int r;
    49244873    QString s;
    49254874    UINT res = 0;
     
    49274876    // ---------- get default folder pixmap
    49284877    const wchar_t iconFolder[] = L"folder\\DefaultIcon"; // workaround for Borland
    4929     QT_WA({
    4930         r = RegOpenKeyEx(HKEY_CLASSES_ROOT,
    4931                            iconFolder,
    4932                            0, KEY_READ, &k);
    4933     } , {
    4934         r = RegOpenKeyExA(HKEY_CLASSES_ROOT,
    4935                            "folder\\DefaultIcon",
    4936                            0, KEY_READ, &k);
    4937     });
    4938     resolveLibs();
     4878    int r = RegOpenKeyEx(HKEY_CLASSES_ROOT, iconFolder, 0, KEY_READ, &k);
     4879
    49394880    if (r == ERROR_SUCCESS) {
    49404881        s = getWindowsRegString(k, QString());
     
    49444885
    49454886        if (lst.count() >= 2) { // don't just assume that lst has two entries
    4946 #ifndef Q_OS_WINCE
    4947             QT_WA({
    4948                 res = ptrExtractIconEx((TCHAR*)lst[0].simplifyWhiteSpace().ucs2(),
    4949                                        lst[1].simplifyWhiteSpace().toInt(),
    4950                                        0, &si, 1);
    4951             } , {
    4952                 res = ExtractIconExA(lst[0].simplifyWhiteSpace().local8Bit(),
    4953                                      lst[1].simplifyWhiteSpace().toInt(),
    4954                                      0, &si, 1);
    4955             });
    4956 #else
    4957             res = (UINT)ExtractIconEx((TCHAR*)lst[0].simplifyWhiteSpace().ucs2(),
    4958                                         lst[1].simplifyWhiteSpace().toInt(),
    4959                                         0, &si, 1);
    4960 #endif
     4887            res = ExtractIconEx((wchar_t*)lst[0].simplifyWhiteSpace().utf16(), lst[1].simplifyWhiteSpace().toInt(), 0, &si, 1);
    49614888        }
    49624889
     
    49744901
    49754902    //------------------------------- get default file pixmap
    4976 #ifndef Q_OS_WINCE
    4977     QT_WA({
    4978         res = ptrExtractIconEx(L"shell32.dll",
    4979                                  0, 0, &si, 1);
    4980     } , {
    4981         res = ExtractIconExA("shell32.dll",
    4982                                  0, 0, &si, 1);
    4983     });
    4984 #else
    4985         res = (UINT)ExtractIconEx(L"shell32.dll",
    4986                                     0, 0, &si, 1);
    4987 #endif
     4903    res = ExtractIconEx(L"shell32.dll", 0, 0, &si, 1);
    49884904
    49894905    if (res) {
     
    49984914    //------------------------------- get default exe pixmap
    49994915#ifndef Q_OS_WINCE
    5000     QT_WA({
    5001         res = ptrExtractIconEx(L"shell32.dll",
    5002                               2, 0, &si, 1);
    5003     } , {
    5004         res = ExtractIconExA("shell32.dll",
    5005                           2, 0, &si, 1);
    5006     });
     4916    res = ExtractIconEx(L"shell32.dll", 2, 0, &si, 1);
    50074917#else
    5008         res = (UINT)ExtractIconEx(L"ceshell.dll",
    5009                                     10, 0, &si, 1);
     4918    res = ExtractIconEx(L"ceshell.dll", 10, 0, &si, 1);
    50104919#endif
    50114920
     
    50464955
    50474956        HKEY k, k2;
    5048         int r;
    5049         QT_WA({
    5050             r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (TCHAR*)ext.ucs2(),
    5051                               0, KEY_READ, &k);
    5052         } , {
    5053             r = RegOpenKeyExA(HKEY_CLASSES_ROOT, ext.local8Bit(),
    5054                                0, KEY_READ, &k);
    5055         });
     4957        int r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (wchar_t*)ext.utf16(), 0, KEY_READ, &k);
    50564958        QString s;
    50574959        if (r == ERROR_SUCCESS) {
     
    50644966        RegCloseKey(k);
    50654967
    5066         QT_WA({
    5067             r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (TCHAR*)QString(s + QLatin1String("\\DefaultIcon")).ucs2(),
    5068                                0, KEY_READ, &k2);
    5069         } , {
    5070             r = RegOpenKeyExA(HKEY_CLASSES_ROOT, QString(s + QLatin1String("\\DefaultIcon")).local8Bit() ,
    5071                                0, KEY_READ, &k2);
    5072         });
     4968        r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (wchar_t*)QString(s + QLatin1String("\\DefaultIcon")).utf16(),
     4969                         0, KEY_READ, &k2);
    50734970        if (r == ERROR_SUCCESS) {
    50744971            s = getWindowsRegString(k2, QString());
     
    51004997                    filepath = filepath.mid(1, filepath.length()-2);
    51014998
    5102                 resolveLibs();
    5103 #ifndef Q_OS_WINCE
    5104                 QT_WA({
    5105                     res = ptrExtractIconEx((TCHAR*)filepath.ucs2(), lst[1].stripWhiteSpace().toInt(),
    5106                         0, &si, 1);
    5107                 } , {
    5108                     res = ExtractIconExA(filepath.local8Bit(), lst[1].stripWhiteSpace().toInt(),
    5109                         0, &si, 1);
    5110                 });
    5111 #else
    5112                 res = (UINT)ExtractIconEx((TCHAR*)filepath.ucs2(), lst[1].stripWhiteSpace().toInt(),
    5113                     0, &si, 1);
    5114 #endif
     4999                res = ExtractIconEx((wchar_t*)filepath.utf16(), lst[1].stripWhiteSpace().toInt(), 0, &si, 1);
    51155000            }
    51165001        }
     
    51295014        UINT res = 0;
    51305015        if (!fi.absFilePath().isEmpty()) {
    5131 #ifndef Q_OS_WINCE
    5132             QT_WA({
    5133                 res = ptrExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), -1,
    5134                                       0, 0, 1);
    5135             } , {
    5136                 res = ExtractIconExA(fi.absFilePath().local8Bit(), -1,
    5137                                       0, 0, 1);
    5138             });
    5139 
    5140             if (res) {
    5141                 QT_WA({
    5142                     res = ptrExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), res - 1,
    5143                                           0, &si, 1);
    5144                 } , {
    5145                     res = ExtractIconExA(fi.absFilePath().local8Bit(), res - 1,
    5146                                           0, &si, 1);
    5147                 });
    5148             }
    5149 #else
    5150                 res = (UINT)ExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), -1,
    5151                                             0, 0, 1);
    5152                 if (res)
    5153                     res = (UINT)ExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), res - 1,
    5154                                                 0, &si, 1);
    5155 #endif
    5156 
     5016            res = ExtractIconEx((wchar_t*)fi.absFilePath().utf16(), -1, 0, 0, 1);
     5017            if (res)
     5018                res = ExtractIconEx((wchar_t*)fi.absFilePath().utf16(), res - 1, 0, &si, 1);
    51575019        }
    51585020
     
    57535615            if (d->url.isLocalFile()) {
    57545616                QString file = d->url.path();
    5755                 if (!file.endsWith(QLatin1String("/")))
    5756                     file.append(QLatin1String("/"));
     5617                if (!file.endsWith(QLatin1Char('/')))
     5618                    file.append(QLatin1Char('/'));
    57575619                file += inf.name();
    5758                 QT_WA({
    5759                     if (GetFileAttributesW((TCHAR*)file.ucs2()) & FILE_ATTRIBUTE_HIDDEN)
    5760                         continue;
    5761                 } , {
    5762                     if (GetFileAttributesA(file.local8Bit()) & FILE_ATTRIBUTE_HIDDEN)
    5763                         continue;
    5764                 });
     5620                if (GetFileAttributes((wchar_t*)file.utf16()) & FILE_ATTRIBUTE_HIDDEN)
     5621                    continue;
    57655622            } else {
    57665623                if (inf.name() != QLatin1String("..") && inf.name()[0] == QLatin1Char('.'))
     
    61956052*/
    61966053
    6197 
     6054   
    61986055QT_END_NAMESPACE
    61996056
  • trunk/src/qt3support/dialogs/q3filedialog.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/dialogs/q3filedialog_mac.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5757#include "qtextcodec.h"
    5858#include "qdesktopwidget.h"
     59#include "qfiledialog.h"
    5960#include <stdlib.h>
    6061
    6162QT_BEGIN_NAMESPACE
     63
     64#ifdef QT_MAC_USE_COCOA
     65
     66QStringList Q3FileDialog::macGetOpenFileNames(const QString &filter, QString *pwd,
     67                                              QWidget *parent, const char* /*name*/,
     68                                              const QString& caption, QString *selectedFilter,
     69                                              bool /*multi*/, bool /*directory*/)
     70{
     71    return QFileDialog::getOpenFileNames(filter, *pwd, parent, 0,
     72                                         caption);
     73}
     74
     75
     76QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &filter,
     77                                         QString *, QWidget *parent, const char* /*name*/,
     78                                         const QString& caption, QString *selectedFilter)
     79{
     80    return QFileDialog::getSaveFileName(start, filter, parent, 0,
     81                                        caption, selectedFilter);
     82}
     83
     84#else
    6285
    6386/*****************************************************************************
     
    555578        //now filename
    556579        CFStringGetCString(ret.saveFileName, (char *)str_buffer, 1024, kCFStringEncodingUTF8);
    557         retstr += QLatin1String("/") + QString::fromUtf8((const char *)str_buffer);
     580        retstr += QLatin1Char('/') + QString::fromUtf8((const char *)str_buffer);
    558581    }
    559582    NavDisposeReply(&ret);
     
    565588}
    566589
     590#endif // QT_MAC_USE_COCOA
     591
    567592QT_END_NAMESPACE
    568593
  • trunk/src/qt3support/dialogs/q3filedialog_win.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6565QT_BEGIN_NAMESPACE
    6666
    67 // Don't remove the lines below!
    68 //
    69 // resolving the W methods manually is needed, because Windows 95 doesn't include
    70 // these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
    71 // when Qt calls getEsistingDirectory(), etc.
    72 typedef LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(BROWSEINFO*);
    73 static PtrSHBrowseForFolder ptrSHBrowseForFolder = 0;
    74 typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(LPITEMIDLIST,LPWSTR);
    75 static PtrSHGetPathFromIDList ptrSHGetPathFromIDList = 0;
    76 
    77 static void resolveLibs()
    78 {
    79 #ifndef Q_OS_WINCE
    80     static bool triedResolve = false;
    81 
    82     if (!triedResolve) {
    83 #ifndef QT_NO_THREAD
    84         // protect initialization
    85         QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
    86         // check triedResolve again, since another thread may have already
    87         // done the initialization
    88         if (triedResolve) {
    89             // another thread did initialize the security function pointers,
    90             // so we shouldn't do it again.
    91             return;
    92         }
    93 #endif
    94 
    95         triedResolve = true;
    96         if (qt_winUnicode()) {
    97             QLibrary lib(QLatin1String("shell32"));
    98             ptrSHBrowseForFolder = (PtrSHBrowseForFolder) lib.resolve("SHBrowseForFolderW");
    99             ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList) lib.resolve("SHGetPathFromIDListW");
    100         }
    101     }
    102 #endif
    103 }
    104 #ifdef Q_OS_WINCE
    105 #define PtrSHBrowseForFolder SHBrowseForFolder ;
    106 #define PtrSHGetPathFromIDList SHGetPathFromIDList;
    107 #endif
    108 
    109 
    11067extern const char qt3_file_dialog_filter_reg_exp[]; // defined in qfiledialog.cpp
    11168
     
    169126}
    170127
    171 #ifndef Q_OS_WINCE
    172 // Static vars for OFNA funcs:
    173 static QByteArray aInitDir;
    174 static QByteArray aInitSel;
    175 static QByteArray aTitle;
    176 static QByteArray aFilter;
    177 // Use ANSI strings and API
    178 
    179 // If you change this, then make sure you change makeOFN (below) too
    180 static
    181 OPENFILENAMEA* makeOFNA(QWidget* parent,
    182                          const QString& initialSelection,
    183                          const QString& initialDirectory,
    184                          const QString& title,
    185                          const QString& filters,
    186                          Q3FileDialog::Mode mode)
    187 {
    188     if (parent)
    189         parent = parent->window();
    190     else
    191         parent = qApp->activeWindow();
    192 
    193     aTitle = title.local8Bit();
    194     aInitDir = QDir::toNativeSeparators(initialDirectory).local8Bit();
    195     if (initialSelection.isEmpty())
    196         aInitSel = "";
    197     else
    198         aInitSel = QDir::toNativeSeparators(initialSelection).local8Bit();
    199     int maxLen = mode == Q3FileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
    200     aInitSel.resize(maxLen + 1);                // make room for return value
    201     aFilter = filters.local8Bit();
    202 
    203     OPENFILENAMEA* ofn = new OPENFILENAMEA;
    204     memset(ofn, 0, sizeof(OPENFILENAMEA));
    205 
    206 #if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
    207     // according to the MSDN, this should also be necessary for MSVC, but
    208     // OPENFILENAME_SIZE_VERSION_400A is in not Microsoft header, as it seems
    209     if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
    210         ofn->lStructSize= OPENFILENAME_SIZE_VERSION_400A;
    211     } else {
    212         ofn->lStructSize= sizeof(OPENFILENAMEA);
    213     }
    214 #else
    215     ofn->lStructSize        = sizeof(OPENFILENAMEA);
    216 #endif
    217     ofn->hwndOwner        = parent ? parent->winId() : 0;
    218     ofn->lpstrFilter        = aFilter;
    219     ofn->lpstrFile        = aInitSel.data();
    220     ofn->nMaxFile        = maxLen;
    221     ofn->lpstrInitialDir = aInitDir.data();
    222     ofn->lpstrTitle        = aTitle.data();
    223     ofn->Flags                = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
    224 
    225     if (mode == Q3FileDialog::ExistingFile ||
    226          mode == Q3FileDialog::ExistingFiles)
    227         ofn->Flags |= (OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST);
    228     if (mode == Q3FileDialog::ExistingFiles)
    229         ofn->Flags |= (OFN_ALLOWMULTISELECT | OFN_EXPLORER);
    230 
    231     return ofn;
    232 }
    233 
    234 static void cleanUpOFNA(OPENFILENAMEA** ofn)
    235 {
    236     delete *ofn;
    237     *ofn = 0;
    238 }
    239 #endif
    240 
    241128static QString tFilters, tTitle, tInitDir;
    242129
    243 #ifdef UNICODE
    244 // If you change this, then make sure you change makeOFNA (above) too
    245130static
    246131OPENFILENAME* makeOFN(QWidget* parent,
     
    262147
    263148    int maxLen = mode == Q3FileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
    264     TCHAR *tInitSel = new TCHAR[maxLen+1];
     149    wchar_t *tInitSel = new wchar_t[maxLen+1];
    265150    if (initSel.length() > 0 && initSel.length() <= maxLen)
    266         memcpy(tInitSel, initSel.ucs2(), (initSel.length()+1)*sizeof(QChar));
     151        memcpy(tInitSel, initSel.utf16(), (initSel.length() + 1) * sizeof(wchar_t));
    267152    else
    268153        tInitSel[0] = 0;
     
    271156    memset(ofn, 0, sizeof(OPENFILENAME));
    272157
    273 #if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
    274     // according to the MSDN, this should also be necessary for MSVC, but
    275     // OPENFILENAME_SIZE_VERSION_400 is in not Microsoft header, as it seems
    276     if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
    277         ofn->lStructSize= OPENFILENAME_SIZE_VERSION_400;
    278     } else {
    279         ofn->lStructSize        = sizeof(OPENFILENAME);
    280     }
    281 #else
    282     ofn->lStructSize        = sizeof(OPENFILENAME);
    283 #endif
    284     ofn->hwndOwner        = parent ? parent->winId() : 0;
    285     ofn->lpstrFilter        = (TCHAR *)tFilters.ucs2();
    286     ofn->lpstrFile        = tInitSel;
     158    ofn->lStructSize     = sizeof(OPENFILENAME);
     159    ofn->hwndOwner       = parent ? parent->winId() : 0;
     160    ofn->lpstrFilter     = (wchar_t*)tFilters.utf16();
     161    ofn->lpstrFile       = tInitSel;
    287162    ofn->nMaxFile        = maxLen;
    288     ofn->lpstrInitialDir = (TCHAR *)tInitDir.ucs2();
    289     ofn->lpstrTitle        = (TCHAR *)tTitle.ucs2();
    290     ofn->Flags                = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
     163    ofn->lpstrInitialDir = (wchar_t*)tInitDir.utf16();
     164    ofn->lpstrTitle      = (wchar_t*)tTitle.utf16();
     165    ofn->Flags           = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
    291166
    292167    if (mode == Q3FileDialog::ExistingFile ||
     
    299174}
    300175
    301 
    302176static void cleanUpOFN(OPENFILENAME** ofn)
    303177{
     
    306180    *ofn = 0;
    307181}
    308 
    309 #endif // UNICODE
    310182
    311183QString Q3FileDialog::winGetOpenFileName(const QString &initialSelection,
     
    350222        QApplicationPrivate::enterModal(parent);
    351223    }
    352     QT_WA({
    353         // Use Unicode strings and API
    354         OPENFILENAME* ofn = makeOFN(parent, isel,
    355                                      *initialDirectory, title,
    356                                      winFilter(filter), ExistingFile);
    357         if (idx)
    358             ofn->nFilterIndex = idx + 1;
    359         if (GetOpenFileName(ofn)) {
    360             result = QString::fromUcs2((ushort*)ofn->lpstrFile);
    361             selFilIdx = ofn->nFilterIndex;
    362         }
    363         cleanUpOFN(&ofn);
    364     } , {
    365         // Use ANSI strings and API
    366         OPENFILENAMEA* ofn = makeOFNA(parent, isel,
    367                                        *initialDirectory, title,
    368                                        winFilter(filter), ExistingFile);
    369         if (idx)
    370             ofn->nFilterIndex = idx + 1;
    371         if (GetOpenFileNameA(ofn)) {
    372             result = QString::fromLocal8Bit(ofn->lpstrFile);
    373             selFilIdx = ofn->nFilterIndex;
    374         }
    375         cleanUpOFNA(&ofn);
    376     });
     224
     225    OPENFILENAME* ofn = makeOFN(parent, isel,
     226                                *initialDirectory, title,
     227                                winFilter(filter), ExistingFile);
     228    if (idx)
     229        ofn->nFilterIndex = idx + 1;
     230    if (GetOpenFileName(ofn)) {
     231        result = QString::fromWCharArray(ofn->lpstrFile);
     232        selFilIdx = ofn->nFilterIndex;
     233    }
     234    cleanUpOFN(&ofn);
     235
    377236    if (parent) {
    378237        QApplicationPrivate::leaveModal(parent);
     
    434293        QApplicationPrivate::enterModal(parent);
    435294    }
    436     QT_WA({
    437         // Use Unicode strings and API
    438         OPENFILENAME* ofn = makeOFN(parent, isel,
    439                                      *initialDirectory, title,
    440                                      winFilter(filter), AnyFile);
    441         if (idx)
    442             ofn->nFilterIndex = idx + 1;
    443         if (GetSaveFileName(ofn)) {
    444             result = QString::fromUcs2((ushort*)ofn->lpstrFile);
    445             selFilIdx = ofn->nFilterIndex;
    446         }
    447         cleanUpOFN(&ofn);
    448     } , {
    449         // Use ANSI strings and API
    450         OPENFILENAMEA* ofn = makeOFNA(parent, isel,
    451                                        *initialDirectory, title,
    452                                        winFilter(filter), AnyFile);
    453         if (idx)
    454             ofn->nFilterIndex = idx + 1;
    455         if (GetSaveFileNameA(ofn)) {
    456             result = QString::fromLocal8Bit(ofn->lpstrFile);
    457             selFilIdx = ofn->nFilterIndex;
    458         }
    459         cleanUpOFNA(&ofn);
    460     });
     295
     296    OPENFILENAME* ofn = makeOFN(parent, isel,
     297                                 *initialDirectory, title,
     298                                 winFilter(filter), AnyFile);
     299    if (idx)
     300        ofn->nFilterIndex = idx + 1;
     301    if (GetSaveFileName(ofn)) {
     302        result = QString::fromWCharArray(ofn->lpstrFile);
     303        selFilIdx = ofn->nFilterIndex;
     304    }
     305    cleanUpOFN(&ofn);
     306
    461307    if (parent) {
    462308        QApplicationPrivate::leaveModal(parent);
     
    520366        QApplicationPrivate::enterModal(parent);
    521367    }
    522     QT_WA({
    523         OPENFILENAME* ofn = makeOFN(parent, isel,
    524                                      *initialDirectory, title,
    525                                      winFilter(filter), ExistingFiles);
    526         if (idx)
    527             ofn->nFilterIndex = idx + 1;
    528         if (GetOpenFileName(ofn)) {
    529             QString fileOrDir = QString::fromUcs2((ushort*)ofn->lpstrFile);
    530             selFilIdx = ofn->nFilterIndex;
    531             int offset = fileOrDir.length() + 1;
    532             if (ofn->lpstrFile[offset] == 0) {
    533                 // Only one file selected; has full path
    534                 fi.setFile(fileOrDir);
     368
     369    OPENFILENAME* ofn = makeOFN(parent, isel,
     370                                 *initialDirectory, title,
     371                                 winFilter(filter), ExistingFiles);
     372    if (idx)
     373        ofn->nFilterIndex = idx + 1;
     374    if (GetOpenFileName(ofn)) {
     375        QString fileOrDir = QString::fromWCharArray(ofn->lpstrFile);
     376        selFilIdx = ofn->nFilterIndex;
     377        int offset = fileOrDir.length() + 1;
     378        if (ofn->lpstrFile[offset] == 0) {
     379            // Only one file selected; has full path
     380            fi.setFile(fileOrDir);
     381            QString res = fi.absFilePath();
     382            if (!res.isEmpty())
     383                result.append(res);
     384        }
     385        else {
     386            // Several files selected; first string is path
     387            dir.setPath(fileOrDir);
     388            QString f;
     389            while (!(f = QString::fromWCharArray(ofn->lpstrFile + offset)).isEmpty()) {
     390                fi.setFile(dir, f);
    535391                QString res = fi.absFilePath();
    536392                if (!res.isEmpty())
    537393                    result.append(res);
    538             }
    539             else {
    540                 // Several files selected; first string is path
    541                 dir.setPath(fileOrDir);
    542                 QString f;
    543                 while(!(f = QString::fromUcs2((ushort*)ofn->lpstrFile+offset)).isEmpty()) {
    544                     fi.setFile(dir, f);
    545                     QString res = fi.absFilePath();
    546                     if (!res.isEmpty())
    547                         result.append(res);
    548                     offset += f.length() + 1;
    549                 }
     394                offset += f.length() + 1;
    550395            }
    551396        }
    552         cleanUpOFN(&ofn);
    553     } , {
    554         OPENFILENAMEA* ofn = makeOFNA(parent, isel,
    555                                        *initialDirectory, title,
    556                                        winFilter(filter), ExistingFiles);
    557         if (idx)
    558             ofn->nFilterIndex = idx + 1;
    559         if (GetOpenFileNameA(ofn)) {
    560             QByteArray fileOrDir(ofn->lpstrFile);
    561             selFilIdx = ofn->nFilterIndex;
    562             int offset = fileOrDir.length() + 1;
    563             if (ofn->lpstrFile[offset] == '\0') {
    564                 // Only one file selected; has full path
    565                 fi.setFile(QString::fromLocal8Bit(fileOrDir));
    566                 QString res = fi.absFilePath();
    567                 if (!res.isEmpty())
    568                     result.append(res);
    569             }
    570             else {
    571                 // Several files selected; first string is path
    572                 dir.setPath(QString::fromLocal8Bit(fileOrDir));
    573                 QByteArray f;
    574                 while(!(f = QByteArray(ofn->lpstrFile + offset)).isEmpty()) {
    575                     fi.setFile(dir, QString::fromLocal8Bit(f));
    576                     QString res = fi.absFilePath();
    577                     if (!res.isEmpty())
    578                         result.append(res);
    579                     offset += f.length() + 1;
    580                 }
    581             }
    582             cleanUpOFNA(&ofn);
    583         }
    584     });
     397    }
     398    cleanUpOFN(&ofn);
     399
    585400    if (parent) {
    586401        QApplicationPrivate::leaveModal(parent);
     
    608423        QString *initDir = (QString *)(lpData);
    609424        if (!initDir->isEmpty()) {
    610             // ### Lars asks: is this correct for the A version????
    611             QT_WA({
    612                 SendMessage(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->ucs2()));
    613             } , {
    614                 SendMessageA(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->ucs2()));
    615             });
     425            SendMessage(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->utf16()));
    616426        }
    617427    } else if (uMsg == BFFM_SELCHANGED) {
    618         QT_WA({
    619             resolveLibs();
    620             TCHAR path[MAX_PATH];
    621             ptrSHGetPathFromIDList(LPITEMIDLIST(lParam), path);
    622             QString tmpStr = QString::fromUcs2((ushort*)path);
    623             if (!tmpStr.isEmpty())
    624                 SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
    625             else
    626                 SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
    627             SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
    628         } , {
    629             char path[MAX_PATH];
    630             SHGetPathFromIDListA(LPITEMIDLIST(lParam), path);
    631             QString tmpStr = QString::fromLocal8Bit(path);
    632             if (!tmpStr.isEmpty())
    633                 SendMessageA(hwnd, BFFM_ENABLEOK, 1, 1);
    634             else
    635                 SendMessageA(hwnd, BFFM_ENABLEOK, 0, 0);
    636             SendMessageA(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
    637         });
     428        wchar_t path[MAX_PATH];
     429        SHGetPathFromIDList(LPITEMIDLIST(lParam), path);
     430        QString tmpStr = QString::fromWCharArray(path);
     431        if (!tmpStr.isEmpty())
     432            SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
     433        else
     434            SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
     435        SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
    638436    }
    639437#endif
     
    667465        QApplicationPrivate::enterModal(parent);
    668466    }
    669     QT_WA({
    670         resolveLibs();
    671         QString initDir = QDir::toNativeSeparators(initialDirectory);
    672         TCHAR path[MAX_PATH];
    673         TCHAR initPath[MAX_PATH];
    674         initPath[0] = 0;
    675         path[0] = 0;
    676         tTitle = title;
    677         BROWSEINFO bi;
    678         bi.hwndOwner = (parent ? parent->winId() : 0);
    679         bi.pidlRoot = NULL;
    680         bi.lpszTitle = (TCHAR*)tTitle.ucs2();
    681         bi.pszDisplayName = initPath;
    682         bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
    683         bi.lpfn = winGetExistDirCallbackProc;
    684         bi.lParam = Q_ULONG(&initDir);
    685         LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
    686         if (pItemIDList) {
    687             ptrSHGetPathFromIDList(pItemIDList, path);
    688             IMalloc *pMalloc;
    689             if (SHGetMalloc(&pMalloc) != NOERROR)
    690                 result.clear();
    691             else {
    692                 pMalloc->Free(pItemIDList);
    693                 pMalloc->Release();
    694                 result = QString::fromUcs2((ushort*)path);
    695             }
    696         } else
     467
     468    QString initDir = QDir::toNativeSeparators(initialDirectory);
     469    wchar_t path[MAX_PATH];
     470    wchar_t initPath[MAX_PATH];
     471    initPath[0] = 0;
     472    path[0] = 0;
     473    tTitle = title;
     474    BROWSEINFO bi;
     475    bi.hwndOwner = (parent ? parent->winId() : 0);
     476    bi.pidlRoot = NULL;
     477    bi.lpszTitle = (wchar_t*)tTitle.utf16();
     478    bi.pszDisplayName = initPath;
     479    bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
     480    bi.lpfn = winGetExistDirCallbackProc;
     481    bi.lParam = Q_ULONG(&initDir);
     482    LPITEMIDLIST pItemIDList = SHBrowseForFolder(&bi);
     483    if (pItemIDList) {
     484        SHGetPathFromIDList(pItemIDList, path);
     485        IMalloc *pMalloc;
     486        if (SHGetMalloc(&pMalloc) != NOERROR)
    697487            result.clear();
    698         tTitle.clear();
    699     } , {
    700         QString initDir = QDir::toNativeSeparators(initialDirectory);
    701         char path[MAX_PATH];
    702         char initPath[MAX_PATH];
    703         QByteArray ctitle = title.toLocal8Bit();
    704         initPath[0]=0;
    705         path[0]=0;
    706         BROWSEINFOA bi;
    707         bi.hwndOwner = (parent ? parent->winId() : 0);
    708         bi.pidlRoot = NULL;
    709         bi.lpszTitle = ctitle;
    710         bi.pszDisplayName = initPath;
    711         bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
    712         bi.lpfn = winGetExistDirCallbackProc;
    713         bi.lParam = Q_ULONG(&initDir);
    714         LPITEMIDLIST pItemIDList = SHBrowseForFolderA(&bi);
    715         if (pItemIDList) {
    716             SHGetPathFromIDListA(pItemIDList, path);
    717             IMalloc *pMalloc;
    718             if (SHGetMalloc(&pMalloc) != NOERROR)
    719                 result.clear();
    720             else {
    721                 pMalloc->Free(pItemIDList);
    722                 pMalloc->Release();
    723                 result = QString::fromLocal8Bit(path);
    724             }
    725         } else
    726             result.clear();
    727     });
     488        else {
     489            pMalloc->Free(pItemIDList);
     490            pMalloc->Release();
     491            result = QString::fromWCharArray(path);
     492        }
     493    } else
     494        result.clear();
     495    tTitle.clear();
     496
    728497    if (parent) {
    729498        QApplicationPrivate::leaveModal(parent);
     
    732501    }
    733502
    734     // Due to a bug on Windows Me, we need to reset the current
    735     // directory
    736     if ((qWinVersion() == Qt::WV_98 || qWinVersion() == Qt::WV_Me) && QDir::currentDirPath() != currentDir)
    737         QDir::setCurrent(currentDir);
    738 
    739503    if (!result.isEmpty())
    740         result.replace(QLatin1String("\\"), QLatin1String("/"));
     504        result.replace(QLatin1Char('\\'), QLatin1Char('/'));
    741505    return result;
    742506#else
  • trunk/src/qt3support/dialogs/q3progressdialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/dialogs/q3progressdialog.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/dialogs/q3tabdialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5050#include "q3widgetstack.h"
    5151#include "qlayout.h"
     52#include "qevent.h"
    5253
    5354QT_BEGIN_NAMESPACE
     
    962963
    963964
     965/*!\reimp
     966*/
     967void Q3TabDialog::showEvent(QShowEvent *e)
     968{
     969    if (!e->spontaneous())
     970        show();
     971    QDialog::showEvent(e);
     972}
     973
     974
    964975/*!
    965976  Adds an OK button to the dialog and sets the button's text to \a text.
     
    10281039
    10291040
    1030 /*!  \reimp
     1041/*!  \internal
    10311042*/
    10321043void Q3TabDialog::styleChange(QStyle& s)
  • trunk/src/qt3support/dialogs/q3tabdialog.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    112112    void paintEvent(QPaintEvent *);
    113113    void resizeEvent(QResizeEvent *);
     114    void showEvent(QShowEvent *);
    114115    void styleChange(QStyle&);
    115116    void setTabBar(QTabBar*);
  • trunk/src/qt3support/dialogs/q3wizard.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/dialogs/q3wizard.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
Note: See TracChangeset for help on using the changeset viewer.