From 597a842d66dc04181bfd063863216acbb11ce3bc Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 30 Jul 2010 08:17:21 +1000 Subject: Fix crash on Desktop platforms. Missing check for null networkSession. Task-number: QTBUG-12501 --- examples/network/fortuneserver/server.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp index b931b96..4dca38c 100644 --- a/examples/network/fortuneserver/server.cpp +++ b/examples/network/fortuneserver/server.cpp @@ -107,17 +107,19 @@ Server::Server(QWidget *parent) void Server::sessionOpened() { // Save the used configuration - QNetworkConfiguration config = networkSession->configuration(); - QString id; - if (config.type() == QNetworkConfiguration::UserChoice) - id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString(); - else - id = config.identifier(); - - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); - settings.beginGroup(QLatin1String("QtNetwork")); - settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id); - settings.endGroup(); + if (networkSession) { + QNetworkConfiguration config = networkSession->configuration(); + QString id; + if (config.type() == QNetworkConfiguration::UserChoice) + id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString(); + else + id = config.identifier(); + + QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + settings.beginGroup(QLatin1String("QtNetwork")); + settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id); + settings.endGroup(); + } //! [0] //! [1] tcpServer = new QTcpServer(this); -- cgit v0.12 From fb47a99e1d0020e8dcc4cc4f9c188ccd2fd5ee3e Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Fri, 30 Jul 2010 13:00:34 +0200 Subject: QFileDialog crashes when empty selectedFilter is set on Carbon. We were making the wrong assumption that the selectedFilter string will be valid always, when calling functions like getSaveFileName(). Task-number: QTBUG-12461 Reviewed-by: Denis --- src/gui/dialogs/qfiledialog_mac.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index f1afaa9..64fc0ee 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -782,9 +782,11 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess const QtMacFilterName &fn = fileDialogPrivate->filterInfo.filters.at( fileDialogPrivate->filterInfo.currentSelection); QStringList reg = fn.regexp.split(QLatin1String(";"), QString::SkipEmptyParts); - QString r = reg.first(); - r = r.right(r.length()-1); // Strip the * - base += r; //"." + QString::number(s->menuType); + if (reg.count()) { + QString r = reg.first(); + r = r.right(r.length()-1); // Strip the * + base += r; //"." + QString::number(s->menuType); + } NavDialogSetSaveFileName(p->context, QCFString::toCFStringRef(base)); } #ifdef DEBUG_FILEDIALOG_FILTERS -- cgit v0.12 From 07e74a963dbd2bf597dbea231d7b2cefba05fde2 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 30 Jul 2010 14:48:28 +0200 Subject: Fixed the incorrect diagram for bug QTBUG-12385. --- .../addressbook-tutorial-part1-labeled-layout.png | Bin 20739 -> 19114 bytes ...ddressbook-tutorial-part1-labeled-screenshot.png | Bin 26594 -> 23223 bytes .../addressbook-tutorial-part1-screenshot.png | Bin 7180 -> 9872 bytes .../addressbook-tutorial-part2-add-contact.png | Bin 10255 -> 12936 bytes .../addressbook-tutorial-part2-add-successful.png | Bin 8089 -> 10825 bytes .../addressbook-tutorial-part2-labeled-layout.png | Bin 31947 -> 27103 bytes .../addressbook-tutorial-part3-labeled-layout.png | Bin 39500 -> 27467 bytes .../addressbook-tutorial-part3-screenshot.png | Bin 10460 -> 14041 bytes .../images/addressbook-tutorial-part4-remove.png | Bin 13860 -> 22248 bytes .../addressbook-tutorial-part5-finddialog.png | Bin 6982 -> 10046 bytes .../images/addressbook-tutorial-part5-notfound.png | Bin 8177 -> 10789 bytes .../addressbook-tutorial-part5-screenshot.png | Bin 12557 -> 15849 bytes doc/src/images/addressbook-tutorial-part6-load.png | Bin 40623 -> 24797 bytes doc/src/images/addressbook-tutorial-part6-save.png | Bin 40406 -> 24747 bytes .../addressbook-tutorial-part6-screenshot.png | Bin 13598 -> 16819 bytes .../addressbook-tutorial-part7-screenshot.png | Bin 14822 -> 18369 bytes doc/src/images/addressbook-tutorial-screenshot.png | Bin 11916 -> 15275 bytes doc/src/images/addressbook-tutorial.png | Bin 11481 -> 6200 bytes 18 files changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png index ef514c8..b19cb36 100644 Binary files a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png and b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png differ diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png index 4381079..f9b91ee 100644 Binary files a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png and b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-part1-screenshot.png b/doc/src/images/addressbook-tutorial-part1-screenshot.png index cf15627..454b095 100644 Binary files a/doc/src/images/addressbook-tutorial-part1-screenshot.png and b/doc/src/images/addressbook-tutorial-part1-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-part2-add-contact.png b/doc/src/images/addressbook-tutorial-part2-add-contact.png index 330858d..6f2b947 100644 Binary files a/doc/src/images/addressbook-tutorial-part2-add-contact.png and b/doc/src/images/addressbook-tutorial-part2-add-contact.png differ diff --git a/doc/src/images/addressbook-tutorial-part2-add-successful.png b/doc/src/images/addressbook-tutorial-part2-add-successful.png index 3b108fb..99a2154 100644 Binary files a/doc/src/images/addressbook-tutorial-part2-add-successful.png and b/doc/src/images/addressbook-tutorial-part2-add-successful.png differ diff --git a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png index 73f6dfb..1e000c8 100644 Binary files a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png and b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png differ diff --git a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png index 662fa7f..1981ba8 100644 Binary files a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png and b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png differ diff --git a/doc/src/images/addressbook-tutorial-part3-screenshot.png b/doc/src/images/addressbook-tutorial-part3-screenshot.png index 97d1357..75159b4 100644 Binary files a/doc/src/images/addressbook-tutorial-part3-screenshot.png and b/doc/src/images/addressbook-tutorial-part3-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-part4-remove.png b/doc/src/images/addressbook-tutorial-part4-remove.png index 42b0f92..8eb259e 100644 Binary files a/doc/src/images/addressbook-tutorial-part4-remove.png and b/doc/src/images/addressbook-tutorial-part4-remove.png differ diff --git a/doc/src/images/addressbook-tutorial-part5-finddialog.png b/doc/src/images/addressbook-tutorial-part5-finddialog.png index 18e5451..743d92e 100644 Binary files a/doc/src/images/addressbook-tutorial-part5-finddialog.png and b/doc/src/images/addressbook-tutorial-part5-finddialog.png differ diff --git a/doc/src/images/addressbook-tutorial-part5-notfound.png b/doc/src/images/addressbook-tutorial-part5-notfound.png index be7172e..2d35766 100644 Binary files a/doc/src/images/addressbook-tutorial-part5-notfound.png and b/doc/src/images/addressbook-tutorial-part5-notfound.png differ diff --git a/doc/src/images/addressbook-tutorial-part5-screenshot.png b/doc/src/images/addressbook-tutorial-part5-screenshot.png index ea4a66c..3abe277 100644 Binary files a/doc/src/images/addressbook-tutorial-part5-screenshot.png and b/doc/src/images/addressbook-tutorial-part5-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-part6-load.png b/doc/src/images/addressbook-tutorial-part6-load.png index 95fdcaf..a027a1d 100644 Binary files a/doc/src/images/addressbook-tutorial-part6-load.png and b/doc/src/images/addressbook-tutorial-part6-load.png differ diff --git a/doc/src/images/addressbook-tutorial-part6-save.png b/doc/src/images/addressbook-tutorial-part6-save.png index c0deb70..757feeb 100644 Binary files a/doc/src/images/addressbook-tutorial-part6-save.png and b/doc/src/images/addressbook-tutorial-part6-save.png differ diff --git a/doc/src/images/addressbook-tutorial-part6-screenshot.png b/doc/src/images/addressbook-tutorial-part6-screenshot.png index f77bf03..7bb2f74 100644 Binary files a/doc/src/images/addressbook-tutorial-part6-screenshot.png and b/doc/src/images/addressbook-tutorial-part6-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-part7-screenshot.png b/doc/src/images/addressbook-tutorial-part7-screenshot.png index d6b0a50..3e7b3ca 100644 Binary files a/doc/src/images/addressbook-tutorial-part7-screenshot.png and b/doc/src/images/addressbook-tutorial-part7-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial-screenshot.png b/doc/src/images/addressbook-tutorial-screenshot.png index d6727dc..3fba6e8 100644 Binary files a/doc/src/images/addressbook-tutorial-screenshot.png and b/doc/src/images/addressbook-tutorial-screenshot.png differ diff --git a/doc/src/images/addressbook-tutorial.png b/doc/src/images/addressbook-tutorial.png index 495edda..f80b42d 100644 Binary files a/doc/src/images/addressbook-tutorial.png and b/doc/src/images/addressbook-tutorial.png differ -- cgit v0.12