summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoawindow_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Merge branch '4.6'Thiago Macieira2010-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Cocoa: application will not quit when using dialogsRichard Moe Gustavsen2010-01-121-0/+1
|/ | | | | | | | | | | | | | | | When creating a single dialog in the main function, and tell it to exec, we run a modal dialog. But there is really no other window on screen to be modal for. So in that case, since this is a rather common pattern for Qt applications, we allow users to quit the application from the dock. But this action is sendt as an apple event. And and that point in time, cocoa has the the apple event handler, and refuses to close down the application because it detects a modal window. Our solution is to install/overwrite the apple event handler for kAEQuit _after_ cocoa has finished its own installation. But in order to do this, we need to wait until [NSApplication run] has started, otherwise it will not take effect. And that is what this patch essentially does.
* Cocoa: refactor common code into a shared fileRichard Moe Gustavsen2009-12-031-135/+2
| | | | | | | | | | | | | | QCocoaWindow and QCocoaPanel has many methods that are implemented _exactly_ the same way. Those methods are just copied/pasted between the classes because of inheritance problems. This is error-prone as bugs tends to be fixed inside one of the classes, but easily forgotten in the other class. This patch refactors out this code into a new file that is simply #included from the two classes. We do this fix for a patch release to ease a couple of fixes that is about to be integrated. Reviewed-by: Prasanth Reviewed-by: Denis
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-09-031-3/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/qtdbus.qdoc src/gui/accessible/qaccessible_mac_cocoa.mm src/gui/kernel/qapplication_win.cpp src/xmlpatterns/parser/createTokenLookup.sh tests/auto/linguist/lupdate/testdata/good/merge_versions/project.ui tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui tests/auto/linguist/lupdate/testdata/good/parseui/project.ui tests/auto/runQtXmlPatternsTests.sh tests/auto/test.pl tests/auto/uic/baseline/batchtranslation.ui tests/auto/uic/baseline/batchtranslation.ui.h tests/auto/uic/baseline/config.ui tests/auto/uic/baseline/config.ui.h tests/auto/uic/baseline/finddialog.ui tests/auto/uic/baseline/finddialog.ui.h tests/auto/uic/baseline/formwindowsettings.ui tests/auto/uic/baseline/formwindowsettings.ui.h tests/auto/uic/baseline/helpdialog.ui tests/auto/uic/baseline/helpdialog.ui.h tests/auto/uic/baseline/listwidgeteditor.ui tests/auto/uic/baseline/listwidgeteditor.ui.h tests/auto/uic/baseline/mainwindowbase.ui tests/auto/uic/baseline/mainwindowbase.ui.h tests/auto/uic/baseline/newactiondialog.ui tests/auto/uic/baseline/newactiondialog.ui.h tests/auto/uic/baseline/newform.ui tests/auto/uic/baseline/newform.ui.h tests/auto/uic/baseline/orderdialog.ui tests/auto/uic/baseline/orderdialog.ui.h tests/auto/uic/baseline/paletteeditor.ui tests/auto/uic/baseline/paletteeditor.ui.h tests/auto/uic/baseline/paletteeditoradvancedbase.ui tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h tests/auto/uic/baseline/phrasebookbox.ui tests/auto/uic/baseline/phrasebookbox.ui.h tests/auto/uic/baseline/plugindialog.ui tests/auto/uic/baseline/plugindialog.ui.h tests/auto/uic/baseline/previewwidget.ui tests/auto/uic/baseline/previewwidget.ui.h tests/auto/uic/baseline/previewwidgetbase.ui tests/auto/uic/baseline/previewwidgetbase.ui.h tests/auto/uic/baseline/qfiledialog.ui tests/auto/uic/baseline/qfiledialog.ui.h tests/auto/uic/baseline/qtgradientdialog.ui tests/auto/uic/baseline/qtgradientdialog.ui.h tests/auto/uic/baseline/qtgradientviewdialog.ui tests/auto/uic/baseline/qtgradientviewdialog.ui.h tests/auto/uic/baseline/saveformastemplate.ui tests/auto/uic/baseline/saveformastemplate.ui.h tests/auto/uic/baseline/statistics.ui tests/auto/uic/baseline/statistics.ui.h tests/auto/uic/baseline/stringlisteditor.ui tests/auto/uic/baseline/stringlisteditor.ui.h tests/auto/uic/baseline/tabbedbrowser.ui tests/auto/uic/baseline/tabbedbrowser.ui.h tests/auto/uic/baseline/tablewidgeteditor.ui tests/auto/uic/baseline/tablewidgeteditor.ui.h tests/auto/uic/baseline/translatedialog.ui tests/auto/uic/baseline/translatedialog.ui.h tests/auto/uic/baseline/treewidgeteditor.ui tests/auto/uic/baseline/treewidgeteditor.ui.h tests/auto/uic/baseline/trpreviewtool.ui tests/auto/uic/baseline/trpreviewtool.ui.h tests/auto/uic3/baseline/about.ui tests/auto/uic3/baseline/about.ui.4 tests/auto/uic3/baseline/actioneditor.ui tests/auto/uic3/baseline/actioneditor.ui.4 tests/auto/uic3/baseline/config.ui tests/auto/uic3/baseline/config.ui.4 tests/auto/uic3/baseline/configtoolboxdialog.ui tests/auto/uic3/baseline/configtoolboxdialog.ui.4 tests/auto/uic3/baseline/connectiondialog.ui tests/auto/uic3/baseline/connectiondialog.ui.4 tests/auto/uic3/baseline/createtemplate.ui tests/auto/uic3/baseline/createtemplate.ui.4 tests/auto/uic3/baseline/customwidgeteditor.ui tests/auto/uic3/baseline/customwidgeteditor.ui.4 tests/auto/uic3/baseline/dbconnection.ui tests/auto/uic3/baseline/dbconnection.ui.4 tests/auto/uic3/baseline/dbconnectioneditor.ui tests/auto/uic3/baseline/dbconnectioneditor.ui.4 tests/auto/uic3/baseline/dbconnections.ui tests/auto/uic3/baseline/dbconnections.ui.4 tests/auto/uic3/baseline/editfunctions.ui tests/auto/uic3/baseline/editfunctions.ui.4 tests/auto/uic3/baseline/finddialog.ui tests/auto/uic3/baseline/finddialog.ui.4 tests/auto/uic3/baseline/formsettings.ui tests/auto/uic3/baseline/formsettings.ui.4 tests/auto/uic3/baseline/gotolinedialog.ui tests/auto/uic3/baseline/gotolinedialog.ui.4 tests/auto/uic3/baseline/helpdialog.ui tests/auto/uic3/baseline/helpdialog.ui.4 tests/auto/uic3/baseline/iconvieweditor.ui tests/auto/uic3/baseline/iconvieweditor.ui.4 tests/auto/uic3/baseline/listboxeditor.ui tests/auto/uic3/baseline/listboxeditor.ui.4 tests/auto/uic3/baseline/listeditor.ui tests/auto/uic3/baseline/listeditor.ui.4 tests/auto/uic3/baseline/listvieweditor.ui tests/auto/uic3/baseline/listvieweditor.ui.4 tests/auto/uic3/baseline/mainfilesettings.ui tests/auto/uic3/baseline/mainfilesettings.ui.4 tests/auto/uic3/baseline/mainwindowbase.ui tests/auto/uic3/baseline/mainwindowbase.ui.4 tests/auto/uic3/baseline/mainwindowwizard.ui tests/auto/uic3/baseline/mainwindowwizard.ui.4 tests/auto/uic3/baseline/multilineeditor.ui tests/auto/uic3/baseline/multilineeditor.ui.4 tests/auto/uic3/baseline/newform.ui tests/auto/uic3/baseline/newform.ui.4 tests/auto/uic3/baseline/paletteeditor.ui tests/auto/uic3/baseline/paletteeditor.ui.4 tests/auto/uic3/baseline/paletteeditoradvanced.ui tests/auto/uic3/baseline/paletteeditoradvanced.ui.4 tests/auto/uic3/baseline/paletteeditoradvancedbase.ui tests/auto/uic3/baseline/paletteeditoradvancedbase.ui.4 tests/auto/uic3/baseline/pixmapcollectioneditor.ui tests/auto/uic3/baseline/pixmapcollectioneditor.ui.4 tests/auto/uic3/baseline/pixmapfunction.ui tests/auto/uic3/baseline/pixmapfunction.ui.4 tests/auto/uic3/baseline/preferences.ui tests/auto/uic3/baseline/preferences.ui.4 tests/auto/uic3/baseline/previewwidget.ui tests/auto/uic3/baseline/previewwidget.ui.4 tests/auto/uic3/baseline/previewwidgetbase.ui tests/auto/uic3/baseline/previewwidgetbase.ui.4 tests/auto/uic3/baseline/projectsettings.ui tests/auto/uic3/baseline/projectsettings.ui.4 tests/auto/uic3/baseline/replacedialog.ui tests/auto/uic3/baseline/replacedialog.ui.4 tests/auto/uic3/baseline/richtextfontdialog.ui tests/auto/uic3/baseline/richtextfontdialog.ui.4 tests/auto/uic3/baseline/settingsdialog.ui tests/auto/uic3/baseline/settingsdialog.ui.4 tests/auto/uic3/baseline/sqlformwizard.ui tests/auto/uic3/baseline/sqlformwizard.ui.4 tests/auto/uic3/baseline/startdialog.ui tests/auto/uic3/baseline/startdialog.ui.4 tests/auto/uic3/baseline/statistics.ui tests/auto/uic3/baseline/statistics.ui.4 tests/auto/uic3/baseline/tabbedbrowser.ui tests/auto/uic3/baseline/tabbedbrowser.ui.4 tests/auto/uic3/baseline/tableeditor.ui tests/auto/uic3/baseline/tableeditor.ui.4 tests/auto/uic3/baseline/topicchooser.ui tests/auto/uic3/baseline/topicchooser.ui.4 tests/auto/uic3/baseline/variabledialog.ui tests/auto/uic3/baseline/variabledialog.ui.4 tests/auto/uic3/baseline/wizardeditor.ui.4 tests/auto/uiloader/baseline/batchtranslation.ui tests/auto/uiloader/baseline/config.ui tests/auto/uiloader/baseline/finddialog.ui tests/auto/uiloader/baseline/formwindowsettings.ui tests/auto/uiloader/baseline/helpdialog.ui tests/auto/uiloader/baseline/listwidgeteditor.ui tests/auto/uiloader/baseline/mainwindowbase.ui tests/auto/uiloader/baseline/newactiondialog.ui tests/auto/uiloader/baseline/newform.ui tests/auto/uiloader/baseline/orderdialog.ui tests/auto/uiloader/baseline/paletteeditor.ui tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui tests/auto/uiloader/baseline/phrasebookbox.ui tests/auto/uiloader/baseline/plugindialog.ui tests/auto/uiloader/baseline/previewwidget.ui tests/auto/uiloader/baseline/previewwidgetbase.ui tests/auto/uiloader/baseline/qfiledialog.ui tests/auto/uiloader/baseline/qtgradientdialog.ui tests/auto/uiloader/baseline/qtgradienteditor.ui tests/auto/uiloader/baseline/qtgradientviewdialog.ui tests/auto/uiloader/baseline/saveformastemplate.ui tests/auto/uiloader/baseline/statistics.ui tests/auto/uiloader/baseline/stringlisteditor.ui tests/auto/uiloader/baseline/tabbedbrowser.ui tests/auto/uiloader/baseline/tablewidgeteditor.ui tests/auto/uiloader/baseline/translatedialog.ui tests/auto/uiloader/baseline/treewidgeteditor.ui tests/auto/uiloader/baseline/trpreviewtool.ui tools/assistant/compat/mainwindow.cpp tools/assistant/tools/assistant/mainwindow.cpp tools/designer/src/designer/versiondialog.cpp tools/linguist/linguist/mainwindow.cpp tools/linguist/shared/make-qscript.sh tools/qdbus/qdbusviewer/qdbusviewer.cpp
| * Update license headers.Jason McDonald2009-09-021-3/+0
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Ensure that when we hide QToolBar in unified, unified follows.Norwegian Rock Cat2009-07-091-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Basically if you would hide a toolbar in the unified toolbar, you would still see a little bit of area at the top instead of having everything flush with the titlebar. This change basically unsures that the unified toolbar makes a decision to hide itself if all the toolbars inside it are hidden. It makes the behavior of clicking on the toolbar button behave more or less correctly since we are going to show the unified toolbar whether we want to or not. This all will get the toolbar button switch event to be dispatched in Cocoa as well. Also add an optimization for checking if we need to change the geometry. If we don't have any items the other toolbar areas, we can skip the set geometry call, which wrecks havoc with things in Cocoa. We still don't solve the case of someone who has hidden the items with the toolbar button then goes full-screen, then goes back out. I'm not motivated to solve it as is because we need to keep track of the hides we do on the button press vs. other hides from the user and still people can workaround it easy enough by handling window state change and doing what is recommended in the docs. Task-number: 208439 Rev-by: Denis
* Remove some warnings in the Cocoa build.Norwegian Rock Cat2009-06-231-0/+4
| | | | | | | | | | After discussing with some of the Objective-C people I have finally got a fair number of the warnings to disappear in both 10.5 and 10.6. I also took the opportunity to remove a bunch of other warnings. Reviewed by: Morten Sørvig
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Fix a crash where QCocoaWindow get events after its widget is deadNorwegian Rock Cat2009-05-201-3/+10
| | | | | | | | | | | | | | | The invariant that QCocoaWindow's lifetime is contained in a QWidget is simply not true. A top-level QWidget gets associated with a QCocoaWindow (which is reference counted). However, it can be the case that we've destroyed our QWidget, the link is removed, the window is hidden, but the window still gets an event. In that case we would crash with an eventual null pointer access. However, we don't really need to do anything in this case, so just call super and return. Task-number: 253402 Reviewed-by: Morten Sørvig
* BT: Namespace compile fixes for Cocoa.Norwegian Rock Cat2009-04-151-3/+4
| | | | It worked in 4.5.0, so it should work in 4.5.1 too.
* BT: Fix up comments in new Cocoa files.Norwegian Rock Cat2009-04-081-11/+11
| | | | | | It seems that Vim or Xcode or whatever I was using to paste these in messed up and added an extra space. Now we should be consistent with the .cpp files and I found a file that we missed too.
* BT: Prevent a crash in Designer when quiting when in the filter edit.Norwegian Rock Cat2009-04-071-1/+3
| | | | | | | | | | | | | Gah, my original change (f5ef0eb1a6543abdd29e07c23de7fa1128f6d623) had its heart in the right place, but it seems that it can cause crashes on closing where we refuse to give up the first responder and we end up with a dangling pointer. This lets that case happen (when we have no focus widget and are setting a nil first responder, there's no reason to stop that, but it refuses to do that when we do have a focus widget. Hopefully we don't get in a situation where our focus widget gets out of sync. Reviewed-by: Prasanth Ullattil
* Fix a bug where lineedits in a second page of a stack widget would not get ↵Norwegian Rock Cat2009-03-261-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | key events. We need to be more explicit in setting the first responder, and a bit more agressing about rejecting it when called with no responder. It seems that Cocoa has a tendency to reset the first responder when lots of widgets get hidden or shown. During this it will call "makeFirstResponder" on the window with a nil responder. Doing this will reset our what Cocoa thinks is the focus widget, but Qt will still show a focus widget. The way to solve it is to reject the make first responder if the responder is nil. I'm not sure if there will be far reaching implications for this, but it seems to be doing the right thing at the moment. We also need to share this code between QCocoaWindow and QCocoaPanel. Thanks to the dynamic nature of objective-C we have to have a copy of the code in both places. It's unfortunate. Finally, it's also important to have the QWidget let Cocoa know it has focus after it has been created. So, make sure that is in sync. Task-number: 249296 Reviewed-by: Prasanth Ullattil
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+185