diff --git a/CMakeLists.txt b/CMakeLists.txt index a501dafb..046bf590 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,9 +59,5 @@ macro_optional_add_subdirectory (skanlite) macro_optional_add_subdirectory (svgpart) macro_optional_add_subdirectory (thumbnailers) macro_optional_add_subdirectory (yakuake) -# FIXME: tests for those bellow are broken -set(ENABLE_TESTING OFF) -macro_optional_add_subdirectory (kdevplatform) -macro_optional_add_subdirectory (kdevelop) macro_display_feature_log() diff --git a/kdevelop/.gitattributes b/kdevelop/.gitattributes deleted file mode 100644 index 2f5e3e9e..00000000 --- a/kdevelop/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.desktop merge=ours -*.desktop.cmake merge=ours diff --git a/kdevelop/.kateconfig b/kdevelop/.kateconfig deleted file mode 100644 index 545fb4f0..00000000 --- a/kdevelop/.kateconfig +++ /dev/null @@ -1,2 +0,0 @@ -kate: space-indent on; indent-width 4; replace-tabs on; tab-width 4; auto-insert-doxygen on; indent-mode cstyle; - diff --git a/kdevelop/.reviewboardrc b/kdevelop/.reviewboardrc deleted file mode 100644 index b4e20125..00000000 --- a/kdevelop/.reviewboardrc +++ /dev/null @@ -1,3 +0,0 @@ -REPOSITORY = "git://anongit.kde.org/kdevelop" -REVIEWBOARD_URL = "https://git.reviewboard.kde.org" -TARGET_GROUPS = "kdevelop" diff --git a/kdevelop/.skipdir b/kdevelop/.skipdir deleted file mode 100644 index 1c11f9ea..00000000 --- a/kdevelop/.skipdir +++ /dev/null @@ -1 +0,0 @@ -kdevelop will not be build because kdevplatform is broken diff --git a/kdevelop/AUTHORS b/kdevelop/AUTHORS deleted file mode 100644 index 37e5f7d5..00000000 --- a/kdevelop/AUTHORS +++ /dev/null @@ -1,106 +0,0 @@ -Current Maintainers: - -Andreas Pakulat - Lead Maintainer -Amilcar do Carmo Lucas - Maintainer - KDevelop.org - -Previous Maintainers and their areas of expertise can be found below. It is best -to contain the KDevelop developers list at kdevelop-devel@kdevelop.org if you have -a question about one of these particular areas. - -For a more complete list, please check the About Dialog from the KDevelop Help menu. - -Ui Library, Ruby Support - Alexander Dymo - -Former Lead Maintainer, CMake and Autotools support - Matt Rogers - -Main author, lots of code. :) - Bernd Gehrmann - -Debugger frontend: - John Birch - -C++ source parser: - Jonas Nordin - -Java support: - Richard Dale - -Framework, dialogs, PHP support: - Sandy Meier - -Several parts, htdig searching & indexing: - Matthias Hoelzer-Kluepfel - -Help with Automake manager: - Victor Roeder - -KDE application templates: - Kurth Granroth - -editing component: - The KWrite authors - -QEditor part, help for code-completion, abbrev part: - Roberto Raggi - -Qt 3 port, various patches: - Harald Fernengel - -Help with KParts, KGenericFactory and other KDE infrastructure: - Simon Hausmann - -Subversion KPart: - Mickael Marchand - -Patches: - Dominic Seichter - Yann Hodique - Heinz Hornung - -SplashScreens: - Marion Klein - Ram� Lamana Villar - -KDevTabBar, bug fixes, Gideon Release: - Caleb Tennis - -PartExplorer, (bugs for) CvsPart: - Mario Scalas - -Pascal support and project parts, Filecreate GUI, -Documentation viewer improvements - Alexander Dymo - -Application wizard improvementes, application templates, documentation, bug fixes: - Dominik Haumann - -DistPart, Bash Shell Support: - Ian Reinhart Geiser - -API Documentation, Run Options, code reorganization. Fixes for project templates, autotools and doxygen. - Amilcar Lucas - -Replace plugin, Bookmarks plugin, FileList plugin, CTags2 plugin, Overall improvements and patches - Jens Dagerbo - -SnippetPart, debugger and usability patches - Robert Gruber - - -Other software included in the source package: - -* KDE 2.0 Development Book - David Sweet, et al. - Copyright notices see in doc/kde2book - -* GNU libc documentation - Sandra Loosemore, Richard M. Stallman, Roland McGrath, - Andrew Oram, and Ulrich Drepper - Copyright notices see in doc/libc - -* STL documentation - SGI, Inc. - Copyright notices see in doc/stl - diff --git a/kdevelop/CMakeLists.txt b/kdevelop/CMakeLists.txt deleted file mode 100644 index 070ead0c..00000000 --- a/kdevelop/CMakeLists.txt +++ /dev/null @@ -1,96 +0,0 @@ -# KDevelop version -set( KDEVELOP_VERSION_MAJOR 4 ) -set( KDEVELOP_VERSION_MINOR 7 ) -set( KDEVELOP_VERSION_PATCH 1 ) -# KDevplatform dependency version -set( KDEVPLATFORM_VERSION "1.${KDEVELOP_VERSION_MINOR}.${KDEVELOP_VERSION_PATCH}" ) - -################################################################################ - -project(KDevelop) - -set(CMAKE_MODULE_PATH ${KDevelop_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) - -find_package(QJSON) -# QJSON <=0.7.1 provides variables with lower case prefix, see bug 331426 -if (QJSON_VERSION VERSION_LESS "0.7.2") - set(QJSON_LIBRARIES ${qjson_LIBRARIES}) - set(QJSON_INCLUDE_DIR ${qjson_INCLUDE_DIR}) -endif() - -# Make sure that we're having RPATH on our installed libs, else using kdevelop -# from prefixes like $HOME/kdevelop breaks -# Code taken from FindKDE4Internal.cmake from KDE 4.5 -list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" - _isSystemLibDir) -if("${_isSystemLibDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}") -endif("${_isSystemLibDir}" STREQUAL "-1") -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - -if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) - find_package(kdevplatform REQUIRED) -else() - set(KDEVPLATFORM_INCLUDE_DIR - ${CMAKE_SOURCE_DIR}/kdevplatform - ${CMAKE_SOURCE_DIR}/kdevplatform/plugins - ${CMAKE_BINARY_DIR}/kdevplatform - ) - set(KDEVPLATFORM_INTERFACES_LIBRARIES kdevplatforminterfaces) - set(KDEVPLATFORM_SHELL_LIBRARIES kdevplatformshell) - set(KDEVPLATFORM_UTIL_LIBRARIES kdevplatformutil) - set(KDEVPLATFORM_LANGUAGE_LIBRARIES kdevplatformlanguage) - set(KDEVPLATFORM_DOCUMENTATION_LIBRARIES kdevplatformdocumentation) - set(KDEVPLATFORM_DEBUGGER_LIBRARIES kdevplatformdebugger) - set(KDEVPLATFORM_TESTS_LIBRARIES kdevplatformtests) - set(KDEVPLATFORM_JSONTESTS_LIBRARIES kdevplatformjsontests) - set(KDEVPLATFORM_PROJECT_LIBRARIES kdevplatformproject) - set(KDEVPLATFORM_VCS_LIBRARIES kdevplatformvcs) - set(KDEVPLATFORM_OUTPUTVIEW_LIBRARIES kdevplatformoutputview) - set(KDEVPLATFORM_SUBLIME_LIBRARIES sublime) -endif() - -include_directories(${KDEVPLATFORM_INCLUDE_DIR}) - -add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1) -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -endif() - -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # in Qt 4, clang support is lacking... - add_definitions("-DQ_COMPILER_INITIALIZER_LISTS=1") -endif() - -# Turn off missing-field-initializers warning to avoid noise from false positives with empty {} -# See discussion: http://mail.kde.org/pipermail/kdevelop-devel/2014-February/046910.html -if (CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers") -endif() - -include_directories(${KDevelop_SOURCE_DIR} ${KDevelop_BINARY_DIR} ${KDE4_INCLUDES} ) - -# create config.h -configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) - -add_subdirectory(pics) -add_subdirectory(app) -add_subdirectory(formatters) -add_subdirectory(languages) -add_subdirectory(projectbuilders) -add_subdirectory(projectmanagers) -add_subdirectory(debuggers) -add_subdirectory(app_templates) -add_subdirectory(documentation) -add_subdirectory(kdeintegration) -add_subdirectory(utils) -add_subdirectory(file_templates) -add_subdirectory(providers) - -include(CTest) - -# CTestCustom.cmake has to be in the CTEST_BINARY_DIR. -# in the KDE build system, this is the same as CMAKE_BINARY_DIR. -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake) diff --git a/kdevelop/COPYING b/kdevelop/COPYING deleted file mode 100644 index c13faf0d..00000000 --- a/kdevelop/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -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 Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. However, as a -special exception, the source code 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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 to -this License. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. 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 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. - - 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 -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 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 2 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, 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. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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 Library General -Public License instead of this License. diff --git a/kdevelop/COPYING.DOC b/kdevelop/COPYING.DOC deleted file mode 100644 index 4a0fe1c8..00000000 --- a/kdevelop/COPYING.DOC +++ /dev/null @@ -1,397 +0,0 @@ - GNU Free Documentation License - Version 1.2, November 2002 - - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, 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. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -functional and useful document "free" in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The "Document", below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as "you". You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (Thus, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, that is suitable for revising the document -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML, PostScript or PDF designed for human modification. Examples of -transparent image formats include PNG, XCF and JPG. Opaque formats -include proprietary formats that can be read and edited only by -proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML, PostScript or PDF produced by some word -processors for output purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - -A section "Entitled XYZ" means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as "Acknowledgements", -"Dedications", "Endorsements", or "History".) To "Preserve the Title" -of such a section when you modify the Document means that it remains a -section "Entitled XYZ" according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has fewer than five), - unless they release you from this requirement. -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section Entitled "History", Preserve its Title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section Entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the section all - the substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section to be Entitled "Endorsements" - or to conflict in title with any Invariant Section. -O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section Entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections Entitled "History" -in the various original documents, forming one section Entitled -"History"; likewise combine any sections Entitled "Acknowledgements", -and any sections Entitled "Dedications". You must delete all sections -Entitled "Endorsements". - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, is called an "aggregate" if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included in an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", -"Dedications", or "History", the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document 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. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation 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. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. diff --git a/kdevelop/COPYING.LIB b/kdevelop/COPYING.LIB deleted file mode 100644 index 2d2d780e..00000000 --- a/kdevelop/COPYING.LIB +++ /dev/null @@ -1,510 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, 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 St, 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 --git a/kdevelop/CTestConfig.cmake b/kdevelop/CTestConfig.cmake deleted file mode 100644 index 6627f423..00000000 --- a/kdevelop/CTestConfig.cmake +++ /dev/null @@ -1,13 +0,0 @@ -## This file should be placed in the root directory of your project. -## Then modify the CMakeLists.txt file in the root directory of your -## project to incorporate the testing dashboard. -## # The following are required to uses Dart and the Cdash dashboard -## ENABLE_TESTING() -## INCLUDE(Dart) -set(CTEST_PROJECT_NAME "KDevelop") -set(CTEST_NIGHTLY_START_TIME "03:15:00 CET") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "my.cdash.org") -set(CTEST_DROP_LOCATION "/submit.php?project=KDevelop") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/kdevelop/CTestCustom.cmake b/kdevelop/CTestCustom.cmake deleted file mode 100644 index 17c26b52..00000000 --- a/kdevelop/CTestCustom.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# This file contains all the specific settings that will be used -# when running 'make Experimental' - -# Change the maximum warnings that will be displayed -# on the report page (default 50) -set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000) - -# Warnings that will be ignored -set(CTEST_CUSTOM_WARNING_EXCEPTION - ${CTEST_CUSTOM_WARNING_EXCEPTION} -# "/plugins/subversion/kdevsvncpp/" - ) - -# Errors that will be ignored -set(CTEST_CUSTOM_ERROR_EXCEPTION - ${CTEST_CUSTOM_ERROR_EXCEPTION} -# "ICECC" -# "Segmentation fault" -# "GConf Error" -# "Client failed to connect to the D-BUS daemon" -# "Failed to connect to socket" - ) - -# No coverage for these files -set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_") diff --git a/kdevelop/Doxyfile b/kdevelop/Doxyfile deleted file mode 100644 index 39c26ba0..00000000 --- a/kdevelop/Doxyfile +++ /dev/null @@ -1,270 +0,0 @@ -# Doxyfile 1.5.1-KDevelop - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = KDevelop -PROJECT_NUMBER = "Version 4.0" -OUTPUT_DIRECTORY = ./apidocs -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = $(PWD)/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = obsolete=@deprecated \ - "feature=\xrefitem features \"Feature(s)\" \"Features\"" \ - "maintainer=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \ - "unmaintained=\xrefitem unmaintained \"Unmaintained\" \"Unmaintained\"" \ - "requirement=\xrefitem requirements \"Requirement(s)\" \"Requirements\"" \ - "faq=\xrefitem FAQ \"F.A.Q.\" \"F.A.Q.\"" \ - "authors=\xrefitem authors \"Author(s)\" \"Authors\"" \ - "FIXME=\xrefitem fixme \"Fixme\" \"Fixme\"" -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = NO -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = doc/api \ - lib/interfaces \ - lib/config \ - lib/editor \ - lib/language \ - lib/project \ - lib/shell \ - lib/sublime -FILE_PATTERNS = *.h \ - *.cpp \ - *.cc \ - *.hpp \ - *.dox \ - *.c++ \ - *.cxx \ - *.h++ \ - *.hh -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = *.moc.* \ - moc* \ - *.all_cpp.* \ - *unload.* \ - */test/* \ - */tests/* \ - *face_skel.cpp \ - *.ui.h \ - kdev* -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = ./doc/api -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = K -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = ./html -HTML_FILE_EXTENSION = .html -HTML_HEADER = doc/api/common/header.html -HTML_FOOTER = doc/api/common/footer.html -HTML_STYLESHEET = doc/api/common/doxygen.css -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = ./latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = YES -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = ./rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = ./man -MAN_EXTENSION = .kde3 -MAN_LINKS = YES -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = ANTLR_USE_NAMESPACE(_x_)=_x_:: -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/interfaces/interfaces.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/interfaces/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdecore/kdecore.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdecore/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdefx/kdefx.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdefx/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdeui/kdeui.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kdeui/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/khtml/khtml.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/khtml/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kio/kio.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kio/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kjs/kjs.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kjs/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kparts/kparts.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kparts/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kutils/kutils.tag=$(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/kutils/html/ \ - $(KDEDIR)/share/doc/HTML/en/kdelibs-apidocs/qt/qt.tag=$(QTDIR)/doc/html -GENERATE_TAGFILE = ./apidocs/kdevelop.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = NO -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/kdevelop/ExtraDesktop.sh b/kdevelop/ExtraDesktop.sh deleted file mode 100644 index 0c46ec14..00000000 --- a/kdevelop/ExtraDesktop.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -#This file outputs in a separate line each file with a .desktop syntax -#that needs to be translated but has a non .desktop extension -find -name \*.kdevtemplate -print diff --git a/kdevelop/HACKING b/kdevelop/HACKING deleted file mode 100644 index 3ef51a9f..00000000 --- a/kdevelop/HACKING +++ /dev/null @@ -1,9 +0,0 @@ -To change KDevelop's code please read the API documentation generated by doxygen at: - -http://www.kdevelop.org/ - -or generate it yourself: - -/path/to/kdelibs/doc/api/doxygen.sh --recurse --doxdatadir=/path/to/kdelibs/doc/common /path/to/kdevplatform ( the generated documentation will be at kdevplatform-apidocs ) - -or read *.dox files in the doc/api/ directory. diff --git a/kdevelop/HACKING.language b/kdevelop/HACKING.language deleted file mode 100644 index 2afbefa6..00000000 --- a/kdevelop/HACKING.language +++ /dev/null @@ -1,14 +0,0 @@ -To find how to add support for a new programming language to KDevelop -please read the API documentation generated by doxygen at: - -http://www.kdevelop.org/ -or -http://api.kde.org/4.x-api/kdevplatform-apidocs/language/duchain/html/Implementing.html - -or generate it yourself: - -look at HACKING - -or read the file: - -doc/api/HowToAddProgrammingLanguages.dox diff --git a/kdevelop/INSTALL b/kdevelop/INSTALL deleted file mode 100644 index 319e7a26..00000000 --- a/kdevelop/INSTALL +++ /dev/null @@ -1,3 +0,0 @@ -Please read the documentation on our wiki: - -http://techbase.kde.org/Projects/KDevelop4/HowToCompile diff --git a/kdevelop/README b/kdevelop/README deleted file mode 100644 index 35834061..00000000 --- a/kdevelop/README +++ /dev/null @@ -1,15 +0,0 @@ -KDevelop IDE and Platform ---------------------------- -General information about KDevelop: http://www.kdevelop.org/ -Compiling instructions: http://techbase.kde.org/Projects/KDevelop4/HowToCompile - -KDevelop Platform API Documentation ------------------------------------- -API documentation is available from http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/html/index.html - -To build it by yourself, make sure you have the kdelibs source available -Run -kdelibs/doc/api/doxygen.sh --doxdatadir=kdelibs/doc/common ./ -in the KDevelop top source directory to generate the API documentation. kdelibs -refers to the kdelibs sources that you need to have downloaded. - diff --git a/kdevelop/README.devel b/kdevelop/README.devel deleted file mode 100644 index 4d3c1df0..00000000 --- a/kdevelop/README.devel +++ /dev/null @@ -1,204 +0,0 @@ -General -------- -KDevelop 2 could be generally divided into the following categories: - - - The core: Which connects the parts and plug-ins to the user - interface - - Parts: Which implements various parts of the KDevelop based on - Components architecture. - - Plug-ins: Which implements some other stuff based on the plug-in - architecture. For the difference between Components and plug-ins - see bellow. - -The Core --------- -Resided in kdevelop/, sets up the GUI, loads various components -(throug the Component Manager - see bellow), communicates with the -components to let them talk to the user interface. - -Components/Component Architecture ---------------------------------- -Initial functionalities whithin KDevelop are divided into some -Parts. These are parts which KDevelop needs to run and function. For -instance you can think of the editor, or the class parser. - -To give the component identities and uniformation, they shold be -derived from the class KDevComponent as defined in -kdevelop/lib/ComponentManager/kdevcomponent.h. This class defines some -minimal functionality needed for instance for communications. Each -component can communicate with other components or with the core. -KDevComponent defines some virtual methods which could be overrided in -each component. - -To let the components communicate with each other, every component -should have some minimum access to the component which it's going to -communicate with. That's why the communicating components should be -divided into a generalization and a specialization. - -The Generalization is directly derived from KDevComponent and provides -minimum access for other components which may communicate. The -Specialization is a derived class from the Generalization, and extends -the components and implements it fully. The generalizations are -resided in kdevelop/lib/ComponentManger/Components/ and the -specializations are defined as Parts in kdevelop/parts. - -If a component does not need to communicate with other components, or -nobody wants to communicate with it, it does not need to have -generalization and it could directly derive from KDevComponent. In -this case it is called a global component. - -The Generalizations are identified externally by ServiceTypes of -KDE. The Specializations are identified externally by Services. -The MUST have these. (See Component Manager) - -The components can communicate also with the core, or the core may -want to communicate with them. This happens through the Component -Manager (See bellow). - -Plug-ins/ Plug-in architecture ------------------------------- -Extended specializations of the Parts and also some other -functionalities are defined as Plug-ins. Plug-ins are resided in -/kdevelop/plugin. - -Component Manager ------------------ -To give a uniform structure to the Core<->Component communications and -to organize the loading/unloading the componens and to register them -correctly there is Component Manager. - -Class KDevComponentManager, resided in lib/ComponentManager is -responsible for loading the components (using the klibloader and -kservice). Everybody (mostly the core) who wants to load a component, -loads it using the KDevComponentManager. KDevComponentManager -provides the needed methods. When KDevComponentManager loads a module, -registers it as well, so it can give the pointer to the rest, if they -ask for it. - -Another aspect of the KDevComponentManager is the Core<->Component -communications. It provides some public slots and signals. Send the -right signal to it, it distributes the signal over the registerd -components. So can the core communicate easily with the components -just using the KDevComponentManager to deliver its qt signals. - -Creating a KDevComponent ------------------------- -A new KDevComponent should have the following characters: - - - It could have a generalization. - - It must have a specialization. - - The generalization (if exists) must derive from the class - KDevComponent. - - The specialization must derive from the generalization (if exists, - otherwise from the class KDevComponent) - - The generalization (if exists) must provide a ServiceType. - - The specialization must provide a Service associating with the - ServiceType of the generalization (if exists, otherwise the - ServiceType of KDevComponent). - - The generalization (if exists) must reside in - kdevelop/lib/ComponentManager/Components. - - The specialization must reside in kdevelop/parts. - - It must have a KInstance and should be able to be loaded with - klibloader. - -Note: -Not everything should be component. The Component architecture is -complex enough and should stay understandable. Take a look, perhaps it -is better to make a plug-in out of it. - -KDevNode --------- -A KDevNode (lib/general/kdevnodes.h) is a data structure which holds -information for an object in KDevelop. This can be used if components -want to exchange information about a specific object. For instance a -Projectspace can raise the signal -"sigAddedFileToProject(KDevFileNode*)" to inform all other running -components that a file was added. The KDevFileNode is a subclass of -KDevNode and contains information about Projectspace,Projectname and -of course the filenname of this file. - -KDevNodeAction --------------- -KDevNodeAction is a special KAction which stores a KDevNode and raise -it if the action was activated. In KDevelop 2 it is possible to -extend the the popup menus in the treeviews or similar things at -'runtime' for every object 'indivual'. For this you will need -KDevNodeAction (lib/general/kdevactions.h), the following signal and -method : - -void KDevComponent::needKDevNodeActions(KDevNode* pNode, QList*pList) -QList*KDevComponent::kdevNodeActions(KDevNode* pNode). - -An example: (asking for actions) - -the Projectview need some actions (the user clicked the right -mousebutton) for the file "main.cpp" in the project "foobar", -projectspace: "foo". - -The Projectview creates now a KDevFileNode (pNode) with these -properties and an empty list (pList). After this it raise the signal - -KDevComponent::needKDevNodeActions(KDevNode* pNode,QList* pList) - -The list (pList) will be filled with actions (from running components) -for these KDevNode. You can use it with: - -+++ -for(pAction=pList->first();pAction!=0;pAction= pList->next()){ - pAction->plug(pPopup,-1);// add all available actions to the popupmenu -} -+++ - -An example: (implementing a new action for an KDevNode) An -implemention from a ProjectSpace component which add a "Move to" -action could look like this: - -+++ -QList* ProjectSpace::kdevNodeActions(KDevNode* pNode){ - QList* pList = new QList; - - KDevNodeAction* pAction=0; - if(pNode->inherits("KDevFileNode")){ - pList->append(new KActionSeparator()); - pAction = new KDevNodeAction(pNode,"Move to..."); // pNode is stored in the Action - connect(pAction,SIGNAL(activated(KDevNode*)),this, - SLOT(slotMoveFileTo(KDevNode*))); - pList->append(pAction); -... -return pList; -} - -Coding style rules for KDevelop 2 ---------------------------------- -- prefix "m_" for class attributes -- prefix "p" for pointers but no further type-prefixes -- prefix "m_p" for class attributes which are pointers -- upper case letters for each single word in a compound word: e.g. - KDevViewHandler instead of Kdevviewhandler. -- tab space = 4 -- tabs replaced by spaces -- no prefix "get" at the beginning of a get function. - -How to help ------------ - -Please take a look at TODO file (kdevelop/TODO). Perhaps there is -something you can do. You can also look for bugs and fix them. You can -implement new idea's. You can provide translations. You can add -comment and documentations. If you create something, made some pics, -provide a patch, etc., you can upload it into our anonymous ftp site. -(please visit: http://www.kdevelop.org/index.html?filename=upload.html). -And please don't fprget to inform us per email. - -Is there any question? Is there something unclear? Do you need -additional information? Just ask! There will be someone at the -mailinglist to answer your question. - - -28-02-2001 -KDevelop Team -Omid Givi, omid@kdevelop.org - - - - diff --git a/kdevelop/README.htdig b/kdevelop/README.htdig deleted file mode 100644 index c3f8efdb..00000000 --- a/kdevelop/README.htdig +++ /dev/null @@ -1,207 +0,0 @@ -What you need to do in order to setup Ht://Dig for using with KDevelop. - -1. If you use Ht://Dig v3.1.x patch the sources with this - (http://www.geocities.com/alexismikhailov/htdig_3_1_x.diff.zip) - file. -2. Copy htdig.conf into {kde_global_dir}/share/apps/kdevelop/tools/. - -If you already use Ht://Dig to index your local documents and don't -want to litter database with links to development docs perform actions -in part I and go to part II. Otherwise skip part I and go to part II -directly. - --------------- I --------------- -3. Copy files from {htdig_dir}/common (for 3.1.x of htdig) or - {htdig_dir}/share/htdig (for 3.2.x of htdig) to some location - (f.e. {kde_global_dir}/share/apps/kdevelop/htdig/common). -4. Modify URL's in .html files for 'common' dir to be file://localhost urls - f.e. . -5. Modify htdig.conf (sample included in the end of this README). -5.1. Set database_dir to some location - (f.e. {kde_global_dir}/share/apps/kdevelop/htdig/db). -5.2. Set common_dir to point to the location you have copied files into - in step 1. ---------------- II ------------- -6. Modify htdig.conf. -6.1. Set 'limit_urls_to' to 'file://' (without quotes of course). -6.2. Set 'maximum_pages' to '1'. -6.3. If you want to index documents that cointain 'noindex' tag - (all Qt docs) patch htdig with this - (http://www.geocities.com/alexismikhailov/htdig_3_1_x_noindex.diff.zip) - for htdig 3.1.x or this - (http://www.geocities.com/alexismikhailov/htdig_3_2_x_noindex.diff.zip) - patch and set 'ignore_noindex' to 'true'. -6.4. Set 'star_image' to 'file://localhost' type. -6.5. Set 'local_urls' to 'file://localhost=' for htdig 3.1.x and - to 'file://=' for htdig 3.2.x. As soon as my patches for - file:// support will be integrated (or someone else will - create this thing) you won't need this step (for htdig 3.2.x). - - -#======================================================================= -# -# Example config file for ht://Dig. -# -# This configuration file is used by all the programs that make up ht://Dig. -# Please refer to the attribute reference manual for more details on what -# can be put into this file. (http://www.htdig.org/confindex.html) -# Note that most attributes have very reasonable default values so you -# really only have to add attributes here if you want to change the defaults. -# -# What follows are some of the common attributes you might want to change. -# - -# -# Specify where the database files need to go. Make sure that there is -# plenty of free disk space available for the databases. They can get -# pretty big. -# -database_dir: /usr/local/kde/share/apps/kdevelop/htdig/db - -# -# This specifies the URL where the robot (htdig) will start. You can specify -# multiple URLs here. Just separate them by some whitespace. -# The example here will cause the ht://Dig homepage and related pages to be -# indexed. -# You could also index all the URLs in a file like so: -# start_url: `${common_dir}/start.url` -# -#start_url: file://localhost/usr/local/kde/share/doc/HTML/en/kdevelop/ -#http://localhost/ -#http://www.htdig.org/ - -# -# This attribute limits the scope of the indexing process. The default is to -# set it to the same as the start_url above. This way only pages that are on -# the sites specified in the start_url attribute will be indexed and it will -# reject any URLs that go outside of those sites. -# -# Keep in mind that the value for this attribute is just a list of string -# patterns. As long as URLs contain at least one of the patterns it will be -# seen as part of the scope of the index. -# -limit_urls_to: file:// -#${start_url} - -# -# If there are particular pages that you definately do NOT want to index, you -# can use the exclude_urls attribute. The value is a list of string patterns. -# If a URL matches any of the patterns, it will NOT be indexed. This is -# useful to exclude things like virtual web trees or database accesses. By -# default, all CGI URLs will be excluded. (Note that the /cgi-bin/ convention -# may not work on your web server. Check the path prefix used on your web -# server.) -# -exclude_urls: /cgi-bin/ .cgi - -# -# The string htdig will send in every request to identify the robot. Change -# this to your email address. -# -maintainer: unconfigured@htdig.searchengine.maintainer - -# -# The excerpts that are displayed in long results rely on stored information -# in the index databases. The compiled default only stores 512 characters of -# text from each document (this excludes any HTML markup...) If you plan on -# using the excerpts you probably want to make this larger. The only concern -# here is that more disk space is going to be needed to store the additional -# information. Since disk space is cheap (! :-)) you might want to set this -# to a value so that a large percentage of the documents that you are going -# to be indexing are stored completely in the database. At SDSU we found -# that by setting this value to about 50k the index would get 97% of all -# documents completely and only 3% was cut off at 50k. You probably want to -# experiment with this value. -# Note that if you want to set this value low, you probably want to set the -# excerpt_show_top attribute to false so that the top excerpt_length characters -# of the document are always shown. -# -max_head_length: 10000 - -# -# To limit network connections, ht://Dig will only pull up to a certain limit -# of bytes. This prevents the indexing from dying because the server keeps -# sending information. However, several FAQs happen because people have files -# bigger than the default limit of 100KB. This sets the default a bit higher. -# (see for more) -# -max_doc_size: 200000 - -# -# Depending on your needs, you might want to enable some of the fuzzy search -# algorithms. There are several to choose from and you can use them in any -# combination you feel comfortable with. Each algorithm will get a weight -# assigned to it so that in combinations of algorithms, certain algorithms get -# preference over others. Note that the weights only affect the ranking of -# the results, not the actual searching. -# The available algorithms are: -# exact -# endings -# synonyms -# soundex -# metaphone -# By default only the "exact" algorithm is used with weight 1. -# Note that if you are going to use any of the algorithms other than "exact", -# you need to use the htfuzzy program to generate the databases that each -# algorithm requires. -# -search_algorithm: exact:1 synonyms:0.5 endings:0.1 - -common_dir: /usr/local/kde/share/apps/kdevelop/htdig/common -maximum_pages: 1 -ignore_noindex: true - -# -# The following are the templates used in the builtin search results -# The default is to use compiled versions of these files, which produces -# slightly faster results. However, uncommenting these lines makes it -# very easy to change the format of search results. -# See -no_next_page_text: -prev_page_text: prev -no_prev_page_text: -page_number_text: "1" \ - "2" \ - "3" \ - "4" \ - "5" \ - "6" \ - "7" \ - "8" \ - "9" \ - "10" -# -# To make the current page stand out, we will put a border arround the -# image for that page. -# -no_page_number_text: "1" \ - "2" \ - "3" \ - "4" \ - "5" \ - "6" \ - "7" \ - "8" \ - "9" \ - "10" - -star_image: file://localhost/opt/www/htdocs/htdig/star.png -star_blank: file://localhost/opt/www/htdocs/htdig/star_blank.png - -# local variables: -local_urls: file://localhost= -#local_urls: file://= -# mode: text -# eval: (if (eq window-system 'x) (progn (setq font-lock-keywords (list '("^#.*" . font-lock-keyword-face) '("^[a-zA-Z][^ :]+" . font-lock-function-name-face) '("[+$]*:" . font-lock-comment-face) )) (font-lock-mode))) -# end: diff --git a/kdevelop/app/CMakeLists.txt b/kdevelop/app/CMakeLists.txt deleted file mode 100644 index aba6b8be..00000000 --- a/kdevelop/app/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -add_subdirectory(plasma) - -########### next target ############### - -find_package(SharedMimeInfo REQUIRED) - -set(kdevelop_SRCS - main.cpp - kdevideextension.cpp - splash.cpp - welcomepage/sessionsmodel.cpp - welcomepage/welcomepageview.cpp - welcomepage/uihelper.cpp -) -add_definitions(-DWITH_WELCOMEPAGE) -qt4_add_resources(kdevelop_SRCS welcomepage/welcomepage.qrc) - -add_executable(kdevelop ${kdevelop_SRCS} ) - -target_link_libraries(kdevelop - ${KDE4_KDECORE_LIBS} - ${KDEVPLATFORM_INTERFACES_LIBRARIES} - ${KDEVPLATFORM_SHELL_LIBRARIES} - ${KDE4_KIO_LIBS} - ${KDE4_KCMUTILS_LIBS} - ${KDE4_KPARTS_LIBS} - ${KDE4_KNOTIFYCONFIG_LIBS} - ${KDE4_KTEXTEDITOR_LIBS} - ${KDE4_THREADWEAVER_LIBS} - - ${QT_QTDECLARATIVE_LIBRARIES} - ${KDE4_KDECLARATIVE_LIBS} -) - -install(TARGETS kdevelop ${INSTALL_TARGETS_DEFAULT_ARGS} ) - -install(FILES kdevelop! DESTINATION bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) - -########### install files ############### - -install( PROGRAMS kdevelop.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( PROGRAMS kdevelop_ps.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES kdeveloprc DESTINATION ${CONFIG_INSTALL_DIR} ) -install( FILES kdevelopui.rc katepartui.rc kdevelop.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kdevelop ) -install( FILES kdevelop.xml DESTINATION ${XDG_MIME_INSTALL_DIR} ) -install( FILES splash.qml DESTINATION ${DATA_INSTALL_DIR}/kdevelop ) -update_xdg_mimetypes( ${XDG_MIME_INSTALL_DIR} ) diff --git a/kdevelop/app/Info.plist.in b/kdevelop/app/Info.plist.in deleted file mode 100644 index ca6c7de4..00000000 --- a/kdevelop/app/Info.plist.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${MACOSX_BUNDLE_EXECUTABLE_NAME} - CFBundleGetInfoString - ${MACOSX_BUNDLE_INFO_STRING} - CFBundleIconFile - ${MACOSX_BUNDLE_ICON_FILE} - CFBundleIdentifier - ${MACOSX_BUNDLE_GUI_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - ${MACOSX_BUNDLE_LONG_VERSION_STRING} - CFBundleName - ${MACOSX_BUNDLE_BUNDLE_NAME} - CFBundleDisplayName - ${MACOSX_BUNDLE_DISPLAY_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CSResourcesFileMapped - - LSRequiresCarbon - - NSAppSleepDisabled - - NSSupportsAutomaticTermination - - NSHumanReadableCopyright - ${MACOSX_BUNDLE_COPYRIGHT} - - diff --git a/kdevelop/app/Messages.sh b/kdevelop/app/Messages.sh deleted file mode 100644 index 8dea5b96..00000000 --- a/kdevelop/app/Messages.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -$EXTRACTRC `find . -name \*.rc` `find . -name \*.ui` >>rc.cpp -$XGETTEXT `find . -name \*.cpp -o -name \*.h` -o $podir/kdevelop.pot -$XGETTEXT -L java `find . -name \*.qml` -j -o $podir/kdevelop.pot -rm -f rc.cpp diff --git a/kdevelop/app/katepartui.rc b/kdevelop/app/katepartui.rc deleted file mode 100644 index 15c2e705..00000000 --- a/kdevelop/app/katepartui.rc +++ /dev/null @@ -1,140 +0,0 @@ - - - - &File - - - - - - - - - &Edit - - - - - - - - - - &Advanced - - - - - - - - - - - - - - - - - - - - &View - - - - - - - - - - - - - - &Code Folding - - - - - - - - - - - - - &Tools - - - - - - - - - - - - - Word Completion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Main Toolbar - - - - - - - - - - diff --git a/kdevelop/app/kdevelop! b/kdevelop/app/kdevelop! deleted file mode 100755 index 4e24d7ff..00000000 --- a/kdevelop/app/kdevelop! +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# This file is part of KDevelop -# Copyright 2011 David Nolden -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 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 -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -export KDEV_BASEDIR=$(dirname $0) -export APPLICATION=KDevelop - -if ! [ "$KDEV_ATTACHED_PID" ]; then - ARGS="" - if [ $# -eq 0 ]; then - ARGS="-pss" - else - ARGS="$@" - fi - export KDEV_ATTACHED_PID=$($KDEV_BASEDIR/kdevelop $ARGS --pid) -fi - -if ! [ "$KDEV_ATTACHED_PID" ]; then - echo "Error: Failed retrieving a pid." - exit 5 -fi - -# Make sure we didn't capture garbage instead of the pid (must be 1 word only) -# note: keep compatible on FreeBSD: https://bugs.kde.org/show_bug.cgi?id=311186 -if [ "$(echo $KDEV_ATTACHED_PID | wc -w | sed 's/ //g')" != 1 ]; then - echo "Error: Got no valid pid." - exit 6 -fi - -if ! [ "$(which qdbus)" ]; then - echo "Error: The qdbus utility is missing." - exit 7 -fi - -export KDEV_DBUS_ID="org.kdevelop.kdevelop-$KDEV_ATTACHED_PID" - -bash --init-file $KDEV_BASEDIR/kdevplatform_shell_environment.sh -i diff --git a/kdevelop/app/kdevelop.desktop b/kdevelop/app/kdevelop.desktop deleted file mode 100644 index 817e5fc3..00000000 --- a/kdevelop/app/kdevelop.desktop +++ /dev/null @@ -1,90 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=kdevelop --icon '%i' --caption '%c' %u -MimeType=application/x-kdevelop; -Icon=kdevelop -X-DocPath=kdevelop/index.html -Terminal=false -Name=KDevelop 4 -Name[bs]=KDevelop 4 -Name[ca]=KDevelop 4 -Name[ca@valencia]=KDevelop 4 -Name[cs]=KDevelop 4 -Name[da]=KDevelop 4 -Name[de]=KDevelop 4 -Name[el]=KDevelop 4 -Name[en_GB]=KDevelop 4 -Name[eo]=KDevelop 4 -Name[es]=KDevelop 4 -Name[et]=KDevelop 4 -Name[fi]=KDevelop 4 -Name[fr]=KDevelop 4 -Name[ga]=KDevelop 4 -Name[gl]=KDevelop 4 -Name[hi]=के-डेवलप ४ -Name[hne]=के-डेवलप ४ -Name[hu]=KDevelop 4 -Name[it]=KDevelop 4 -Name[ja]=KDevelop 4 -Name[kk]=KDevelop 4 -Name[km]=KDevelop 4ល -Name[ko]=KDevelop 4 -Name[lt]=KDevelop 4 -Name[lv]=KDevelop 4 -Name[nb]=KDevelop 4 -Name[nds]=KDevelop 4 -Name[ne]=केडीई विकास ४ -Name[nl]=KDevelop 4 -Name[pl]=KDevelop 4 -Name[pt]=KDevelop 4 -Name[pt_BR]=KDevelop 4 -Name[ru]=KDevelop 4 -Name[sk]=KDevelop 4 -Name[sl]=KDevelop 4 -Name[sv]=KDevelop 4 -Name[tr]=KDevelop 4 -Name[ug]=KDevelop 4 -Name[uk]=KDevelop 4 -Name[x-test]=xxKDevelop 4xx -Name[zh_CN]=KDevelop 4 -Name[zh_TW]=KDevelop 4 -GenericName=Integrated Development Environment -GenericName[bs]=Integrisano razvojno okruženje -GenericName[ca]=Entorn integrat de desenvolupament -GenericName[ca@valencia]=Entorn integrat de desenvolupament -GenericName[cs]=Integrované Vývojové Prostředí -GenericName[da]=Integreret udviklingsmiljø (IDE) -GenericName[de]=Integrierte Entwicklungsumgebung -GenericName[el]=ολοκληρωμένο περιβάλλον ανάπτυξης -GenericName[en_GB]=Integrated Development Environment -GenericName[es]=Entorno de desarrollo integrado -GenericName[et]=Integreeritud arenduskeskkond -GenericName[fi]=Integroitu kehitysympäristö -GenericName[fr]=Environnement de Développement Intégré -GenericName[ga]=Timpeallacht Chomhtháite Fhorbartha -GenericName[gl]=Entorno de desenvolvemento integrado -GenericName[hne]=एकीकृत डेवलपमेंट वातावरन -GenericName[hu]=Integrált fejlesztői környezet -GenericName[it]=Ambiente di sviluppo integrato -GenericName[ja]=統合開発環境 -GenericName[kk]=Біріктірілген құрастыру ортасы -GenericName[km]=Development Environment ដែល​បាន​រួមបញ្ចូល -GenericName[lt]=Integruota programavimo aplinka -GenericName[lv]=Integrēta izstrādes vide -GenericName[nb]=Integrert utviklingsmiljø -GenericName[nds]=Programmsmeed -GenericName[nl]=Geïntegreerde ontwikkelomgeving -GenericName[pl]=Zintegrowane środowisko programistyczne -GenericName[pt]=Ambiente de Desenvolvimento Integrado -GenericName[pt_BR]=Ambiente Integrado de Desenvolvimento -GenericName[ru]=Интегрированная среда разработки -GenericName[sk]=Integrované vývojové prostredie -GenericName[sl]=Integrirano razvojno okolje -GenericName[sv]=Integrerad utvecklingsmiljö -GenericName[tr]=Bütünleşik Geliştirme Ortamı -GenericName[ug]=يۈرۈشلەشتۈرۈلگەن ئىجادىيەت مۇھىتى -GenericName[uk]=Комплексне середовище розробки -GenericName[x-test]=xxIntegrated Development Environmentxx -GenericName[zh_CN]=集成开发环境 -GenericName[zh_TW]=整合開發環境 -Categories=Qt;KDE;Development;IDE; diff --git a/kdevelop/app/kdevelop.notifyrc b/kdevelop/app/kdevelop.notifyrc deleted file mode 100644 index c1092e11..00000000 --- a/kdevelop/app/kdevelop.notifyrc +++ /dev/null @@ -1,577 +0,0 @@ -[Global] -IconName=kdevelop -Comment=KDevelop -Comment[br]=KDevelop -Comment[bs]=KDevelop -Comment[ca]=KDevelop -Comment[ca@valencia]=KDevelop -Comment[cs]=KDevelop -Comment[da]=KDevelop -Comment[de]=KDevelop -Comment[el]=KDevelop -Comment[en_GB]=KDevelop -Comment[eo]=KDevelop -Comment[es]=KDevelop -Comment[et]=KDevelop -Comment[eu]=KDevelop -Comment[fi]=KDevelop -Comment[fr]=KDevelop -Comment[ga]=KDevelop -Comment[gl]=KDevelop -Comment[hi]=के-डेवलप -Comment[hne]=के-डेवलप -Comment[hu]=KDevelop -Comment[it]=KDevelop -Comment[ja]=KDevelop -Comment[kk]=KDevelop -Comment[km]=KDevelop -Comment[ko]=KDevelop -Comment[lt]=KDevelop -Comment[lv]=KDevelop -Comment[ms]=KDevelop -Comment[nb]=KDevelop -Comment[nds]=KDevelop -Comment[nl]=KDevelop -Comment[pl]=KDevelop -Comment[pt]=KDevelop -Comment[pt_BR]=KDevelop -Comment[ro]=KDevelop -Comment[ru]=KDevelop -Comment[sk]=KDevelop -Comment[sl]=KDevelop -Comment[sv]=KDevelop -Comment[ta]=KDevelop -Comment[tg]=KDevelop -Comment[tr]=KDevelop -Comment[ug]=KDevelop -Comment[uk]=KDevelop -Comment[x-test]=xxKDevelopxx -Comment[zh_CN]=KDevelop -Comment[zh_TW]=KDevelop - -[Event/ProcessSuccess] -Name=Process successful -Name[bs]=Proces uspješan -Name[ca]=Procés correcte -Name[ca@valencia]=Procés correcte -Name[cs]=Proces úspěšný -Name[da]=Processen lykkedes -Name[de]=Prozess erfolgreich -Name[el]=Επιτυχής διεργασία -Name[en_GB]=Process successful -Name[es]=Proceso exitoso -Name[et]=Protsess oli edukas -Name[eu]=Prozesu zuzena -Name[fi]=Prosessi onnistui -Name[fr]=Le processus s'est terminé avec succès -Name[ga]=D'éirigh leis an bpróiseas -Name[gl]=Proceso rematado con éxito -Name[hi]=प्रक्रिया सफल -Name[hne]=काम सफल -Name[hu]=Sikeres folyamat -Name[it]=Processo riuscito -Name[ja]=プロセス成功 -Name[kk]=Сәтті өтті -Name[km]=ដំណើរការ​ដោយ​ជោគជ័យ -Name[ko]=작업 성공 -Name[lt]=Procesas pavyko -Name[lv]=Process veiksmīgs -Name[mr]=प्रक्रीया यशस्वी -Name[ms]=Proses berjaya -Name[nb]=Prosessen lyktes -Name[nds]=Perzess hett Spood -Name[nl]=Proces was succesvol -Name[pl]=Proces zakończony pomyślnie -Name[pt]=Processo com sucesso -Name[pt_BR]=Processo concluído com sucesso -Name[ru]=Процесс завершён успешно -Name[sk]=Úspešný proces -Name[sl]=Opravilo uspešno -Name[sv]=Processen lyckades -Name[ta]=செயல்முறை வெற்றி -Name[tg]=Амал бо мувафақият ба анҷом расид -Name[tr]=İşlem başarılı -Name[ug]=بىر تەرەپ قىلىش مۇۋەپپەقىيەتلىك بولدى -Name[uk]=Успішне виконання -Name[x-test]=xxProcess successfulxx -Name[zh_CN]=处理成功 -Name[zh_TW]=行程成功 -Comment=Process finished successfully -Comment[bs]=Proces je uspješno završio -Comment[ca]=El procés ha finalitzat amb èxit -Comment[ca@valencia]=El procés ha finalitzat amb èxit -Comment[cs]=Proces úspěšně dokončen -Comment[da]=Processen afsluttede med succes -Comment[de]=Prozess erfolgreich beendet -Comment[el]=Η διεργασία τερμάτισε με επιτυχία -Comment[en_GB]=Process finished successfully -Comment[es]=Proceso terminado con éxito -Comment[et]=Protsess edukalt lõpetatud -Comment[eu]=Prozesua ongi amaitu da -Comment[fi]=Prosessi päättyi onnistuneesti -Comment[fr]=Le processus s'est terminé avec succès -Comment[ga]=D'éirigh leis an bpróiseas -Comment[gl]=O proceso rematou con éxito -Comment[hi]=प्रक्रिया सफलतापूर्वक पूर्ण -Comment[hne]=काम सफलतापूर्वक पूरा -Comment[hu]=A folyamat sikeresen befejeződött -Comment[it]=Processo completato con successo -Comment[ja]=プロセスは成功しました。 -Comment[kk]=Процес сәті өтті -Comment[km]=ដំណើរការ​​បាន​បញ្ចប់​ដោយ​ជោគជ័យ -Comment[ko]=작업이 성공적으로 끝났음 -Comment[lv]=Process beidzies veiksmīgi -Comment[ms]=Proses selesai dengan jaya -Comment[nb]=Prosessen vellykket fullført -Comment[nds]=Perzess mit Spood afslaten -Comment[nl]=Proces met succes beëindigd -Comment[pl]=Proces zakończony pomyślnie -Comment[pt]=O processo terminou com sucesso -Comment[pt_BR]=Processo concluído com sucesso -Comment[ro]=Proces încheiat cu succes -Comment[ru]=Процесс завершён успешно -Comment[sk]=Proces skončil úspešne -Comment[sl]=Opravilo se je uspešno končalo -Comment[sv]=Processen avslutades med lyckat resultat -Comment[ta]=வெற்றிகரமாக முடிவடைந்த செயலாக்கம் -Comment[tg]=Амал бо мувафақият ба анҷом расид -Comment[tr]=İşlem başarıyla bitti -Comment[ug]=بىر تەرەپ قىلىش مۇۋەپپەقىيەتلىك تاماملاندى -Comment[uk]=Виконання успішно завершено -Comment[x-test]=xxProcess finished successfullyxx -Comment[zh_CN]=处理成功完成 -Comment[zh_TW]=行程成功完成 -Action=None - -[Event/ProcessError] -Name=Process error -Name[bs]=Greška u procesu -Name[ca]=Error de procés -Name[ca@valencia]=Error de procés -Name[cs]=Chyba procesu -Name[da]=Procesfejl -Name[de]=Prozess-Fehler -Name[el]=Σφάλμα διεργασίας -Name[en_GB]=Process error -Name[es]=Error de proceso -Name[et]=Protsessi viga -Name[eu]=Prozesu errorea -Name[fi]=Prosessivirhe -Name[fr]=Erreur du processus -Name[ga]=Earráid sa phróiseas -Name[gl]=Erro do proceso -Name[hi]=प्रक्रिया त्रुटि -Name[hne]=काम गलती -Name[hu]=Hibás folyamat -Name[it]=Errore del processo -Name[ja]=プロセスエラー -Name[kk]=Процес қате -Name[km]=ដំណើរការ​មាន​កំហុស​ -Name[ko]=작업 오류 -Name[lt]=Proceso klaida -Name[lv]=Prcesā kļūda -Name[mr]=प्रक्रीया त्रुटी -Name[ms]=Ralat proses -Name[nb]=Prosessen mislyktes -Name[nds]=Perzessfehler -Name[nl]=Procesfout -Name[pl]=Błąd w procesie -Name[pt]=Erro no processo -Name[pt_BR]=Erro no processo -Name[ro]=Eroare a procesului -Name[ru]=Ошибка при выполнении процесса -Name[sk]=Chyba procesu -Name[sl]=Napaka opravila -Name[sv]=Processfel -Name[ta]=செயல்முறை பிழை -Name[tg]=Ҳангоми иҷро намудани амал хатогие дида мешавад -Name[tr]=İşlem hatası -Name[ug]=بىر تەرەپ قىلىشتا خاتالىق كۆرۈلدى -Name[uk]=Помилка процесу -Name[x-test]=xxProcess errorxx -Name[zh_CN]=处理出错 -Name[zh_TW]=行程錯誤 -Comment=Process finished with errors -Comment[bs]=Proces je zavrsio sa greškama -Comment[ca]=El procés ha finalitzat amb errors -Comment[ca@valencia]=El procés ha finalitzat amb errors -Comment[cs]=Proces dokončen s chybami -Comment[da]=Processen afsluttede med fejl -Comment[de]=Prozess mit Fehlern beendet -Comment[el]=Η διεργασία τερμάτισε με σφάλματα -Comment[en_GB]=Process finished with errors -Comment[es]=Proceso terminado con errores -Comment[et]=Protsess lõppes vigadega -Comment[eu]=Prozesua erroreekin amaitu da -Comment[fi]=Prosessi päättyi virheisiin -Comment[fr]=Le processus s'est terminé avec des erreurs -Comment[ga]=Chríochnaigh an próiseas le hearráidí -Comment[gl]=O proceso rematou con éxito -Comment[hi]=प्रक्रिया त्रुटि के साथ पूर्ण -Comment[hne]=काम गलती के साथ पूरा -Comment[hu]=A folyamat hibajelzéssel fejeződött be -Comment[it]=Processo completato con errori -Comment[ja]=プロセスはエラーを起こし、終了しました。 -Comment[kk]=Процес қателермен аяқталды -Comment[km]=ដំណើរការ​បាន​បញ្ចប់​ដោយ​មាន​កំហុស​ -Comment[ko]=오류와 함께 작업이 끝났음 -Comment[lt]=Procesas baigtas su klaidomis -Comment[lv]=Process beidzies ar kļūdām -Comment[mr]=प्रक्रीया त्रुटी येऊन संपली -Comment[ms]=Proses selesai dengan ralat -Comment[nb]=Prosessen ble fullført, men ga feil -Comment[nds]=Perzess mit Fehlers afslaten -Comment[nl]=Proces voltooid met fouten -Comment[pl]=Proces zakończony z błędami -Comment[pt]=O processo terminou com erros -Comment[pt_BR]=Processo concluído com erros -Comment[ro]=Proces încheiat cu erori -Comment[ru]=Процесс завершён с ошибками -Comment[sk]=Proces skončil s chybami -Comment[sl]=Opravilo se je končalo z napakami -Comment[sv]=Processen avslutades med fel -Comment[ta]=பிழையுடன் முடிவடைந்த செயலாக்கம் -Comment[tg]=Ҳангоми иҷро намудани амал хатогие дида мешавад -Comment[tr]=İşlem hatalarla bitti -Comment[ug]=بىر تەرەپ قىلىشتا خاتالىق كۆرۈلدى -Comment[uk]=Виконання завершилося з помилками -Comment[x-test]=xxProcess finished with errorsxx -Comment[zh_CN]=处理完成,但有错误 -Comment[zh_TW]=行程發生錯誤 -Action=None - -[Event/LoadingProject] -Name=Loading Project -Name[bs]=Učitavam projekat -Name[ca]=S'està carregant el projecte -Name[ca@valencia]=S'està carregant el projecte -Name[cs]=Načítám projekt -Name[da]=Indlæser projekt -Name[de]=Projekt wird geladen -Name[el]=Φόρτωση έργου -Name[en_GB]=Loading Project -Name[es]=Cargando proyecto -Name[et]=Projekti laadimine -Name[fi]=Ladataan projekti -Name[fr]=Chargement du projet -Name[ga]=Tionscadal á Luchtú -Name[gl]=Cargando o proxecto -Name[hu]=Projekt betöltése -Name[it]=Caricamento del progetto -Name[ja]=プロジェクトの読み込み -Name[kk]=Жобаны жүктеу -Name[km]=ផ្ទុក​គម្រោង​ -Name[nb]=Laster inn prosjekt -Name[nds]=Projekt warrt laadt -Name[nl]=Project wordt geladen -Name[pl]=Wczytywanie projektu -Name[pt]=A Carregar o Projecto -Name[pt_BR]=Carregando Projeto -Name[ru]=Загрузка проекта -Name[sk]=Načítavanie projektu -Name[sl]=Nalaganje projekta -Name[sv]=Laddar projekt -Name[tr]=Proje Yükleniyor -Name[ug]=قۇرۇلۇش ئوقۇش -Name[uk]=Завантаження проекту -Name[x-test]=xxLoading Projectxx -Name[zh_CN]=正在装入工程 -Name[zh_TW]=載入專案中 -Comment=A project loading process has just started -Comment[bs]=Proces učitavanja projekta je upravo počeo -Comment[ca]=Tot just s'acaba de començar a carregar el projecte -Comment[ca@valencia]=Tot just s'acaba de començar a carregar el projecte -Comment[cs]=Proces načítání projektu právě započal -Comment[da]=Indlæsning af projekt er lige startet -Comment[de]=Es ist ein Projekt-Ladeprozess gestartet -Comment[el]=Μια διαδικασία φόρτωσης έργου έχει μόλις ξεκινήσει -Comment[en_GB]=A project loading process has just started -Comment[es]=Acaba de comenzar un proceso de carga de proyecto -Comment[et]=Projekti laadimine just käivitati -Comment[fi]=Projektin lataamisprosessi on juuri alkanut -Comment[fr]=Un processus de chargement de projet vient de démarrer -Comment[gl]=Acaba de comezar un proceso de carga dun proxecto -Comment[hu]=A projekt betöltési folyamata elkezdődött -Comment[it]=È appena iniziato il caricamento di un progetto -Comment[ja]=プロジェクトの読み込みを開始しました -Comment[kk]=Жобаны жүктеу процесі жаңа ғана басталды -Comment[km]=ដំណើរការ​ផ្ទុក​គម្រោង​ទើបតែ​ត្រូវ​បាន​ចាប់ផ្ដើម​ -Comment[nb]=En prosess med prosjektinnlasting er nettopp startet -Comment[nds]=Dat Laden vun en Projekt hett jüst anfungen -Comment[nl]=Een proces voor het laden van een project is zojuist gestart -Comment[pl]=Rozpoczęło się wczytywanie projektu -Comment[pt]=Acabou de ser iniciado um processo de carregamento do projecto -Comment[pt_BR]=Um processo de carregamento de projeto foi iniciado -Comment[ru]=Началась загрузка проекта -Comment[sk]=Proces načítania projektu sa práve spustil -Comment[sl]=Pričelo se je opravilo nalaganja projekta -Comment[sv]=En laddningsprocess för projektet har just startats -Comment[tr]=Bir proje yükleme süreci başladı -Comment[ug]=قۇرۇلۇش ئوقۇش جەريانى باشلاندى -Comment[uk]=Процес завантаження проекту було запущено -Comment[x-test]=xxA project loading process has just startedxx -Comment[zh_CN]=启动了一次工程装入操作 -Comment[zh_TW]=已開始載入專案 -Action=Popup - -[Event/ProjectLoadedSuccessfully] -Name=Project Loaded Successfully -Name[bs]=Projekat uspješno učitan -Name[ca]=El projecte s'ha carregat amb èxit -Name[ca@valencia]=El projecte s'ha carregat amb èxit -Name[cs]=Projekt úspěšně načten -Name[da]=Projekt indlæst -Name[de]=Projekt erfolgreich geladen -Name[el]=Το έργο φορτώθηκε με επιτυχία -Name[en_GB]=Project Loaded Successfully -Name[es]=Proyecto cargado con éxito -Name[et]=Projekt on edukalt laaditud -Name[fi]=Projektin lataus onnistui -Name[fr]=Le projet a été chargé avec succès -Name[ga]=D'éirigh le luchtú an tionscadail -Name[gl]=O proxecto cargouse con éxito -Name[hu]=A projekt sikeresen betöltődött -Name[it]=Progetto caricato correttamente -Name[ja]=プロジェクトを読み込みました -Name[kk]=Жоба сәтті жүктелді -Name[km]=គម្រោង​បាន​ផ្ទុក​ដោយ​ជោគ​ជ័យ -Name[lt]=Projektas pakrautas sėkmingai -Name[nb]=Prosjektet vellykket lastet inn -Name[nds]=Projekt mit Spood laadt -Name[nl]=Project is succesvol geladen -Name[pl]=Projekt wczytany poprawnie -Name[pt]=O Projecto foi Carregado com Sucesso -Name[pt_BR]=Projeto Carregado com Sucesso -Name[ru]=Проект загружен -Name[sk]=Projekt úspešne načítaný -Name[sl]=Projekt uspešno naložen -Name[sv]=Projekt laddat med lyckat resultat -Name[tr]=Proje Başarılı Bir Şekilde Yüklendi -Name[ug]=قۇرۇلۇش مۇۋەپپەقىيەتلىك ئوقۇلدى -Name[uk]=Проект успішно завантажено -Name[x-test]=xxProject Loaded Successfullyxx -Name[zh_CN]=工程成功装入 -Name[zh_TW]=專案已成功載入 -Comment=A project has been loaded successfully -Comment[bs]=Projekat je uspješno učitan -Comment[ca]=S'ha carregat amb èxit un projecte -Comment[ca@valencia]=S'ha carregat amb èxit un projecte -Comment[cs]=Projekt byl úspěšně načten -Comment[da]=Et projekt er blevet indlæst -Comment[de]=Ein Projekt wurde erfolgreich geladen -Comment[el]=Ένα έργο φορτώθηκε επιτυχία -Comment[en_GB]=A project has been loaded successfully -Comment[es]=Un proyecto ha sido cargado con éxito -Comment[et]=Projekt on edukalt laaditud -Comment[fi]=Projekti on ladattu onnistuneesti -Comment[fr]=Un projet a été chargé avec succès -Comment[ga]=D'éirigh le luchtú an tionscadail -Comment[gl]=Un proxecto cargouse con éxito -Comment[hu]=A projekt sikeresen betöltődött -Comment[it]=Un progetto è stato caricato correttamente -Comment[ja]=プロジェクトを読み込みました -Comment[kk]=Жоба сәтті жүктелді -Comment[km]=គម្រោង​ត្រូវ​បាន​​ផ្ទុក​ដោយ​ជោគជ័យ -Comment[nb]=Et prosjekt er vellykket lastet inn -Comment[nds]=En Projekt wöör mit Spood laadt -Comment[nl]=Een project is succesvol geladen -Comment[pl]=Projekt został wczytany poprawnie -Comment[pt]=Foi carregado um projecto com sucesso -Comment[pt_BR]=Um projeto foi carregado com sucesso -Comment[ru]=Проект загружен успешно -Comment[sk]=Projekt bol úspešne načítaný -Comment[sl]=Projekt je bil uspešno naložen -Comment[sv]=Ett projekt har laddats med lyckat resultat -Comment[tr]=Bir proje başarıyla yüklendi -Comment[ug]=بىر قۇرۇلۇش مۇۋەپپەقىيەتلىك ئوقۇلدى -Comment[uk]=Проект було успішно завантажено -Comment[x-test]=xxA project has been loaded successfullyxx -Comment[zh_CN]=成功装入了一个工程 -Comment[zh_TW]=專案已成功載入 -Action=Popup - -[Context/debugger] -Name=Debugger -Name[bs]=Ispravljač grešaka -Name[ca]=Depurador -Name[ca@valencia]=Depurador -Name[cs]=Debugger -Name[da]=Fejlsøger -Name[de]=Debugger -Name[el]=Διορθωτής -Name[en_GB]=Debugger -Name[es]=Depurador -Name[et]=Silur -Name[fa]=اشکال‌زدا -Name[fi]=Virheenjäljitin -Name[fr]=Débogueur -Name[gl]=Depurador -Name[hu]=Hibakereső -Name[it]=Debugger -Name[ja]=デバッガ -Name[kk]=Жөндегіш -Name[km]=កម្មវិធី​បំបាត់​កំហុស -Name[nb]=Feilsøker -Name[nds]=Fehlersöker -Name[nl]=Debugger -Name[pl]=Debugger -Name[pt]=Depurador -Name[pt_BR]=Depurador -Name[ru]=Отладчик -Name[sk]=Debugger -Name[sl]=Razhroščevalnik -Name[sv]=Avlusare -Name[tr]=Hata Ayıklayıcı -Name[ug]=سازلىغۇچ -Name[uk]=Зневадник -Name[x-test]=xxDebuggerxx -Name[zh_CN]=调试器 -Name[zh_TW]=除錯器 - -[Event/BreakpointHit] -Contexts=debugger -Action=Taskbar -IconName=script-error -Name=Breakpoint Hit -Name[bs]=Dolazak do prijelomne tačke -Name[ca]=Punt d'interrupció -Name[ca@valencia]=Punt d'interrupció -Name[cs]=Dosažen Breakpoint -Name[da]=Stoppunkt nået -Name[de]=Haltepunkt erreicht -Name[el]=Σημείο προσωρινής παύσης -Name[en_GB]=Breakpoint Hit -Name[es]=Punto de interrupción alcanzado -Name[et]=Katkestuspunkti tabamus -Name[fi]=Keskeytyskohtaosuma -Name[fr]=Point d'arrêt atteint -Name[gl]=Atinxiuse un punto de parada -Name[hu]=Töréspont találat -Name[it]=Breakpoint raggiunto -Name[ja]=ブレイクポイントをヒット -Name[kk]=Аялдау нүктеге келу -Name[km]=ចំណុច​បញ្ឈប់ -Name[ko]=중단점 도달 -Name[nb]=Bruddpunkt nådd -Name[nds]=Hollpunkt drapen -Name[nl]=Breekpunt bereikt -Name[pl]=Uruchomiono pułapkę -Name[pt]=Ponto de Paragem Atingido -Name[pt_BR]=Ponto de interrupção atingido -Name[ru]=Достижение точки останова -Name[sk]=Dosiahnutý breakpoint -Name[sl]=Dosežena prekinitvena točka -Name[sv]=Brytpunkt påträffad -Name[tr]=Kesme Noktasına Gelindi -Name[ug]=توختاش نۇقتىسىغا تەگدى -Name[uk]=Проходження точки зупинки -Name[x-test]=xxBreakpoint Hitxx -Name[zh_CN]=断点命中 -Name[zh_TW]=遇到中斷點 -Comment=A Breakpoint has been hit by the debugger -Comment[bs]=Ispravljač grešaka je dosao do prijelomne tačke -Comment[ca]=El depurador ha assolit un punt d'interrupció -Comment[ca@valencia]=El depurador ha assolit un punt d'interrupció -Comment[cs]=Bod přerušení byl dosažen ladicím nástrojem -Comment[da]=Fejlsøgeren nåede et stoppunkt -Comment[de]=Der Debugger hat einen Haltepunkt erreicht -Comment[el]=Ο διορθωτής έχει σημειώσει προσωρινή παύση -Comment[en_GB]=A Breakpoint has been hit by the debugger -Comment[es]=El depurador ha alcanzado un punto de interrupción -Comment[et]=Silur jõudis katkestuspunktini -Comment[fi]=Virheenjäljitin on osunut keskeytyskohtaan -Comment[fr]=Un point d'arrêt a été atteint par le débogueur -Comment[gl]=O depurador chegou a un punto de parada -Comment[hu]=Egy töréspontot ért el a hibakereső -Comment[it]=Un breakpoint è stato raggiunto dal debugger -Comment[ja]=デバッガがブレイクポイントをヒットしました -Comment[kk]=Жөндегіштегі процес аялдау нүктеге келді -Comment[nb]=Feilsøkeren har nått et bruddpunkt -Comment[nds]=De Fehlersöker is bi en Hollpunkt ankamen -Comment[nl]=De debugger heeft een breekpunt bereikt -Comment[pl]=Pułapka została uruchomiona przez debugger -Comment[pt]=Foi atingido um ponto de paragem pelo depurador -Comment[pt_BR]=Um ponto de interrupção foi atingido pelo depurador -Comment[ru]=В отладчике достигнута точка останова -Comment[sk]=Debuger dosiahol breakpoint -Comment[sl]=Razhroščevalnik je dosegel prekinitveno točko -Comment[sv]=En brytpunkt har påträffats av avlusaren -Comment[tr]=Hata ayıklayıcı tarafından bir kesme noktasına gelindi -Comment[ug]=سازلىغۇچ توختاش نۇقتىسىغا تەگدى -Comment[uk]=Інструмент налагоджування пройшов позицію точки зупинки -Comment[x-test]=xxA Breakpoint has been hit by the debuggerxx -Comment[zh_CN]=调试器命中了一个断点 -Comment[zh_TW]=除錯器進行遇到中斷點 - -[Event/WatchpointHit] -Contexts=debugger -Action=Popup -Name=Watchpoint Hit -Name[bs]=Dolazak do pregledne tačke -Name[ca]=Punt d'observació -Name[ca@valencia]=Punt d'observació -Name[cs]=Zásah bodu sledování -Name[da]=Overvågningspunkt nået -Name[de]=Beobachtungspunkt erreicht -Name[el]=Θέση επιθεώρησης -Name[en_GB]=Watchpoint Hit -Name[es]=Punto de observación alcanzado -Name[et]=Jälgimispunkti tabamus -Name[fi]=Seurantakohtaosuma -Name[fr]=Point de surveillance atteint -Name[gl]=Atinxiuse un punto de vixilancia -Name[hu]=Figyelőpont találat -Name[it]=Watchpoint raggiunto -Name[ja]=ウォッチポイントをヒット -Name[kk]=Бақылау нүктеге келу -Name[km]=ចំណុច​មើល -Name[nb]=Treff på vaktpunkt -Name[nds]=Luerpunkt drapen -Name[nl]=Bewakingspunt bereikt -Name[pl]=Uruchomiono punkt kontrolny -Name[pt]=Ponto de Vigia Atingido -Name[pt_BR]=Ponto de Visualização atingido -Name[ru]=Достижение точки наблюдения -Name[sk]=Dosiahnutý bod sledovania -Name[sl]=Dosežena opazovalna točka -Name[sv]=Bevakningspunkt påträffad -Name[tr]=İzleme Noktasına Gelindi -Name[ug]=كۆزىتىش نۇختىسىغا تەگدى -Name[uk]=Проходження точки спостереження -Name[x-test]=xxWatchpoint Hitxx -Name[zh_CN]=观察点命中 -Name[zh_TW]=遇到監看點 -Comment=A Watchpoint has been hit by the debugger -Comment[bs]=Ispravljač grešaka je došao do pregledne tačke -Comment[ca]=El depurador ha assolit un punt d'observació -Comment[ca@valencia]=El depurador ha assolit un punt d'observació -Comment[cs]=Bod sledování byl dosažen ladicím nástrojem -Comment[da]=Fejlsøgeren nåede et overvågningspunkt -Comment[de]=Der Debugger hat einen Beobachtungspunkt erreicht -Comment[el]=Ο διορθωτής έχει σημειώσει θέση επιθεώρησης -Comment[en_GB]=A Watchpoint has been hit by the debugger -Comment[es]=El depurador ha alcanzado un punto de observación -Comment[et]=Silur jõudis jälgimispunktini -Comment[fi]=Virheenjäljitin on osunut seurantakohtaan -Comment[fr]=Un point de surveillance a été atteint par le débogueur -Comment[gl]=O depurador chegou a un punto de vixilancia -Comment[hu]=Egy figyelőpontot ért el a hibakereső -Comment[it]=Un watchpoint è stato raggiunto dal debugger -Comment[ja]=デバッガがウォッチポイントをヒットしました -Comment[kk]=Жөндегіштегі процес бақылау нүктеге келді -Comment[nb]=Feilsøkeren har truffet et vaktpunkt -Comment[nds]=De Fehlersöker is bi en Luerpunkt ankamen -Comment[nl]=De debugger heeft een bewakingspunt bereikt -Comment[pl]=Debugger uruchomił punkt kontrolny -Comment[pt]=Foi atingido um ponto de vigia pelo depurador -Comment[pt_BR]=Um ponto de Visualização foi atingido pelo depurador -Comment[ru]=В отладчике достигнута точка наблюдения -Comment[sk]=Debuger dosiahol kontrolný bod -Comment[sl]=Razhroščevalnik je dosegel opazovalno točko -Comment[sv]=En bevakningspunkt har påträffats av avlusaren -Comment[tr]=Hata ayıklayıcı tarafından bir izleme noktasına gelindi -Comment[ug]=سازلىغۇچ كۆزىتىش نۇقتىسىغا تەگدى -Comment[uk]=Інструмент налагоджування пройшов позицію точки спостереження -Comment[x-test]=xxA Watchpoint has been hit by the debuggerxx -Comment[zh_CN]=调试器命中了一个观察点 -Comment[zh_TW]=除錯器進行遇到監看點 diff --git a/kdevelop/app/kdevelop.xml b/kdevelop/app/kdevelop.xml deleted file mode 100644 index a487cc55..00000000 --- a/kdevelop/app/kdevelop.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - KDevelop 4 Project File - Fitxer de projecte de KDevelop 4 - Fitxer de projecte de KDevelop 4 - Soubor projektu Kdevelop 4 - KDevelop 4 projektfil - KDevelop-4-Projektdatei - Αρχείο έργου KDevelop 4 - KDevelop 4 Project File - Archivo de proyecto de KDevelop 4 - KDevelop 4 projektifail - پروندۀ پروژۀ KDevelop 4 - KDevelop 4-projektitiedosto - Fichier projet KDevelop 4 - Comhad Tionscadail KDevelop 4 - Ficheiro de proxecto de KDevelop 4 - के-डेवलप ४ परियोजना फ़ाइल - के-डेवलप ४ परियोजना फाइल - File di progetto per KDevelop 4 - KDevelop 4 プロジェクトファイル - KDevelop 4 프로젝트 파일 - KDevelop 4 projekta fails - KDevelop 4 prosjektfil - KDevelop4-Projektdatei - केडीई विकास ४ परियोजना फाइल - KDevelop 4 projectbestand - Plik projektu KDevelopa 4 - Ficheiro de Projecto do KDevelop 4 - Arquivo de Projeto do KDevelop 4 - Fișier Proiect Kdevelop 4 - Файл проекта KDevelop 4 - Projektna datoteka KDevelop 4 - KDevelop 4-projektfil - KDevelop 4 Proje Dosyası - Файл проекту KDevelop 4 - KDevelop 4 工程文件 - KDevelop 4 專案檔 - - - diff --git a/kdevelop/app/kdevelop_ps.desktop b/kdevelop/app/kdevelop_ps.desktop deleted file mode 100644 index c674b498..00000000 --- a/kdevelop/app/kdevelop_ps.desktop +++ /dev/null @@ -1,75 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=kdevelop --icon '%i' --caption '%c' --ps -MimeType=application/x-kdevelop; -Icon=kdevelop -Terminal=false -Name=KDevelop 4 (Pick Session) -Name[bs]=KDevelop 4 (Dobavljanje sesije) -Name[ca]=KDevelop 4 (Selecció de sessió) -Name[ca@valencia]=KDevelop 4 (Selecció de sessió) -Name[cs]=KDevelop 4 (Zvolte relaci) -Name[da]=KDevelop 4 (vælg session) -Name[de]=KDevelop 4 (Sitzung auswählen) -Name[el]=KDevelop 4 (Επιλογή συνεδρίας) -Name[en_GB]=KDevelop 4 (Pick Session) -Name[es]=KDevelop 4 (escoger sesión) -Name[et]=KDevelop 4 (seansi valimine) -Name[fi]=KDevelop 4 (valitse istunto) -Name[fr]=KDevelop 4 (choix d'une session) -Name[ga]=KDevelop 4 (Roghnaigh Seisiún) -Name[gl]=KDevelop 4 (escoller unha sesión) -Name[hu]=KDevelop (munkamenet felvétele) -Name[it]=KDevelop 4 (Scegliere la sessione) -Name[kk]=KDevelop 4 (Сеансты сайлау) -Name[lt]=KDevelop 4 (pasirinkite seansą) -Name[nb]=KDevelop 4 (Velg økt) -Name[nds]=KDevelop 4 (Törn utsöken) -Name[nl]=KDevelop 4 (pak een sessie) -Name[pl]=KDevelop 4 (Wybierz sesję) -Name[pt]=KDevelop 4 (Seleccionar uma Sessão) -Name[pt_BR]=KDevelop 4 (selecionar uma sessão) -Name[ru]=KDevelop 4 (с выбором сеанса) -Name[sk]=KDevelop 4 (zvoliť sedenie) -Name[sl]=KDevelop 4 (izbor seje) -Name[sv]=KDevelop 4 (välj session) -Name[tr]=KDevelop 4 (Oturum Seçin) -Name[uk]=KDevelop 4 (Вибір сеансу) -Name[x-test]=xxKDevelop 4 (Pick Session)xx -Name[zh_CN]=KDevelop 4 (选择会话) -Name[zh_TW]=KDevelop 4(選擇工作階段) -GenericName=Integrated Development Environment (Pick Session to start with) -GenericName[bs]=Integrisano razvojno okruženje (odaberite sesiju za započeti) -GenericName[ca]=Entorn integrat de desenvolupament (Seleccioneu una sessió) -GenericName[ca@valencia]=Entorn integrat de desenvolupament (Seleccioneu una sessió) -GenericName[cs]=Integrované Vývojové Prostředí (Zvolte si relaci, se kterou si přejete začít) -GenericName[da]=Integreret udviklingsmiljø (IDE) (vælg session at starte med) -GenericName[de]=Integrierte Entwicklungsumgebung (zu startende Sitzung auswählen) -GenericName[el]=Ολοκληρωμένο περιβάλλον ανάπτυξης (Επιλογή συνεδρίας για εκκίνηση) -GenericName[en_GB]=Integrated Development Environment (Pick Session to start with) -GenericName[es]=Entorno de desarrollo integrado (escoger sesión con la que empezar) -GenericName[et]=Integreeritud arenduskeskkond (seansi valimine alustamiseks) -GenericName[fi]=Integroitu kehitysympäristö (valitse aloitettava istunto) -GenericName[fr]=Environnement de Développement Intégré (choix d'une session avec laquelle démarrer) -GenericName[ga]=Timpeallacht Chomhtháite Fhorbartha (Roghnaigh Seisiún i dtosach báire) -GenericName[gl]=Entorno de desenvolvemento integrado (Escolla unha sesión coa que comezar) -GenericName[hu]=Integrált fejlesztői környezet (először munkamenet felvétele) -GenericName[it]=Ambiente di sviluppo integrato (Scegliere la sessione con cui iniziare) -GenericName[kk]=Біріктірілген құрастыру ортасы (Бастайтын сеансты таңдап алу) -GenericName[lt]=Integruota programavimo aplinka (pasirinkite seansą su kuriuo startuosite) -GenericName[nb]=Integrert utviklingsmiljø (velg økt å starte med) -GenericName[nds]=Programmsmeed (Söök en Törn ut, mit den Du starten wullt) -GenericName[nl]=Geïntegreerde ontwikkelomgeving (pak een sessie om mee te beginnen) -GenericName[pl]=Zintegrowane środowisko programistyczne (Wybierz sesję do rozpoczęcia) -GenericName[pt]=Ambiente de Desenvolvimento Integrado (Seleccionar a sessão com que iniciar) -GenericName[pt_BR]=Ambiente Integrado de Desenvolvimento (selecione a sessão para início) -GenericName[ru]=Интегрированная среда разработки (с выбором начального сеанса) -GenericName[sk]=Integrované vývojové prostredie (zvoľte sedenie na spustenie) -GenericName[sl]=Integrirano razvojno okolje (izberite sejo za začetek) -GenericName[sv]=Integrerad utvecklingsmiljö (välj session att starta) -GenericName[tr]=Tümleşik Geliştirme Ortamı (Başlamak için Oturum Seçin) -GenericName[uk]=Комплексне середовище розробки (виберіть сеанс, з якого слід розпочати роботу) -GenericName[x-test]=xxIntegrated Development Environment (Pick Session to start with)xx -GenericName[zh_CN]=集成开发环境(选择要启动的会话) -GenericName[zh_TW]=整合開發環境(選擇要開始的工作階段) -Categories=Qt;KDE;Development;IDE; diff --git a/kdevelop/app/kdeveloprc b/kdevelop/app/kdeveloprc deleted file mode 100644 index cbd856a1..00000000 --- a/kdevelop/app/kdeveloprc +++ /dev/null @@ -1,69 +0,0 @@ -[AStyle] -Brackets=Break -Fill=Spaces -FillSpaces=2 -IndentBrackets=false -IndentCases=false -IndentClasses=false -IndentLabels=true -IndentNamespaces=true -IndentSwitches=false -KeepBlocks=false -KeepStatements=false -MaxStatement=40 -MinConditional=-1 -PadOperators=false -PadParentheses=false -Style=UserDefined - -[Editor] -EmbeddedKTextEditor=Embedded KDE Advanced Text Editor Component - -[General Options] -Read Last Project On Startup=true -Display Document Categories=true - -[Mainwindow] -Height 768=548 -Width 1024=735 - -[Mainwindow Toolbar mainToolBar] -Hidden=false -IconSize=22 -IconText=IconOnly -Index=0 -NewLine=false -Offset=-1 -Position=Top - -[Mainwindow Toolbar QextMdiTaskBar] -Hidden=true -IconSize=22 -IconText=IconOnly -Index=1 -NewLine=false -Offset=-1 -Position=Bottom - -[Mainwindow Toolbar browserToolBar] -Hidden=false -IconSize=22 -IconText=IconOnly -Index=2 -NewLine=true -Offset=-1 -Position=Top - -[Plugins] -KDevScripting=false - -[UI] -TabVisibility=0 -CloseOnHover=false -CloseOnHoverDelay=false -OpenNewTabAfterCurrent=true -ShowCloseTabsButton=true -ShowTabIcons=false - -[Kate View Defaults] -Icon Bar=true diff --git a/kdevelop/app/kdevelopui.rc b/kdevelop/app/kdevelopui.rc deleted file mode 100644 index 4bd04e62..00000000 --- a/kdevelop/app/kdevelopui.rc +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - Session - - - - &Project - - - - - - - - - - - - - - - - - - - &Run - - - - - - - - - - - - - - - - - - - - - - - - &Navigation - - - - - - - - - - - - - - - - - - - - - - &File - - - - - - - - - - - &Edit - - - - - - - - - - - - - Editor - - - - - Code - - - - - - - &Window - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Settings - - - - - - - - - - - - - - - Main Toolbar - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kdevelop/app/kdevideextension.cpp b/kdevelop/app/kdevideextension.cpp deleted file mode 100644 index 42b77e1c..00000000 --- a/kdevelop/app/kdevideextension.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** - * Copyright 2004 Alexander Dymo * - * * - * 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 2 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, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "kdevideextension.h" - -#include -#include - -#include - -KDevIDEExtension::KDevIDEExtension() - : ShellExtension() -{ -} - -void KDevIDEExtension::init() -{ - s_instance = new KDevIDEExtension(); -} - -QString KDevIDEExtension::xmlFile() -{ - return "kdevelopui.rc"; -} - -QString KDevIDEExtension::binaryPath() -{ - return QApplication::applicationDirPath() + "/kdevelop"; -} - -KDevelop::AreaParams KDevIDEExtension::defaultArea() -{ - KDevelop::AreaParams params = {"code", i18n("Code")}; - return params; -} - -QString KDevIDEExtension::projectFileExtension() -{ - return "kdev4"; -} - -QString KDevIDEExtension::projectFileDescription() -{ - return i18n("KDevelop4 Project Files"); -} - -QStringList KDevIDEExtension::defaultPlugins() -{ - return QStringList(); -} - diff --git a/kdevelop/app/kdevideextension.h b/kdevelop/app/kdevideextension.h deleted file mode 100644 index 48b32507..00000000 --- a/kdevelop/app/kdevideextension.h +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright 2004 Alexander Dymo * - * * - * 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 2 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, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef KDEVIDEEXTENSION_H -#define KDEVIDEEXTENSION_H - -#include - - -class KDevIDEExtension : public KDevelop::ShellExtension { -public: - static void init(); - - virtual QString xmlFile(); - virtual QString binaryPath(); - virtual KDevelop::AreaParams defaultArea(); - virtual QString projectFileExtension(); - virtual QString projectFileDescription(); - virtual QStringList defaultPlugins(); - -protected: - KDevIDEExtension(); -}; - -#endif - - - - - - - - diff --git a/kdevelop/app/main.cpp b/kdevelop/app/main.cpp deleted file mode 100644 index 05576ac6..00000000 --- a/kdevelop/app/main.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/*************************************************************************** - * Copyright 2003-2009 Alexander Dymo * - * Copyright 2007 Ralf Habacker * - * Copyright 2006-2007 Matt Rogers * - * Copyright 2006-2007 Hamish Rodda * - * Copyright 2005-2007 Adam Treat * - * Copyright 2003-2007 Jens Dagerbo * - * Copyright 2001-2002 Bernd Gehrmann * - * Copyright 2001-2002 Matthias Hoelzer-Kluepfel * - * Copyright 2003 Roberto Raggi * - * Copyright 2010 Niko Sams * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; 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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kdevideextension.h" - -#include - -#include "welcomepage/welcomepageview.h" -#include "splash.h" - -#ifdef Q_OS_MAC -#include -#endif - -using KDevelop::Core; - -// Represents a file to be opened, consisting of its URL and the linenumber to jump to -typedef QPair File; - -class KDevelopApplication: public KApplication { -public: - explicit KDevelopApplication(bool GUIenabled = true): KApplication(GUIenabled) {} - - void saveState( QSessionManager& sm ) { - if (KDevelop::Core::self() && KDevelop::Core::self()->sessionController()) { - QString x11SessionId = QString("%1_%2").arg(sm.sessionId()).arg(sm.sessionKey()); - QString kdevelopSessionId = KDevelop::Core::self()->sessionController()->activeSession()->id().toString(); - - sm.setRestartCommand(QStringList() << QCoreApplication::applicationFilePath() << "-session" << x11SessionId << "-s" << kdevelopSessionId); - } - - KApplication::saveState(sm); - } -}; - -/// Tries to find a session identified by @p data in @p sessions. -/// The @p data may be either a session's name or a string-representation of its UUID. -/// @return pointer to the session or NULL if nothing appropriate has been found -static const KDevelop::SessionInfo* findSessionInList( QList& sessions, const QString& data ) -{ - // We won't search a session without input data, since that could lead to false-positives - // with unnamed sessions - if( data.isEmpty() ) - return 0; - - for( QList::const_iterator it = sessions.constBegin(); it != sessions.constEnd(); ++it ) { - if ( ( it->name == data ) || ( it->uuid.toString() == data ) ) { - const KDevelop::SessionInfo& sessionRef = *it; - return &sessionRef; - } - } - return 0; -} - -/// Parses a filename given as an argument by determining its line number and full path -static File parseFilename(QString argument) -{ - if ( KUrl::isRelativeUrl(argument) && ! argument.startsWith('/') ) { - argument = QDir::currentPath() + "/" + argument; - } - //Allow opening specific lines in documents, like mydoc.cpp:10 - int lineNumberOffset = argument.lastIndexOf(':'); - int line = -1; - if( lineNumberOffset != -1 ) - { - bool isInt; - int lineNr = argument.mid(lineNumberOffset+1).toInt(&isInt); - if (isInt) - { - argument = argument.left(lineNumberOffset); - line = lineNr; - } - } - return File(argument, line); -} - -/// Performs a DBus call to open the given @p files in the running kdev instance identified by @p pid -/// Returns the exit status -static int openFilesInRunningInstance(const QVector& files, int pid) -{ - const QString service = QString("org.kdevelop.kdevelop-%1").arg(pid); - QDBusInterface iface(service, "/org/kdevelop/DocumentController", "org.kdevelop.DocumentController"); - - QStringList urls; - bool errors_occured = false; - foreach ( const File& file, files ) { - QDBusReply result = iface.call("openDocumentSimple", file.first); - if ( ! result.value() ) { - QTextStream err(stderr); - err << i18n("Could not open file %1.", file.first) << "\n"; - errors_occured = true; - } - } - // make the window visible - QDBusMessage makeVisible = QDBusMessage::createMethodCall( service, "/kdevelop/MainWindow", "org.kdevelop.MainWindow", - "ensureVisible" ); - QDBusConnection::sessionBus().asyncCall( makeVisible ); - return errors_occured ? 1 : 0; -} - -/// Gets the PID of a running KDevelop instance, eventually asking the user if there is more than one. -/// Returns -1 in case there are no running sessions. -static int getRunningSessionPid() -{ - QList candidates; - foreach( const KDevelop::SessionInfo& si, KDevelop::SessionController::availableSessionInfo() ) { - if( KDevelop::SessionController::isSessionRunning(si.uuid.toString()) ) { - candidates << si; - } - } - if ( candidates.isEmpty() ) { - return -1; - } - - QString sessionUuid; - if ( candidates.size() == 1 ) { - sessionUuid = candidates.first().uuid.toString(); - } - else { - const QString title = i18n("Select the session to open the document in"); - sessionUuid = KDevelop::SessionController::showSessionChooserDialog(title, true); - } - return KDevelop::SessionController::sessionRunInfo(sessionUuid).holderPid; -} - -int main( int argc, char *argv[] ) -{ -#ifdef Q_OS_MAC - CFBundleRef mainBundle = CFBundleGetMainBundle(); - if (mainBundle) { - // get the application's Info Dictionary. For app bundles this would live in the bundle's Info.plist, - // for regular executables it is obtained in another way. - CFMutableDictionaryRef infoDict = (CFMutableDictionaryRef) CFBundleGetInfoDictionary(mainBundle); - if (infoDict) { - // Try to prevent App Nap on OS X. This can be tricky in practice, at least in 10.9 . - CFDictionarySetValue(infoDict, CFSTR("NSAppSleepDisabled"), kCFBooleanTrue); - CFDictionarySetValue(infoDict, CFSTR("NSSupportsAutomaticTermination"), kCFBooleanFalse); - } - } -#endif - - static const char description[] = I18N_NOOP( "The KDevelop Integrated Development Environment" ); - KAboutData aboutData( "kdevelop", 0, ki18n( "KDevelop" ), QByteArray(VERSION), ki18n(description), KAboutData::License_GPL, - ki18n( "Copyright 1999-2014, The KDevelop developers" ), KLocalizedString(), "http://www.kdevelop.org/" ); - aboutData.addAuthor( ki18n("Andreas Pakulat"), ki18n( "Architecture, VCS Support, Project Management Support, QMake Projectmanager" ), "apaku@gmx.de" ); - aboutData.addAuthor( ki18n("Alexander Dymo"), ki18n( "Architecture, Sublime UI, Ruby support" ), "adymo@kdevelop.org" ); - aboutData.addAuthor( ki18n("David Nolden"), ki18n( "Definition-Use Chain, C++ Support, Code Navigation, Code Completion, Coding Assistance, Refactoring" ), "david.nolden.kdevelop@art-master.de" ); - aboutData.addAuthor( ki18n("Aleix Pol Gonzalez"), ki18n( "Co-Maintainer, CMake Support, Run Support, Kross Support" ), "aleixpol@gmail.com" ); - aboutData.addAuthor( ki18n("Vladimir Prus"), ki18n( "GDB integration" ), "ghost@cs.msu.su" ); - aboutData.addAuthor( ki18n("Hamish Rodda"), ki18n( "Text editor integration, definition-use chain" ), "rodda@kde.org" ); - aboutData.addAuthor( ki18n("Amilcar do Carmo Lucas"), ki18n( "Website admin, API documentation, Doxygen and autoproject patches" ), "amilcar@kdevelop.org" ); - aboutData.addAuthor( ki18n("Niko Sams"), ki18n( "GDB integration, Webdevelopment Plugins" ), "niko.sams@gmail.com" ); - aboutData.addAuthor( ki18n("Milian Wolff"), ki18n( "Co-Maintainer, Generic manager, Webdevelopment Plugins, Snippets, Performance" ), "mail@milianw.de" ); - aboutData.addAuthor( ki18n("Sven Brauch"), ki18n( "Python Support, User Interface improvements" ), "svenbrauch@gmail.com" ); - - aboutData.addCredit( ki18n("Matt Rogers"), KLocalizedString(), "mattr@kde.org"); - aboutData.addCredit( ki18n("Cédric Pasteur"), ki18n("astyle and indent support"), "cedric.pasteur@free.fr" ); - aboutData.addCredit( ki18n("Evgeniy Ivanov"), ki18n("Distributed VCS, Git, Mercurial"), "powerfox@kde.ru" ); - // QTest integration is separate in playground currently. - //aboutData.addCredit( ki18n("Manuel Breugelmanns"), ki18n( "Veritas, QTest integration"), "mbr.nxi@gmail.com" ); - aboutData.addCredit( ki18n("Robert Gruber") , ki18n( "SnippetPart, debugger and usability patches" ), "rgruber@users.sourceforge.net" ); - aboutData.addCredit( ki18n("Dukju Ahn"), ki18n( "Subversion plugin, Custom Make Manager, Overall improvements" ), "dukjuahn@gmail.com" ); - aboutData.addCredit( ki18n("Harald Fernengel"), ki18n( "Ported to Qt 3, patches, valgrind, diff and perforce support" ), "harry@kdevelop.org" ); - aboutData.addCredit( ki18n("Roberto Raggi"), ki18n( "C++ parser" ), "roberto@kdevelop.org" ); - aboutData.addCredit( ki18n("The KWrite authors"), ki18n( "Kate editor component" ), "kwrite-devel@kde.org" ); - aboutData.addCredit( ki18n("Nokia Corporation/Qt Software"), ki18n( "Designer code" ), "qt-info@nokia.com" ); - - aboutData.addCredit( ki18n("Contributors to older versions:"), KLocalizedString(), "" ); - aboutData.addCredit( ki18n("The KHTML authors"), ki18n( "HTML documentation component" ), "kfm-devel@kde.org" ); - aboutData.addCredit( ki18n("Bernd Gehrmann"), ki18n( "Initial idea, basic architecture, much initial source code" ), "bernd@kdevelop.org" ); - aboutData.addCredit( ki18n("Caleb Tennis"), ki18n( "KTabBar, bugfixes" ), "caleb@aei-tech.com" ); - aboutData.addCredit( ki18n("Richard Dale"), ki18n( "Java & Objective C support" ), "Richard_Dale@tipitina.demon.co.uk" ); - aboutData.addCredit( ki18n("John Birch"), ki18n( "Debugger frontend" ), "jbb@kdevelop.org" ); - aboutData.addCredit( ki18n("Sandy Meier"), ki18n( "PHP support, context menu stuff" ), "smeier@kdevelop.org" ); - aboutData.addCredit( ki18n("Kurt Granroth"), ki18n( "KDE application templates" ), "kurth@granroth.org" ); - aboutData.addCredit( ki18n("Ian Reinhart Geiser"), ki18n( "Dist part, bash support, application templates" ), "geiseri@yahoo.com" ); - aboutData.addCredit( ki18n("Matthias Hoelzer-Kluepfel"), ki18n( "Several components, htdig indexing" ), "hoelzer@kde.org" ); - aboutData.addCredit( ki18n("Victor Roeder"), ki18n( "Help with Automake manager and persistent class store" ), "victor_roeder@gmx.de" ); - aboutData.addCredit( ki18n("Simon Hausmann"), ki18n( "Help with KParts infrastructure" ), "hausmann@kde.org" ); - aboutData.addCredit( ki18n("Oliver Kellogg"), ki18n( "Ada support" ), "okellogg@users.sourceforge.net" ); - aboutData.addCredit( ki18n("Jakob Simon-Gaarde"), ki18n( "QMake projectmanager" ), "jsgaarde@tdcspace.dk" ); - aboutData.addCredit( ki18n("Falk Brettschneider"), ki18n( "MDI modes, QEditor, bugfixes" ), "falkbr@kdevelop.org" ); - aboutData.addCredit( ki18n("Mario Scalas"), ki18n( "PartExplorer, redesign of CvsPart, patches, bugs(fixes)" ), "mario.scalas@libero.it" ); - aboutData.addCredit( ki18n("Jens Dagerbo"), ki18n( "Replace, Bookmarks, FileList and CTags2 plugins. Overall improvements and patches" ), "jens.dagerbo@swipnet.se" ); - aboutData.addCredit( ki18n("Julian Rockey"), ki18n( "Filecreate part and other bits and patches" ), "linux@jrockey.com" ); - aboutData.addCredit( ki18n("Ajay Guleria"), ki18n( "ClearCase support" ), "ajay_guleria@yahoo.com" ); - aboutData.addCredit( ki18n("Marek Janukowicz"), ki18n( "Ruby support" ), "child@t17.ds.pwr.wroc.pl" ); - aboutData.addCredit( ki18n("Robert Moniot"), ki18n( "Fortran documentation" ), "moniot@fordham.edu" ); - aboutData.addCredit( ki18n("Ka-Ping Yee"), ki18n( "Python documentation utility" ), "ping@lfw.org" ); - aboutData.addCredit( ki18n("Dimitri van Heesch"), ki18n( "Doxygen wizard" ), "dimitri@stack.nl" ); - aboutData.addCredit( ki18n("Hugo Varotto"), ki18n( "Fileselector component" ), "hugo@varotto-usa.com" ); - aboutData.addCredit( ki18n("Matt Newell"), ki18n( "Fileselector component" ), "newellm@proaxis.com" ); - aboutData.addCredit( ki18n("Daniel Engelschalt"), ki18n( "C++ code completion, persistent class store" ), "daniel.engelschalt@gmx.net" ); - aboutData.addCredit( ki18n("Stephane Ancelot"), ki18n( "Patches" ), "sancelot@free.fr" ); - aboutData.addCredit( ki18n("Jens Zurheide"), ki18n( "Patches" ), "jens.zurheide@gmx.de" ); - aboutData.addCredit( ki18n("Luc Willems"), ki18n( "Help with Perl support" ), "Willems.luc@pandora.be" ); - aboutData.addCredit( ki18n("Marcel Turino"), ki18n( "Documentation index view" ), "M.Turino@gmx.de" ); - aboutData.addCredit( ki18n("Yann Hodique"), ki18n( "Patches" ), "Yann.Hodique@lifl.fr" ); - aboutData.addCredit( ki18n("Tobias Gl\303\244\303\237er") , ki18n( "Documentation Finder, qmake projectmanager patches, usability improvements, bugfixes ... " ), "tobi.web@gmx.de" ); - aboutData.addCredit( ki18n("Andreas Koepfle") , ki18n( "QMake project manager patches" ), "koepfle@ti.uni-mannheim.de" ); - aboutData.addCredit( ki18n("Sascha Cunz") , ki18n( "Cleanup and bugfixes for qEditor, AutoMake and much other stuff" ), "mail@sacu.de" ); - aboutData.addCredit( ki18n("Zoran Karavla"), ki18n( "Artwork for the ruby language" ), "webmaster@the-error.net", "http://the-error.net" ); - - - //we can't use KCmdLineArgs as it doesn't allow arguments for the debugee - //so lookup the --debug switch and eat everything behind by decrementing argc - //debugArgs is filled with args after --debug - QStringList debugArgs; - QString debugeeName; - { - bool debugFound = false; - int c = argc; - for (int i=0; i < c; ++i) { - if (debugFound) { - debugArgs << argv[i]; - } else if (qstrcmp(argv[i], "--debug") == 0 || qstrcmp(argv[i], "-d") == 0) { - if (argc <= i+1) { - argc = i + 1; - } else { - i++; - argc = i + 1; - } - debugFound = true; - } else if (QString(argv[i]).startsWith("--debug=")) { - argc = i + 1; - debugFound = true; - } - } - } - - KCmdLineArgs::init( argc, argv, &aboutData ); - KCmdLineOptions options; - options.add("n") - .add("new-session ", ki18n("Open KDevelop with a new session using the given name.")); - options.add("s") - .add("open-session ", ki18n("Open KDevelop with the given session.\n" - "You can pass either hash or the name of the session." )); - options.add("ps").add("pick-session", ki18n("Shows all available sessions and lets you select one to open." )); - options.add("pss").add("pick-session-shell", ki18n("List all available sessions on shell and lets you select one to open." )); - options.add("l") - .add("list-sessions", ki18n( "List available sessions and quit." )); - options.add("p") - .add("project ", ki18n( "Open KDevelop and load the given project." )); - options.add("d") - .add("debug ", - ki18n( "Start debugging an application in KDevelop with the given debugger.\n" - "The binary that should be debugged must follow - including arguments.\n" - "Example: kdevelop --debug gdb myapp --foo bar")); - - options.add("pid"); - - options.add("+files", ki18n( "Files to load" )); - - options.add(":", ki18n("Deprecated options:")); - options.add("sessions", ki18n( "Same as -l / --list-sessions" )); - options.add("cs ", ki18n( "Same as -n / --new-session" )); - - KCmdLineArgs::addCmdLineOptions( options ); - KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - KDevelopApplication app; - - // The session-controller needs to arguments to eventually pass them to newly opened sessions - KDevelop::SessionController::setArguments(argc, argv); - - if(args->isSet("sessions") || args->isSet("list-sessions")) - { - QTextStream qout(stdout); - qout << endl << ki18n("Available sessions (use '-s HASH' or '-s NAME' to open a specific one):").toString() << endl << endl; - qout << QString("%1").arg(ki18n("Hash").toString(), -38) << '\t' << ki18n("Name: Opened Projects").toString() << endl; - foreach(const KDevelop::SessionInfo& si, KDevelop::SessionController::availableSessionInfo()) - { - if ( si.name.isEmpty() && si.projects.isEmpty() ) { - continue; - } - qout << si.uuid.toString() << '\t' << si.description; - - if(KDevelop::SessionController::isSessionRunning(si.uuid.toString())) - qout << " " << i18n("[running]"); - - qout << endl; - } - return 0; - } - - // Handle extra arguments, which stand for files to open - QVector initialFiles; - for ( int i = 0; i < args->count(); i++ ) { - initialFiles.append(parseFilename(args->arg(i))); - } - if ( ! initialFiles.isEmpty() && ! args->isSet("open-session") && ! args->isSet("new-session") ) - { - int pid = getRunningSessionPid(); - if ( pid > 0 ) { - return openFilesInRunningInstance(initialFiles, pid); - } - // else there are no running sessions, and the generated list of files will be opened below. - } - - // if empty, restart kdevelop with last active session, see SessionController::defaultSessionId - QString session; - - if(args->isSet("pss")) - { - QTextStream qerr(stderr); - QList candidates; - foreach(const KDevelop::SessionInfo& si, KDevelop::SessionController::availableSessionInfo()) - if( (!si.name.isEmpty() || !si.projects.isEmpty() || args->isSet("pid")) && - (!args->isSet("pid") || KDevelop::SessionController::isSessionRunning(si.uuid.toString()))) - candidates << si; - - if(candidates.size() == 0) - { - qerr << "no session available" << endl; - return 1; - } - - if(candidates.size() == 1 && args->isSet("pid")) - { - session = candidates[0].uuid.toString(); - }else{ - for(int i = 0; i < candidates.size(); ++i) - qerr << "[" << i << "]: " << candidates[i].description << endl; - - int chosen; - std::cin >> chosen; - if(std::cin.good() && (chosen >= 0 && chosen < candidates.size())) - { - session = candidates[chosen].uuid.toString(); - }else{ - qerr << "invalid selection" << endl; - return 1; - } - } - } - - if(args->isSet("ps")) - { - bool onlyRunning = args->isSet("pid"); - session = KDevelop::SessionController::showSessionChooserDialog(i18n("Select the session you would like to use"), onlyRunning); - if(session.isEmpty()) - return 1; - } - - if ( args->isSet("debug") ) { - if ( debugArgs.isEmpty() ) { - QTextStream qerr(stderr); - qerr << endl << i18nc("@info:shell", "Specify the binary you want to debug.") << endl; - return 1; - } - debugeeName = i18n("Debug %1", KUrl( debugArgs.first() ).fileName()); - session = debugeeName; - } else if ( args->isSet("cs") || args->isSet("new-session") ) - { - session = args->isSet("cs") ? args->getOption("cs") : args->getOption("new-session"); - foreach(const KDevelop::SessionInfo& si, KDevelop::SessionController::availableSessionInfo()) - { - if ( session == si.name ) { - QTextStream qerr(stderr); - qerr << endl << i18n("A session with the name %1 exists already. Use the -s switch to open it.", session) << endl; - return 1; - } - } - // session doesn't exist, we can create it - } else if ( args->isSet("open-session") ) { - session = args->getOption("open-session"); - //If there is a session and a project with the same name, always open the session - //regardless of the order encountered - QString projectAsSession; - bool found = false; - foreach(const KDevelop::SessionInfo& si, KDevelop::SessionController::availableSessionInfo()) - { - if ( session == si.name || session == si.uuid.toString() ) { - found = true; - break; - } - else if (projectAsSession.isEmpty()) { - foreach(const KUrl& k, si.projects) - { - QString fn(k.fileName()); - fn = fn.left(fn.indexOf('.')); - if ( session == fn ) - projectAsSession = si.uuid; - } - } - } - if ( !found ) { - if ( projectAsSession.isEmpty() ) { - QTextStream qerr(stderr); - qerr << endl << i18n("Cannot open unknown session %1. See --sessions switch for available sessions or use -cs to create a new one.", session) << endl; - return 1; - } - else - session = projectAsSession; - } - } - - QList sessions = KDevelop::SessionController::availableSessionInfo(); - const KDevelop::SessionInfo* sessionData = findSessionInList( sessions, session ); - - if(args->isSet("pid")) { - if( !sessionData ) { - kError() << "session not given or does not exist"; - return 5; - } - - KDevelop::SessionRunInfo sessionInfo = KDevelop::SessionController::sessionRunInfo( sessionData->uuid.toString() ); - if (!sessionInfo.isRunning) { - kError() << session << sessionData->name << "is not running"; - return 5; - } else { - // Print the PID and we're ready - std::cout << sessionInfo.holderPid << std::endl; - return 0; - } - } - - KDevIDEExtension::init(); - - KDevSplashScreen* splash = 0; - if ( !QProcessEnvironment::systemEnvironment().contains("KDEV_DISABLE_SPLASH") ) { - splash = new KDevSplashScreen; - splash->show(); - splash->repaint(); - app.processEvents(); - } - - if(!Core::initialize(splash, Core::Default, session)) - return 5; - - KGlobal::locale()->insertCatalog( Core::self()->componentData().catalogName() ); - Core* core = Core::self(); - - QStringList projectNames = args->getOptionList("project"); - if(!projectNames.isEmpty()) - { - foreach(const QString& p, projectNames) - { - QFileInfo info( p ); - if( info.suffix() == "kdev4" ) { - // make sure the project is not already opened by the session controller - bool shouldOpen = true; - KUrl url(info.absoluteFilePath()); - foreach(KDevelop::IProject* p, core->projectController()->projects()) { - if (p->projectFileUrl() == url) { - shouldOpen = false; - break; - } - } - if (shouldOpen) { - core->projectController()->openProject( url ); - } - } - } - } - - if ( args->isSet("debug") ) { - Q_ASSERT( !debugeeName.isEmpty() ); - QString launchName = debugeeName; - - KDevelop::LaunchConfiguration* launch = 0; - kDebug() << launchName; - foreach (KDevelop::LaunchConfiguration *l, core->runControllerInternal()->launchConfigurationsInternal()) { - kDebug() << l->name(); - if (l->name() == launchName) { - launch = l; - } - } - - KDevelop::LaunchConfigurationType *type = 0; - foreach (KDevelop::LaunchConfigurationType *t, core->runController()->launchConfigurationTypes()) { - kDebug() << t->id(); - if (t->id() == "Native Application") { - type = t; - break; - } - } - if (!type) { - QTextStream qerr(stderr); - qerr << endl << i18n("Cannot find native launch configuration type") << endl; - return 1; - } - - if (launch && launch->type()->id() != "Native Application") launch = 0; - if (launch && launch->launcherForMode("debug") != args->getOption("debug")) launch = 0; - if (!launch) { - kDebug() << launchName << "not found, creating a new one"; - QPair launcher; - launcher.first = "debug"; - foreach (KDevelop::ILauncher *l, type->launchers()) { - if (l->id() == args->getOption("debug")) { - if (l->supportedModes().contains("debug")) { - launcher.second = l->id(); - } - } - } - if (launcher.second.isEmpty()) { - QTextStream qerr(stderr); - qerr << endl << i18n("Cannot find launcher %1", args->getOption("debug")) << endl; - return 1; - } - KDevelop::ILaunchConfiguration* ilaunch = core->runController()->createLaunchConfiguration(type, launcher, 0, launchName); - launch = dynamic_cast(ilaunch); - } - - type->configureLaunchFromCmdLineArguments(launch->config(), debugArgs); - launch->config().writeEntry("Break on Start", true); - core->runControllerInternal()->setDefaultLaunch(launch); - - core->runControllerInternal()->execute("debug", launch); - } else { - foreach ( const File& file, initialFiles ) { - if(!core->documentController()->openDocument(file.first, KTextEditor::Cursor(file.second, 0))) { - kWarning() << i18n("Could not open %1", file.first); - } - } - } - -#ifdef WITH_WELCOMEPAGE - // make it possible to disable the welcome page, useful for valgrind runs e.g. - if (!QProcessEnvironment::systemEnvironment().contains("KDEV_DISABLE_WELCOMEPAGE")) { - trySetupWelcomePageView(); - } -#endif - return app.exec(); -} diff --git a/kdevelop/app/plasma/CMakeLists.txt b/kdevelop/app/plasma/CMakeLists.txt deleted file mode 100644 index 0a877ed1..00000000 --- a/kdevelop/app/plasma/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_subdirectory(dataengine) -add_subdirectory(applet) -add_subdirectory(runner) diff --git a/kdevelop/app/plasma/applet/CMakeLists.txt b/kdevelop/app/plasma/applet/CMakeLists.txt deleted file mode 100644 index a494eabc..00000000 --- a/kdevelop/app/plasma/applet/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -project(kdevelopsessions) - -install(DIRECTORY package/ - DESTINATION ${DATA_INSTALL_DIR}/plasma/plasmoids/kdevelopsessions) - -install(FILES package/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-applet-kdevelopsessions.desktop) diff --git a/kdevelop/app/plasma/applet/Messages.sh b/kdevelop/app/plasma/applet/Messages.sh deleted file mode 100644 index af34ebf5..00000000 --- a/kdevelop/app/plasma/applet/Messages.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -# only need to change the name of the applet -$XGETTEXT `find . -name \*.qml` -L Java -o $podir/plasma_applet_kdevelopsessions.pot diff --git a/kdevelop/app/plasma/applet/package/contents/ui/kdevelopsessions.qml b/kdevelop/app/plasma/applet/package/contents/ui/kdevelopsessions.qml deleted file mode 100644 index df1bd262..00000000 --- a/kdevelop/app/plasma/applet/package/contents/ui/kdevelopsessions.qml +++ /dev/null @@ -1,184 +0,0 @@ -/***************************************************************************** -* Copyright (C) 2012 by Eike Hein * -* Copyright (C) 2011, 2012 by Shaun Reich * -* * -* 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 2 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 . * -*****************************************************************************/ - -import QtQuick 1.1 -import org.kde.qtextracomponents 0.1 - -import org.kde.plasma.core 0.1 as PlasmaCore -import org.kde.plasma.components 0.1 as PlasmaComponents - -Item { - id: kdevelopSessions - - property int minimumWidth: 200 - property int minimumHeight: 150 - - function popupEventSlot(shown) { - if(shown) - view.forceActiveFocus(); - } - - PlasmaCore.DataSource { - id: sessionsSource - engine: "org.kde.kdevelopsessions" - onSourceAdded: connectSource(source) - onSourceRemoved: disconnectSource(source) - - Component.onCompleted: connectedSources = sources - } - - PlasmaCore.DataModel { - id: sessionsModel - dataSource: sessionsSource - } - - Component.onCompleted: { - plasmoid.popupIcon = "kdevelop"; - plasmoid.aspectRatioMode = IgnoreAspectRatio; - plasmoid.popupEvent.connect('popupEvent', popupEventSlot); - } - - PlasmaCore.Svg { - id: lineSvg - imagePath: "widgets/line" - } - - Row { - id: headerRow - anchors { left: parent.left; right: parent.right } - - QIconItem { - id: appIcon - icon: QIcon("kdevelop") - width: 32 - height: 32 - } - - PlasmaComponents.Label { - id: header - text: i18n("KDevelop Sessions") - horizontalAlignment: Text.AlignHCenter | Text.AlignVCenter - width: parent.width - appIcon.width * 2 - height: parent.height - } - } - - PlasmaCore.SvgItem { - id: separator - - anchors { left: headerRow.left; right: headerRow.right; top: headerRow.bottom } - svg: lineSvg - elementId: "horizontal-line" - height: lineSvg.elementSize("horizontal-line").height - } - - Text { - id: textMetric - visible: false - // translated but not used, we just need length/height - text: i18n("Arbitrary String Which Says Something") - } - - ListView { - id: view - - anchors { left: parent.left; right: scrollBar.left; bottom: parent.bottom; top: separator.bottom; topMargin: 5 } - - model: PlasmaCore.SortFilterModel { - id: filterModel - sourceModel: sessionsModel - sortRole: "sessionString" - } - clip: true - focus: true - - delegate: Item { - id: listdelegate - height: textMetric.paintedHeight * 2 - - anchors { - left: parent.left - right: parent.right - } - - function openSession() { - var service = sessionsSource.serviceForSource(model["DataEngineSource"]) - var operation = service.operationDescription("open") - var job = service.startOperationCall(operation) - } - - PlasmaComponents.Label { - id: sessionText - - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - right: parent.right - leftMargin: 10 - rightMargin: 10 - } - - verticalAlignment: Text.AlignVCenter - text: model.sessionString - elide: Text.ElideRight - } - - MouseArea { - height: parent.height + 15 - anchors { left: parent.left; right: parent.right;} - hoverEnabled: true - - onClicked: { - openSession(); - } - - onEntered: { - view.currentIndex = index - view.highlightItem.opacity = 1 - } - - onExited: { - view.highlightItem.opacity = 0 - } - } - Keys.onPressed: { - if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) - openSession(); - } - } - - highlight: PlasmaComponents.Highlight { - hover: true - } - - highlightMoveDuration: 250 - highlightMoveSpeed: 1 - } - - PlasmaComponents.ScrollBar { - id: scrollBar - - anchors { bottom: parent.bottom; top: separator.top; right: parent.right } - - orientation: Qt.Vertical - stepSize: view.count / 4 - scrollButtonInterval: view.count / 4 - - flickableItem: view - } -} diff --git a/kdevelop/app/plasma/applet/package/metadata.desktop b/kdevelop/app/plasma/applet/package/metadata.desktop deleted file mode 100644 index 1a052c7d..00000000 --- a/kdevelop/app/plasma/applet/package/metadata.desktop +++ /dev/null @@ -1,88 +0,0 @@ -[Desktop Entry] -Name=KDevelop Sessions -Name[bs]=KDevelop sesije -Name[ca]=Sessions del KDevelop -Name[ca@valencia]=Sessions del KDevelop -Name[cs]=relace KDevelop -Name[da]=KDevelop-sessioner -Name[de]=KDevelop-Sitzungen -Name[el]=Συνεδρίες KDevelop -Name[en_GB]=KDevelop Sessions -Name[es]=Sesiones de KDevelop -Name[et]=KDevelopi seansid -Name[fi]=KDevelop-istunnot -Name[fr]=Sessions KDevelop -Name[ga]=Seisiúin KDevelop -Name[gl]=Sesións de KDevelop -Name[hu]=KDevelop munkamenetek -Name[it]=Sessioni KDevelop -Name[kk]=KDevelop сеанстары -Name[lt]=KDevelop seansas -Name[nb]=KDevelop-økter -Name[nds]=KDevelop-Törns -Name[nl]=KDevelop sessies -Name[pl]=Sesje KDevelop -Name[pt]=Sessões do KDevelop -Name[pt_BR]=Sessões do KDevelop -Name[ru]=Сеансы KDevelop -Name[sk]=Sedenia KDevelop -Name[sl]=Seje za KDevelop -Name[sv]=KDevelop-sessioner -Name[tr]=KDevelop Oturumları -Name[uk]=Сеанси KDevelop -Name[x-test]=xxKDevelop Sessionsxx -Name[zh_CN]=KDevelop 会话 -Name[zh_TW]=KDevelop 工作階段 -Comment=List and launch KDevelop sessions -Comment[bs]=Listanje i pokretanje KDevelop sesija -Comment[ca]=Llista i inicia sessions del KDevelop -Comment[ca@valencia]=Llista i inicia sessions del KDevelop -Comment[cs]=Vypsat a spustit sezení KDevelop -Comment[da]=Oplist og kør KDevelop-sessioner -Comment[de]=KDevelop-Sitzungen anzeigen und starten -Comment[el]=Καταγραφή και έναρξη συνεδριών KDevelop -Comment[en_GB]=List and launch KDevelop sessions -Comment[es]=Listar y lanzar sesiones de KDevelop -Comment[et]=KDevelopi seansside nimekiri ja käivitamine -Comment[fi]=Luettelee ja käynnistää KDevelop-istuntoja -Comment[fr]=Liste et lance des sessions KDevelop -Comment[ga]=Taispeáin agus tosaigh seisiúin KDevelop -Comment[gl]=Lista e inicia sesións do KDevelop -Comment[hu]=KDevelop munkamenetek listázása és indítása -Comment[it]=Elenca e lancia le sessioni di KDevelop -Comment[kk]=KDevelop сеанстарын тізімдеп жегу -Comment[nb]=List opp og start KDevelop-økter -Comment[nl]=Maak een lijst van en start KDevelop sessies -Comment[pl]=Utwórz listę i uruchom sesje KDevelop -Comment[pt]=Listar e lançar sessões do KDevelop -Comment[pt_BR]=Listar e lançar sessões do KDevelop -Comment[ru]=Просмотр списка и запуск сеансов KDevelop -Comment[sk]=Vypísať a spustiť sedenia KDevelop -Comment[sl]=Seznam in zagon sej za KDevelop -Comment[sv]=Lista och starta KDevelop-sessioner -Comment[tr]=KDevelop oturumlarını listele ve başlat -Comment[uk]=Показ списку і запуск сеансів KDevelop -Comment[x-test]=xxList and launch KDevelop sessionsxx -Comment[zh_CN]=列出并启动 KDevelop 会话 -Comment[zh_TW]=列出並啟動 KDevelop 工作階段 - -Icon=kdevelop -Type=Service -X-KDE-ServiceTypes=Plasma/Applet,Plasma/PopupApplet - -X-Plasma-API=declarativeappletscript -X-Plasma-MainScript=ui/kdevelopsessions.qml -X-Plasma-DefaultSize=290,340 - -X-KDE-PluginInfo-Author=Eike Hein -X-KDE-PluginInfo-Email=hein@kde.org -X-KDE-PluginInfo-Name=kdevelopsessions -X-KDE-PluginInfo-Version=0.1 -X-KDE-PluginInfo-Category=Utilities -X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true - -#X-Plasma-Requires-FileDialog=Unused -#X-Plasma-Requires-LaunchApp=Required -#X-Plasma-NotificationArea=true diff --git a/kdevelop/app/plasma/dataengine/CMakeLists.txt b/kdevelop/app/plasma/dataengine/CMakeLists.txt deleted file mode 100644 index bfd668cb..00000000 --- a/kdevelop/app/plasma/dataengine/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(kdevelopsessionsengine_SRCS - kdevelopsessionsengine.cpp - kdevelopsessionsservice.cpp -) - -kde4_add_plugin(plasma_engine_kdevelopsessions ${kdevelopsessionsengine_SRCS}) -target_link_libraries(plasma_engine_kdevelopsessions ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS}) - -install(TARGETS plasma_engine_kdevelopsessions DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES plasma-dataengine-kdevelopsessions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install(FILES org.kde.plasma.dataengine.kdevelopsessions.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) - diff --git a/kdevelop/app/plasma/dataengine/Messages.sh b/kdevelop/app/plasma/dataengine/Messages.sh deleted file mode 100755 index 73ac7b02..00000000 --- a/kdevelop/app/plasma/dataengine/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env bash -$XGETTEXT *.cpp -o $podir/plasma_engine_kdevelopsessions.pot diff --git a/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.cpp b/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.cpp deleted file mode 100644 index 7fd1c07a..00000000 --- a/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/***************************************************************************** -* Copyright (C) 2012 by Eike Hein * -* Copyright (C) 2011 by Shaun Reich * -* Copyright (C) 2008 by Montel Laurent * -* * -* 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 2 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 . * -*****************************************************************************/ - -#include "kdevelopsessionsengine.h" -#include "kdevelopsessionsservice.h" - -#include -#include -#include -#include - -KDevelopSessionsEngine::KDevelopSessionsEngine(QObject *parent, const QVariantList &args) - : Plasma::DataEngine(parent, args), - m_dirWatch(0) -{ - -} - -KDevelopSessionsEngine::~KDevelopSessionsEngine() -{ -} - -void KDevelopSessionsEngine::init() -{ - m_dirWatch = new KDirWatch( this ); - - const QStringList sessionDirs = KGlobal::dirs()->findDirs( "data", "kdevelop/sessions/" ); - - for ( int i = 0; i < sessionDirs.count(); ++i ) - m_dirWatch->addDir( sessionDirs[i], KDirWatch::WatchSubDirs ); - - connect(m_dirWatch, SIGNAL(dirty(QString)), this, SLOT(updateSessions())); - - updateSessions(); -} - -Plasma::Service *KDevelopSessionsEngine::serviceForSource(const QString &source) -{ - return new KDevelopSessionsService( this, source ); -} - -void KDevelopSessionsEngine::updateSessions() -{ - const QStringList sessionrcs = KGlobal::dirs()->findAllResources( "data", "kdevelop/sessions/*/sessionrc", KStandardDirs::NoDuplicates ); - - QHash sessions; - - QStringList::const_iterator it; - - for (it = sessionrcs.constBegin(); it != sessionrcs.constEnd(); ++it) - { - KConfig cfg( *it, KConfig::SimpleConfig ); - - // Only consider sessions that have open projects. - if ( cfg.hasGroup( "General Options" ) && !cfg.group( "General Options" ).readEntry( "Open Projects", "" ).isEmpty() ) - { - Session session; - session.hash = QFileInfo( *it ).dir().dirName(); - session.name = cfg.group( "" ).readEntry( "SessionName", "" ); - session.description = cfg.group( "" ).readEntry( "SessionPrettyContents", "" ); - - sessions.insert(session.hash, session); - } - } - - QHash::const_iterator it2; - - for (it2 = sessions.constBegin(); it2 != sessions.constEnd(); ++it2) - { - const Session& session = it2.value(); - - if ( !m_currentSessions.contains( session.hash ) ) - { - // Publish new session. - - m_currentSessions.insert( session.hash, session ); - setData( session.hash, "sessionName", session.name ); - setData( session.hash, "sessionString", session.description ); - } - else - { - // Publish data changes for older sessions. - - Session oldSession( m_currentSessions.value(session.hash) ); - - bool modified = false; - - if ( session.name != oldSession.name ) - { - oldSession.name = session.name; - modified = true; - setData( session.hash, "sessionName", session.name ); - } - - if ( session.description != oldSession.description ) - { - oldSession.description = session.description; - modified = true; - setData( session.hash, "sessionString", session.description ); - } - - if ( modified ) - m_currentSessions.insert( oldSession.hash, oldSession ); - } - } - - QHash::iterator it3 = m_currentSessions.begin(); - - while ( it3 != m_currentSessions.end() ) - { - const Session& session = it3.value(); - - if ( !sessions.contains( session.hash ) ) - { - removeSource( session.hash ); - it3 = m_currentSessions.erase( it3 ); - } - else - ++it3; - } -} - -K_EXPORT_PLASMA_DATAENGINE(kdevelopsessionsengine, KDevelopSessionsEngine) - -#include "moc_kdevelopsessionsengine.cpp" diff --git a/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.h b/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.h deleted file mode 100644 index f5809794..00000000 --- a/kdevelop/app/plasma/dataengine/kdevelopsessionsengine.h +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************** -* Copyright (C) 2012 by Eike Hein * -* Copyright (C) 2011 by Shaun Reich * -* Copyright (C) 2008 by Montel Laurent * -* * -* 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 2 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 . * -*****************************************************************************/ - -#ifndef KDEVELOPSESSIONSENGINE_H -#define KDEVELOPSESSIONSENGINE_H - -#include - -struct Session -{ - QString hash; - QString name; - QString description; -}; - -class KDirWatch; - -class KDevelopSessionsEngine : public Plasma::DataEngine -{ - Q_OBJECT - -public: - KDevelopSessionsEngine(QObject *parent, const QVariantList &args); - ~KDevelopSessionsEngine(); - - void init(); - Plasma::Service *serviceForSource(const QString &source); - - private Q_SLOTS: - void updateSessions(); - -private: - QHash m_currentSessions; - - KDirWatch *m_dirWatch; -}; - -#endif diff --git a/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.cpp b/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.cpp deleted file mode 100644 index 44741e52..00000000 --- a/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/***************************************************************************** -* Copyright (C) 2012 by Eike Hein * -* Copyright (C) 2011 by Shaun Reich * -* Copyright (C) 2008 by Montel Laurent * -* * -* 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 2 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 . * -*****************************************************************************/ - -#include "kdevelopsessionsservice.h" - -#include - -KDevelopSessionsService::KDevelopSessionsService(QObject* parent, const QString& sessionName) - : Plasma::Service(parent) -{ - setName("org.kde.plasma.dataengine.kdevelopsessions"); - setDestination(sessionName); -} - -Plasma::ServiceJob* KDevelopSessionsService::createJob(const QString& operation, QMap& parameters) -{ - return new SessionJob(this, operation, parameters); -} - -SessionJob::SessionJob(KDevelopSessionsService *service, const QString &operation, const QMap ¶meters) - : Plasma::ServiceJob(service->destination(), operation, parameters, service) -{ -} - -void SessionJob::start() -{ - if (operationName() == "open") - { - QStringList args; - args << "--open-session" << destination(); - KToolInvocation::kdeinitExec("kdevelop", args); - - setResult(true); - } -} - -#include "moc_kdevelopsessionsservice.cpp" diff --git a/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.h b/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.h deleted file mode 100644 index dcdd0b60..00000000 --- a/kdevelop/app/plasma/dataengine/kdevelopsessionsservice.h +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************************** -* Copyright (C) 2012 by Eike Hein * -* Copyright (C) 2011 by Shaun Reich * -* Copyright (C) 2008 by Montel Laurent * -* * -* 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 2 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 . * -*****************************************************************************/ - -#ifndef KDEVELOPSESSIONSSERVICE_H -#define KDEVELOPSESSIONSSERVICE_H - -#include -#include - -class KDevelopSessionsService : public Plasma::Service -{ - Q_OBJECT - -public: - KDevelopSessionsService(QObject* parent, const QString& sessionName); - -protected: - Plasma::ServiceJob* createJob(const QString& operation, QMap& parameters); -}; - -class SessionJob : public Plasma::ServiceJob -{ - Q_OBJECT - -public: - SessionJob(KDevelopSessionsService *service, const QString& operation, const QMap ¶meters); - void start(); -}; - -#endif diff --git a/kdevelop/app/plasma/dataengine/org.kde.plasma.dataengine.kdevelopsessions.operations b/kdevelop/app/plasma/dataengine/org.kde.plasma.dataengine.kdevelopsessions.operations deleted file mode 100644 index f28c41e6..00000000 --- a/kdevelop/app/plasma/dataengine/org.kde.plasma.dataengine.kdevelopsessions.operations +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/kdevelop/app/plasma/dataengine/plasma-dataengine-kdevelopsessions.desktop b/kdevelop/app/plasma/dataengine/plasma-dataengine-kdevelopsessions.desktop deleted file mode 100644 index 5f111abe..00000000 --- a/kdevelop/app/plasma/dataengine/plasma-dataengine-kdevelopsessions.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Name=KDevelop Sessions -Name[bs]=KDevelop sesije -Name[ca]=Sessions del KDevelop -Name[ca@valencia]=Sessions del KDevelop -Name[cs]=relace KDevelop -Name[da]=KDevelop-sessioner -Name[de]=KDevelop-Sitzungen -Name[el]=Συνεδρίες KDevelop -Name[en_GB]=KDevelop Sessions -Name[es]=Sesiones de KDevelop -Name[et]=KDevelopi seansid -Name[fi]=KDevelop-istunnot -Name[fr]=Sessions KDevelop -Name[ga]=Seisiúin KDevelop -Name[gl]=Sesións de KDevelop -Name[hu]=KDevelop munkamenetek -Name[it]=Sessioni KDevelop -Name[kk]=KDevelop сеанстары -Name[lt]=KDevelop seansas -Name[nb]=KDevelop-økter -Name[nds]=KDevelop-Törns -Name[nl]=KDevelop sessies -Name[pl]=Sesje KDevelop -Name[pt]=Sessões do KDevelop -Name[pt_BR]=Sessões do KDevelop -Name[ru]=Сеансы KDevelop -Name[sk]=Sedenia KDevelop -Name[sl]=Seje za KDevelop -Name[sv]=KDevelop-sessioner -Name[tr]=KDevelop Oturumları -Name[uk]=Сеанси KDevelop -Name[x-test]=xxKDevelop Sessionsxx -Name[zh_CN]=KDevelop 会话 -Name[zh_TW]=KDevelop 工作階段 -Comment=List and launch KDevelop sessions -Comment[bs]=Listanje i pokretanje KDevelop sesija -Comment[ca]=Llista i inicia sessions del KDevelop -Comment[ca@valencia]=Llista i inicia sessions del KDevelop -Comment[cs]=Vypsat a spustit sezení KDevelop -Comment[da]=Oplist og kør KDevelop-sessioner -Comment[de]=KDevelop-Sitzungen anzeigen und starten -Comment[el]=Καταγραφή και έναρξη συνεδριών KDevelop -Comment[en_GB]=List and launch KDevelop sessions -Comment[es]=Listar y lanzar sesiones de KDevelop -Comment[et]=KDevelopi seansside nimekiri ja käivitamine -Comment[fi]=Luettelee ja käynnistää KDevelop-istuntoja -Comment[fr]=Liste et lance des sessions KDevelop -Comment[ga]=Taispeáin agus tosaigh seisiúin KDevelop -Comment[gl]=Lista e inicia sesións do KDevelop -Comment[hu]=KDevelop munkamenetek listázása és indítása -Comment[it]=Elenca e lancia le sessioni di KDevelop -Comment[kk]=KDevelop сеанстарын тізімдеп жегу -Comment[nb]=List opp og start KDevelop-økter -Comment[nl]=Maak een lijst van en start KDevelop sessies -Comment[pl]=Utwórz listę i uruchom sesje KDevelop -Comment[pt]=Listar e lançar sessões do KDevelop -Comment[pt_BR]=Listar e lançar sessões do KDevelop -Comment[ru]=Просмотр списка и запуск сеансов KDevelop -Comment[sk]=Vypísať a spustiť sedenia KDevelop -Comment[sl]=Seznam in zagon sej za KDevelop -Comment[sv]=Lista och starta KDevelop-sessioner -Comment[tr]=KDevelop oturumlarını listele ve başlat -Comment[uk]=Показ списку і запуск сеансів KDevelop -Comment[x-test]=xxList and launch KDevelop sessionsxx -Comment[zh_CN]=列出并启动 KDevelop 会话 -Comment[zh_TW]=列出並啟動 KDevelop 工作階段 - -Type=Service -Icon=kdevelop - -X-KDE-ServiceTypes=Plasma/DataEngine -X-KDE-Library=plasma_engine_kdevelopsessions - -X-KDE-PluginInfo-Author=Eike Hein -X-KDE-PluginInfo-Email=hein@kde.org -X-KDE-PluginInfo-Name=org.kde.kdevelopsessions -X-KDE-PluginInfo-Version=0.1 -X-KDE-PluginInfo-Category=Utiltities -X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true diff --git a/kdevelop/app/plasma/runner/CMakeLists.txt b/kdevelop/app/plasma/runner/CMakeLists.txt deleted file mode 100644 index 25169514..00000000 --- a/kdevelop/app/plasma/runner/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(krunner_kdevelopsessions_SRCS - kdevelopsessions.cpp -) - -kde4_add_plugin(krunner_kdevelopsessions ${krunner_kdevelopsessions_SRCS}) -target_link_libraries(krunner_kdevelopsessions ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS}) - -install(TARGETS krunner_kdevelopsessions DESTINATION ${PLUGIN_INSTALL_DIR} ) - -install(FILES kdevelopsessions.desktop DESTINATION ${SERVICES_INSTALL_DIR}) - diff --git a/kdevelop/app/plasma/runner/Messages.sh b/kdevelop/app/plasma/runner/Messages.sh deleted file mode 100755 index dd088ce1..00000000 --- a/kdevelop/app/plasma/runner/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env bash -$XGETTEXT *.cpp -o $podir/plasma_runner_kdevelopsessions.pot diff --git a/kdevelop/app/plasma/runner/README b/kdevelop/app/plasma/runner/README deleted file mode 100644 index a6d73c09..00000000 --- a/kdevelop/app/plasma/runner/README +++ /dev/null @@ -1,25 +0,0 @@ -KDevelop Session Runner -======================== -This Runner loads a list of KDevelop's sessions and matches -KRunner's queries against it. - -The matching goes as follows: - -* You type "kdevelop" into the krunner interface, this KDevelop -  Session Runner adds all kdevelop sessions, with a low priority. -  (0.5) - -* You type "kdevelop gnirrep" and the runner will find a session -  called "gnirrep", priority 1.0 - -* Typing just a part, such as "kdevelop gnirr" also results in a -  match, but lower priority (0.8) - -* Typing just the (parts of) the name of the session will -  also match (the "kdevelop" in the query is optional). - -All matching is case-insensitive. - -Happy hacking! --- -sebas@kde.org diff --git a/kdevelop/app/plasma/runner/kdevelopsessions.cpp b/kdevelop/app/plasma/runner/kdevelopsessions.cpp deleted file mode 100644 index f66dfb33..00000000 --- a/kdevelop/app/plasma/runner/kdevelopsessions.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2008,2011 Sebastian Kügler - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "kdevelopsessions.h" - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -bool kdevelopsessions_runner_compare_sessions(const Session &s1, const Session &s2) { - return KStringHandler::naturalCompare(s1.name, s2.name) == -1; -} - -KDevelopSessions::KDevelopSessions(QObject *parent, const QVariantList& args) - : Plasma::AbstractRunner(parent, args) -{ - kWarning() << "INIT KDEV"; - setObjectName(QLatin1String("KDevelop Sessions")); - setIgnoredTypes(Plasma::RunnerContext::File | Plasma::RunnerContext::Directory | Plasma::RunnerContext::NetworkLocation); - m_icon = KIcon(QLatin1String("kdevelop")); - - loadSessions(); - - // listen for changes to the list of kdevelop sessions - KDirWatch *historyWatch = new KDirWatch(this); - const QStringList sessiondirs = KGlobal::dirs()->findDirs("data", QLatin1String("kdevelop/sessions/")); - foreach (const QString &dir, sessiondirs) { - historyWatch->addDir(dir); - } - connect(historyWatch,SIGNAL(dirty(QString)),this,SLOT(loadSessions())); - connect(historyWatch,SIGNAL(created(QString)),this,SLOT(loadSessions())); - connect(historyWatch,SIGNAL(deleted(QString)),this,SLOT(loadSessions())); - - Plasma::RunnerSyntax s(QLatin1String(":q:"), i18n("Finds KDevelop sessions matching :q:.")); - s.addExampleQuery(QLatin1String("kdevelop :q:")); - addSyntax(s); - - setDefaultSyntax(Plasma::RunnerSyntax(QLatin1String("kdevelop"), i18n("Lists all the KDevelop editor sessions in your account."))); -} - -KDevelopSessions::~KDevelopSessions() -{ -} - -void KDevelopSessions::loadSessions() -{ - m_sessions.clear(); - // Switch kdevelop session: -u - // Should we add a match for this option or would that clutter the matches too much? - const QStringList list = KGlobal::dirs()->findAllResources( "data", QLatin1String("kdevelop/sessions/*/sessionrc"), KStandardDirs::Recursive ); - foreach (const QString &sessionfile, list) - { - kWarning() << "NEW SESSION:" << sessionfile; - Session session; - session.id = sessionfile.section('/', -2, -2); - KConfig cfg(sessionfile, KConfig::SimpleConfig); - KConfigGroup group = cfg.group(QString()); - session.name = group.readEntry("SessionPrettyContents");; - m_sessions << session; - } - qSort(m_sessions.begin(), m_sessions.end(), kdevelopsessions_runner_compare_sessions); -} - -void KDevelopSessions::match(Plasma::RunnerContext &context) -{ - if (m_sessions.isEmpty()) { - return; - } - - QString term = context.query(); - if (term.length() < 3) { - return; - } - - bool listAll = false; - - if (term.startsWith(QLatin1String("kdevelop"), Qt::CaseInsensitive)) { - if (term.trimmed().compare(QLatin1String("kdevelop"), Qt::CaseInsensitive) == 0) { - listAll = true; - term.clear(); - } else if (term.at(8) == QLatin1Char(' ') ) { - term.remove(QLatin1String("kdevelop"), Qt::CaseInsensitive); - term = term.trimmed(); - } else { - term.clear(); - } - } - - if (term.isEmpty() && !listAll) { - return; - } - - foreach (const Session &session, m_sessions) { - if (!context.isValid()) { - return; - } - - if (listAll || (!term.isEmpty() && session.name.contains(term, Qt::CaseInsensitive))) { - Plasma::QueryMatch match(this); - if (listAll) { - // All sessions listed, but with a low priority - match.setType(Plasma::QueryMatch::ExactMatch); - match.setRelevance(0.8); - } else { - if (session.name.compare(term, Qt::CaseInsensitive) == 0) { - // parameter to kdevelop matches session exactly, bump it up! - match.setType(Plasma::QueryMatch::ExactMatch); - match.setRelevance(1.0); - } else { - // fuzzy match of the session in "kdevelop $session" - match.setType(Plasma::QueryMatch::PossibleMatch); - match.setRelevance(0.8); - } - } - match.setIcon(m_icon); - match.setData(session.id); - match.setText(session.name); - match.setSubtext(i18n("Open KDevelop Session")); - context.addMatch(term, match); - } - } -} - -void KDevelopSessions::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) -{ - Q_UNUSED(context) - QString sessionId = match.data().toString(); - if (sessionId.isEmpty()) { - kWarning() << "No KDevelop session id in match!"; - return; - } - kDebug() << "Open KDevelop session" << sessionId; - QStringList args; - args << QLatin1String("--open-session") << sessionId; - KToolInvocation::kdeinitExec(QLatin1String("kdevelop"), args); -} - -#include "moc_kdevelopsessions.cpp" diff --git a/kdevelop/app/plasma/runner/kdevelopsessions.desktop b/kdevelop/app/plasma/runner/kdevelopsessions.desktop deleted file mode 100644 index 64a3db66..00000000 --- a/kdevelop/app/plasma/runner/kdevelopsessions.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Name=KDevelop Sessions -Name[bs]=KDevelop sesije -Name[ca]=Sessions del KDevelop -Name[ca@valencia]=Sessions del KDevelop -Name[cs]=relace KDevelop -Name[da]=KDevelop-sessioner -Name[de]=KDevelop-Sitzungen -Name[el]=Συνεδρίες KDevelop -Name[en_GB]=KDevelop Sessions -Name[es]=Sesiones de KDevelop -Name[et]=KDevelopi seansid -Name[fi]=KDevelop-istunnot -Name[fr]=Sessions KDevelop -Name[ga]=Seisiúin KDevelop -Name[gl]=Sesións de KDevelop -Name[hu]=KDevelop munkamenetek -Name[it]=Sessioni KDevelop -Name[kk]=KDevelop сеанстары -Name[lt]=KDevelop seansas -Name[nb]=KDevelop-økter -Name[nds]=KDevelop-Törns -Name[nl]=KDevelop sessies -Name[pl]=Sesje KDevelop -Name[pt]=Sessões do KDevelop -Name[pt_BR]=Sessões do KDevelop -Name[ru]=Сеансы KDevelop -Name[sk]=Sedenia KDevelop -Name[sl]=Seje za KDevelop -Name[sv]=KDevelop-sessioner -Name[tr]=KDevelop Oturumları -Name[uk]=Сеанси KDevelop -Name[x-test]=xxKDevelop Sessionsxx -Name[zh_CN]=KDevelop 会话 -Name[zh_TW]=KDevelop 工作階段 -Comment=Matches KDevelop Sessions -Comment[bs]=Usaglašuje KDevelop Sesije -Comment[ca]=Concorda amb sessions del KDevelop -Comment[ca@valencia]=Concorda amb sessions del KDevelop -Comment[da]=Matcher KDevelop-sessioner -Comment[de]=Findet KDevelop-Sitzungen -Comment[el]=Ταιριάζει με συνεδρίες KDevelop -Comment[en_GB]=Matches KDevelop Sessions -Comment[es]=Sesiones coincidentes de KDevelop -Comment[et]=KDevelopi seansside leidmine -Comment[fi]=Täsmää KDevelop-istuntoihin -Comment[fr]=Correspond aux sessions KDevelop -Comment[ga]=Comhoiriúnach le Seisiúin KDevelop -Comment[gl]=Atopa as sesións de KDevelop -Comment[hu]=Illeszkedő KDevelop munkamenetek -Comment[it]=Sessioni KDevelop corrispondenti -Comment[kk]=Сәйкесті KDevelop сеанстарын іздеу -Comment[nb]=Treffer KDevelop-økter -Comment[nds]=Kiekt na passen KDevelop-Törns -Comment[nl]=Komt overeen met KDevelop sessies -Comment[pl]=Dopasowuje sesje KDevelop -Comment[pt]=Corresponde às Sessões do KDevelop -Comment[pt_BR]=Corresponder às sessões do KDevelop -Comment[ru]=Выбирает сеансы KDevelop -Comment[sk]=Porovnáva sedenia KDevelop -Comment[sl]=Se ujema s sejami za KDevelop -Comment[sv]=Matchar KDevelop-sessioner -Comment[tr]=KDevelop Oturumlarını Eşleştirir -Comment[uk]=Пошук відповідних сеансів KDevelop -Comment[x-test]=xxMatches KDevelop Sessionsxx -Comment[zh_CN]=匹配 KDevelop 会话 -Comment[zh_TW]=比對 KDevelop 工作階段 -Icon=kdevelop - -X-KDE-ServiceTypes=Plasma/Runner -Type=Service -TryExec=kdevelop -X-KDE-Library=krunner_kdevelopsessions -X-KDE-PluginInfo-Author=Sebastian Kügler -X-KDE-PluginInfo-Email=sebas@kde.org -X-KDE-PluginInfo-Name=kdevelopsessions -X-KDE-PluginInfo-Version=1.0 -X-KDE-PluginInfo-License=LGPL -X-KDE-PluginInfo-EnabledByDefault=true -X-Plasma-AdvertiseSingleRunnerQueryMode=true diff --git a/kdevelop/app/plasma/runner/kdevelopsessions.h b/kdevelop/app/plasma/runner/kdevelopsessions.h deleted file mode 100644 index 662ae617..00000000 --- a/kdevelop/app/plasma/runner/kdevelopsessions.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2008, 2011 Sebastian Kügler - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef KATESESSIONS_H -#define KATESESSIONS_H - -#include - -#include - -struct Session -{ - QString id; - QString name; -}; - -Q_DECLARE_TYPEINFO(Session, Q_MOVABLE_TYPE); - -class KDevelopSessions : public Plasma::AbstractRunner { - Q_OBJECT - - public: - KDevelopSessions( QObject *parent, const QVariantList& args ); - ~KDevelopSessions(); - - void match(Plasma::RunnerContext &context); - void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); - - private Q_SLOTS: - void loadSessions(); - - private: - KIcon m_icon; - QVector m_sessions; -}; - -K_EXPORT_PLASMA_RUNNER(kdevelopsessions, KDevelopSessions) - -#endif diff --git a/kdevelop/app/shell.dox b/kdevelop/app/shell.dox deleted file mode 100644 index cf37a7f6..00000000 --- a/kdevelop/app/shell.dox +++ /dev/null @@ -1,118 +0,0 @@ -/** -@page The KDevelop Generic Shell - -This library contains the Shell - a profile-based implementation of KDevelop plugin architecture. - -Link with: -lkdevshell - -Include path: -I\$(kde_includes)/kdevelop/shell - -\section creatingapp Creating an application using generic shell -KDevelop platform applications can use generic shell as a ready to use implementation -of KDevelop plugin architecture. - -This is done by creating application %main.cpp file and @ref ShellExtension subclass. -Example: -- %main.cpp for "myapp" application: - @code - #include - - #include - #include - #include - #include - #include - - #include - #include - #include - #include - #include - #include - #include - - #include "myappextension.h" - - static KCmdLineOptions options[] = - { - { "profile ", I18N_NOOP("Profile to load"), 0 }, - { 0,0,0 } - }; - - int main(int argc, char *argv[]) - { - static const char description[] = I18N_NOOP("My Application"); - KAboutData aboutData("myapp", I18N_NOOP("My Application"), - VERSION, description, KAboutData::License_GPL, - I18N_NOOP("(c) 1999-2004, MyApp developers"), - "", "http://www.myapp.org"); - aboutData.addAuthor("Me", I18N_NOOP("Creator"), "me@myapp.org"); - - KCmdLineArgs::init(argc, argv, &aboutData); - KCmdLineArgs::addCmdLineOptions( options ); - - KApplication app; - - MyAppExtension::init(); - - QPixmap pm; - pm.load(locate("data", "myapp/pics/myapp-splash.png")); - SplashScreen * splash = new SplashScreen( pm ); - splash->show(); - - app.processEvents(); - - QObject::connect(PluginController::getInstance(), SIGNAL(loadingPlugin(const QString &)), - splash, SLOT(showMessage(const QString &))); - - splash->message( i18n( "Loading Settings" ) ); - TopLevel::getInstance()->loadSettings(); - - PluginController::getInstance()->loadInitialPlugins(); - - splash->message( i18n( "Starting GUI" ) ); - NewMainWindow *mw = dynamic_cast(TopLevel::getInstance()->main()); - if (mw) - mw->enableShow(); - TopLevel::getInstance()->main()->show(); - - Core::getInstance()->doEmitCoreInitialized(); - - delete splash; - - kapp->dcopClient()->registerAs("myapp"); - - return app.exec(); - } - @endcode - -- Shell extension for "myapp" application: - @code - class MyAppExtension: public ShellExtension { - public: - static void init() - { - s_instance = new MyAppExtension(); - } - - virtual void createGlobalSettingsPage(KDialogBase *dlg) {}; - virtual void acceptGlobalSettingsPage(KDialogBase *dlg) {}; - - virtual QString xmlFile() - { - return "myappui.rc"; - } - - virtual QString defaultProfile() - { - return "MyApp"; - } - - protected: - KDevAssistantExtension(); - - }; - @endcode - -*/ - diff --git a/kdevelop/app/splash.cpp b/kdevelop/app/splash.cpp deleted file mode 100644 index 4084de81..00000000 --- a/kdevelop/app/splash.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/*************************************************************************** - * Copyright 2013 Sven Brauch * - * Copyright 2013 Milian Wolff * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include "splash.h" - -#include -#include - -#include -#include -#include -#include -#include - -#include "config.h" - -KDevSplashScreen::KDevSplashScreen() - : KSplashScreen(QPixmap(), Qt::Popup | Qt::FramelessWindowHint) - , m_view(new QDeclarativeView) -{ - setFixedSize(QSize(475, 301)); - m_view->resize(size()); - m_view->engine()->rootContext()->setContextProperty("appIcon", KIconLoader().iconPath("kdevelop", -48)); - m_view->engine()->rootContext()->setContextProperty("appVersionMajor", VERSION_MAJOR); - m_view->engine()->rootContext()->setContextProperty("appVersionMinor", VERSION_MINOR); - m_view->engine()->rootContext()->setContextProperty("appVersionPatch", VERSION_PATCH); - - QString splashScript = KStandardDirs::locate("data", "kdevelop/splash.qml"); - m_view->setSource(QUrl::fromLocalFile(splashScript)); - if ( ! m_view->rootObject() ) { - kWarning() << "Could not find KDevelop splash screen: kdevelop/splash.qml"; - } -} - -KDevSplashScreen::~KDevSplashScreen() -{ -} - -void KDevSplashScreen::drawContents(QPainter* painter) -{ - m_view->render(painter); -} - -void KDevSplashScreen::progress(int progress) -{ - if ( ! m_view->rootObject() ) { - return; - } - - // notify the QML script of the progress change - m_view->rootObject()->setProperty("progress", progress); - repaint(); -} diff --git a/kdevelop/app/splash.h b/kdevelop/app/splash.h deleted file mode 100644 index c10e52df..00000000 --- a/kdevelop/app/splash.h +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright 2013 Sven Brauch * - * Copyright 2013 Milian Wolff * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef KDEVSPLASH_H -#define KDEVSPLASH_H - -#include - -class QDeclarativeView; - -/** - * This class is draws the KDevelop splashscreen. - * - * The actualy splash design can be adapted via splash.qml - */ -class KDevSplashScreen : public KSplashScreen -{ - Q_OBJECT -public: - explicit KDevSplashScreen(); - virtual ~KDevSplashScreen(); - virtual void drawContents(QPainter* painter); - -public slots: - void progress(int progress); - -private: - QScopedPointer m_view; -}; - -#endif diff --git a/kdevelop/app/splash.qml b/kdevelop/app/splash.qml deleted file mode 100644 index 38ff9542..00000000 --- a/kdevelop/app/splash.qml +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************** - * Copyright 2013 Sven Brauch * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -import QtQuick 1.1 - -// The background image for the splash is still a bitmap, provided by QSplashScreen. -// This widget has a transprent background and appears above that pixmap. -// Thus, if for some reason this doesn't work, the user still has a splash screen -// with a kdev logo and name. - -Rectangle { - id: root - // this property is updated from C++ - property int progress: 0 - // color for the non-colored rectangles - property string defaultColor: "#3E3E3E" - // amount of rectangles in each column - property variant counts: [22, 20, 21, 19, 17, 19, 20, 17, 18, 15, 16, 15, 14, 16, 13, 11, 12, 10, 12, - 11, 8, 10, 6, 8, 9, 5, 7, 6, 4, 5, 6, 3, 5, 4, 2, 3, 2, 1, 2, 1] - // "active" colors for the rectangles - // only half as many colors, use each color twice. - // TODO could try if it looks nicer with one color each - property variant activeColors: ["#960A0A", "#B40F0F", "#FF4000", "#FF8400", "#FFDD00", "#CDEC00", "#99FF00", "#4CB700", "#1DB300", "#076813", - "#08BA5B", "#00DA99", "#00B5E7", "#085BBB", "#2A5CFF", "#7044FF", "#9625FF", "#F013FF", "#FF2CC0", "#FF1A1D"] - // this size is a fallback, it's scaled in the c++ code actually, - // but this is the real splash size, so it's useful for testing in qmlviewer - width: 475 - height: 301 - anchors.fill: parent - gradient: Gradient { - GradientStop { position: 0.0; color: "#0A0A0A" } - GradientStop { position: 0.5; color: "#1F1F1F" } - GradientStop { position: 1.0; color: "#0A0A0A" } - } - - // scanlines always look fancy - ListView { - anchors.fill: parent - model: Math.floor(parent.height / 2) - spacing: 2 - delegate: Rectangle { - width: root.width - height: 1 - color: "#555555" - opacity: 0.10 - } - } - // draw the rectangles - ListView { - x: -40 - y: -52 - height: root.height - width: root.width - // this is needed to make the columns fill the widget from the bottom upwards - rotation: 180 - spacing: 4 - // draw one column per entry in the root.counts list - model: root.counts - orientation: ListView.Horizontal - // this delegate draws one column of rectangles - delegate: Column { - opacity: 0.75 - property string color - property int count - color: (1-root.progress/100.0) * root.counts.length <= index ? activeColors[Math.floor(index/2)] : root.defaultColor - count: root.counts[index] - x: 6 - y: 12 - spacing: 4 - Repeater { - model: parent.count - delegate: Rectangle { - color: parent.color - width: 6 - height: 6 - } - } - } - } - // text in the upper right corner - Text { - anchors.margins: 6 - anchors.left: parent.left - anchors.top: parent.top - color: "white" - opacity: 0.65 - text: "KDevelop Integrated Development Environment – http://kdevelop.org
" + root.progress+"%" - } - // icon in the lower left corner - Image { - id: icon - anchors { - bottom: parent.bottom - left: parent.left - margins: 6 - } - width: 48 - height: width - source: appIcon - } - // Text next to the icon - Text { - anchors { - left: icon.right - bottom: parent.bottom - margins: 8 - } - height: icon.height - width: parent.width - icon.width - color: "white" - verticalAlignment: Text.AlignVCenter - font { - pointSize: 26 - bold: true - family: "sans" - } - style: Text.Raised; - styleColor: "black" - text: "KDevelop " + appVersionMajor + "." + appVersionMinor + - " ." + appVersionPatch + "" - } -} diff --git a/kdevelop/app/vendor/kate/katepartui.rc b/kdevelop/app/vendor/kate/katepartui.rc deleted file mode 100644 index 7083a294..00000000 --- a/kdevelop/app/vendor/kate/katepartui.rc +++ /dev/null @@ -1,130 +0,0 @@ - - - - &File - - - - - - - - &Edit - - - - - - - - - - - - - - - - - - - - - - - - - &View - - - - - - - - - - - - - - &Code Folding - - - - - - - - - - - - - &Tools - - - - - - - - - - - Word Completion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &Settings - - - - - - - - - - - - - - - - - - -Main Toolbar - - - - - - - diff --git a/kdevelop/app/welcomepage/qml/Develop.qml b/kdevelop/app/welcomepage/qml/Develop.qml deleted file mode 100644 index 5e0c3c73..00000000 --- a/kdevelop/app/welcomepage/qml/Develop.qml +++ /dev/null @@ -1,105 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import org.kde.plasma.components 0.1 -import org.kde.plasma.core 0.1 as PlasmaCore -import org.kdevelop.welcomepage 4.3 - -StandardPage -{ - ToolBar { - id: toolBar - anchors { - top: parent.top - left: parent.left - right: parent.right - margins: 25 - } - tools: Flow { - Link { - iconSource: "project-development-new-template" - text: i18n("New Project") - onClicked: kdev.retrieveMenuAction("project/project_new").trigger() - } - - Link { - iconSource: "project-development-open" - text: i18n("Open project") - onClicked: ICore.projectController().openProject() - } - - Link { - iconSource: "download" - text: i18n("Fetch project") - onClicked: kdev.retrieveMenuAction("project/project_fetch").trigger() - } - - Link { - iconSource: "document-open-recent" - text: i18n("Recent Projects") - onClicked: kdev.showMenu("project/project_open_recent") - } - } - } - - ListView { - id: sessionsView - clip: true - boundsBehavior: Flickable.StopAtBounds - anchors { - left: parent.left - top: toolBar.bottom - bottom: parent.bottom - right: parent.right - bottomMargin: 30 - leftMargin: 30 - rightMargin: 30 - } - - delegate: ListItem { - width: sessionsView.width - height: visible ? 30 : 0 - visible: projects.length>0 - onClicked: sessions.loadSession(uuid) - enabled: true - - Label { - width: parent.width - text: (display=="" ? - projectNames.join(", ").replace(/.kdev4/g, "") - : - i18n("%1: %2", display, projectNames.join(", ").replace(/.kdev4/g, ""))) - elide: Text.ElideRight - } - } - - model: PlasmaCore.SortFilterModel { - sourceModel: SessionsModel { id: sessions } - sortRole: "identifier" - sortOrder: Qt.AscendingOrder - } - - header: Heading { - text: i18n("Sessions") - height: implicitHeight*2 - } - } -} diff --git a/kdevelop/app/welcomepage/qml/GettingStarted.qml b/kdevelop/app/welcomepage/qml/GettingStarted.qml deleted file mode 100644 index 858698a2..00000000 --- a/kdevelop/app/welcomepage/qml/GettingStarted.qml +++ /dev/null @@ -1,89 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import QtWebKit 1.0 -import org.kde.plasma.components 0.1 - -StandardPage { - Column { - id: options - anchors.top: parent.top - anchors.left: parent.left - anchors.margins: 30 - - spacing: 10 - - width: 200 - Link { text: i18n("Official Website"); onClicked: info.state="kdevelop.org" } - Link { text: i18n("Userbase"); onClicked: info.state="userbase" } - Link { text: i18n("Techbase"); onClicked: info.state="techbase" } - Link { text: i18n("Handbook"); onClicked: kdev.retrieveMenuAction("help/help_contents").trigger() } - } - - Column { - id: info - anchors { - top: parent.top - left: options.right - right: parent.right - margins: 30 - } - - spacing: 10 - - WebView { - id: webview - width: parent.width - height: 200 - - MouseArea { anchors.fill: parent; hoverEnabled: true } - } - - Label { - id: description - width: parent.width - } - - Button { - text: i18n("Go!") - onClicked: Qt.openUrlExternally(webview.url) - } - states: [ - State { - name: "userbase" - PropertyChanges { target: webview; url: "http://userbase.kde.org/KDevelop" } - PropertyChanges { target: description; text: i18n("Documentation for KDevelop users") } - }, - State { - name: "kdevelop.org" - PropertyChanges { target: webview; url: "http://kdevelop.org" } - PropertyChanges { target: description; text: i18n("Keep up with KDevelop's development") } - }, - State { - name: "techbase" - PropertyChanges { target: webview; url: "http://techbase.kde.org/KDevelop" } - PropertyChanges { target: description; text: i18n("Help us improve KDevelop") } - } - ] - } - - Component.onCompleted: info.state="kdevelop.org" -} diff --git a/kdevelop/app/welcomepage/qml/Heading.qml b/kdevelop/app/welcomepage/qml/Heading.qml deleted file mode 100644 index 5c9e1cd3..00000000 --- a/kdevelop/app/welcomepage/qml/Heading.qml +++ /dev/null @@ -1,25 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import org.kde.plasma.components 0.1 - -Label { - font.pointSize: theme.defaultFont.pointSize*1.5 -} diff --git a/kdevelop/app/welcomepage/qml/Link.qml b/kdevelop/app/welcomepage/qml/Link.qml deleted file mode 100644 index 5a8a9311..00000000 --- a/kdevelop/app/welcomepage/qml/Link.qml +++ /dev/null @@ -1,25 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.1 -import org.kde.plasma.components 0.1 - -ToolButton { -} diff --git a/kdevelop/app/welcomepage/qml/StandardBackground.qml b/kdevelop/app/welcomepage/qml/StandardBackground.qml deleted file mode 100644 index 804e5ed8..00000000 --- a/kdevelop/app/welcomepage/qml/StandardBackground.qml +++ /dev/null @@ -1,67 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import org.kde.plasma.core 0.1 as PlasmaCore -import org.kde.qtextracomponents 0.1 - -Rectangle -{ - property Component tools: null - property alias pageIcon: theIcon.icon - property real marginLeft: toolbar.x+toolbar.width - property real margins: 5 - - PlasmaCore.FrameSvgItem { - imagePath: "widgets/tooltip" - prefix: "base" - id: toolbar - anchors { - top: parent.top - left: parent.left - margins: parent.margins - } - width: toolsLoader.width + 2*toolsLoader.margins - height: toolsLoader.height + 2*toolsLoader.margins - Loader { - id: toolsLoader - - property int margins: 20 - - anchors { - top: parent.top - left: parent.left - margins: toolsLoader.margins - } - sourceComponent: tools - } - } - - QIconItem { - id: theIcon - anchors { - bottom: parent.bottom - left: parent.left - margins: 5 - } - width: 64 - height: width - } -} diff --git a/kdevelop/app/welcomepage/qml/StandardPage.qml b/kdevelop/app/welcomepage/qml/StandardPage.qml deleted file mode 100644 index d758a157..00000000 --- a/kdevelop/app/welcomepage/qml/StandardPage.qml +++ /dev/null @@ -1,41 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.1 -import org.kde.qtextracomponents 0.1 -import org.kde.plasma.core 0.1 as PlasmaCore - -PlasmaCore.FrameSvgItem { - imagePath: "widgets/tooltip" - prefix: "base" - clip: true - - QIconItem { - anchors { - bottom: parent.bottom - right: parent.right - margins: 5 - } - opacity: 0.3 - width: 128 - height: width - icon: "kdevelop" - } -} diff --git a/kdevelop/app/welcomepage/qml/area_code.qml b/kdevelop/app/welcomepage/qml/area_code.qml deleted file mode 100644 index 1d246742..00000000 --- a/kdevelop/app/welcomepage/qml/area_code.qml +++ /dev/null @@ -1,64 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import org.kde.plasma.components 0.1 - -StandardBackground { - id: root - gradient: Gradient { - GradientStop { position: 0.0; color: "#61B056" } - GradientStop { position: 1.0; color: "#A3D69B" } - } - - state: "develop" - - tools: ButtonColumn { - spacing: 10 - - Link { - iconSource: "applications-development" - text: i18n("Develop") - onClicked: root.state = "develop" - } - Link { - iconSource: "help-contents" - text: i18n("Getting Started") - onClicked: root.state = "gettingstarted" - } - } - - Loader { - id: codeContents - anchors { - fill: parent - leftMargin: root.marginLeft+root.margins - margins: root.margins - } - } - states: [ - State { name: "gettingstarted" - PropertyChanges { target: codeContents; source: "qrc:/qml/GettingStarted.qml"} - }, - State { name: "develop" - PropertyChanges { target: codeContents; source: "qrc:/qml/Develop.qml"} - } - ] -} diff --git a/kdevelop/app/welcomepage/qml/area_debug.qml b/kdevelop/app/welcomepage/qml/area_debug.qml deleted file mode 100644 index 3a7a65e6..00000000 --- a/kdevelop/app/welcomepage/qml/area_debug.qml +++ /dev/null @@ -1,73 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import org.kde.plasma.components 0.1 - -StandardBackground -{ - id: root - gradient: Gradient { - GradientStop { position: 0.0; color: "#21257C" } - GradientStop { position: 1.0; color: "#62B6F1" } - } - tools: Link { - id: goCode - - iconSource: "go-previous" - text: i18n("Back to code") - onClicked: kdev.setArea("code") - } - pageIcon: "tools-report-bug" - - StandardPage { - id: startingPage - anchors { - fill: parent - leftMargin: root.marginLeft+root.margins - margins: root.margins - } - - Column { - anchors.margins: 30 - anchors.fill: parent - spacing: 30 - - ToolBar { - tools: Flow { - Link { iconSource: "configure"; text: i18n("Configure a new Launcher"); onClicked: kdev.retrieveMenuAction("run/configure_launches").trigger() } - Link { iconSource: "audio-input-line"; text: i18n("Attach to Process"); onClicked: kdev.retrieveMenuAction("run/debug_attach").trigger() } - Link { iconSource: "debug-run"; text: i18n("Debug your program"); onClicked: kdev.retrieveMenuAction("run/run_debug").trigger() } - } - } - Heading { text: i18n("Debug Area") } - Label { - width: parent.width - text: i18n("On the Debug area you will be able to see and analyze how your program works on execution. "+ - "On the Run menu you will find all the possible options.

"+ - "As you can see, here you can just execute your application or debug it if you need "+ - "further runtime information. You can select what is going to be run by configuring "+ - "the launches and selecting the one you want to use in the Current Launch Configuration sub-menu.") - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignJustify - } - } - } -} diff --git a/kdevelop/app/welcomepage/qml/area_review.qml b/kdevelop/app/welcomepage/qml/area_review.qml deleted file mode 100644 index eb5475ef..00000000 --- a/kdevelop/app/welcomepage/qml/area_review.qml +++ /dev/null @@ -1,78 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 -import org.kde.plasma.components 0.1 - -StandardBackground -{ - id: root - gradient: Gradient { - GradientStop { position: 0.0; color: "#B85B5B" } - GradientStop { position: 1.0; color: "#EEBABA" } - } - tools: Link { - id: goCode - - iconSource: "go-previous" - text: i18n("Back to code") - onClicked: kdev.setArea("code") - } - pageIcon: "applications-engineering" - - StandardPage { - id: startingPage - anchors { - fill: parent - leftMargin: root.marginLeft+root.margins - margins: root.margins - } - - Column { - anchors.margins: 30 - anchors.fill: parent - spacing: 30 - - ToolBar { - tools: Flow { - Link { - iconSource: "kompare" - text: i18n("Review a Patch") - onClicked: { - kdev.raiseToolView("EditPatch") - } - } - } - } - - Heading { text: i18n("Review Area") } - - Label { - width: parent.width - text: i18n("On the Review area you will be able to find the tools you need "+ - "to review changes in your projects, either the ones you made or some external patch.
Also it will help you send "+ - "the changes to the community you're contributing to, either by committing the changes, sending them by e-mail or "+ - "putting them on a ReviewBoard service.") - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignJustify - } - } - } -} diff --git a/kdevelop/app/welcomepage/qml/main.qml b/kdevelop/app/welcomepage/qml/main.qml deleted file mode 100644 index afc221c9..00000000 --- a/kdevelop/app/welcomepage/qml/main.qml +++ /dev/null @@ -1,26 +0,0 @@ -/* KDevelop - * - * Copyright 2011 Aleix Pol - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -import QtQuick 1.0 - -Loader { - source: "qrc:/qml/area_"+area+".qml" - anchors.fill: parent -} diff --git a/kdevelop/app/welcomepage/sessionsmodel.cpp b/kdevelop/app/welcomepage/sessionsmodel.cpp deleted file mode 100644 index 8b924723..00000000 --- a/kdevelop/app/welcomepage/sessionsmodel.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* This file is part of KDevelop - Copyright 2010 Aleix Pol Gonzalez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "sessionsmodel.h" -#include - -SessionsModel::SessionsModel(QObject* parent) - : QAbstractListModel(parent) - , m_sessions(KDevelop::SessionController::availableSessionInfo()) -{ - QHash< int, QByteArray > roles = roleNames(); - roles.insert(Uuid, "uuid"); - roles.insert(Projects, "projects"); - roles.insert(ProjectNames, "projectNames"); - roles.insert(VisibleIdentifier, "identifier"); - setRoleNames(roles); - - connect(KDevelop::Core::self()->sessionController(), SIGNAL(sessionDeleted(QString)), SLOT(sessionDeleted(QString))); -} - -QVariant SessionsModel::data(const QModelIndex& index, int role) const -{ - if(!index.isValid() || index.row()>m_sessions.count()) { - return QVariant(); - } - - switch(role) { - case Qt::DisplayRole: - return m_sessions[index.row()].name; - case Qt::ToolTip: - return m_sessions[index.row()].description; - case Uuid: - return m_sessions[index.row()].uuid.toString(); - case Projects: - return m_sessions[index.row()].projects; - case VisibleIdentifier: { - const KDevelop::SessionInfo& s = m_sessions[index.row()]; - return s.name.isEmpty() && !s.projects.isEmpty() ? s.projects.first().fileName() : s.name; - } - case ProjectNames: { - QVariantList ret; - foreach(const KUrl& project, m_sessions[index.row()].projects) { - ret += project.fileName(); - } - return ret; - } - } - return QVariant(); -} - -int SessionsModel::rowCount(const QModelIndex& parent) const -{ - return parent.isValid() ? 0 : m_sessions.size(); -} - -void SessionsModel::loadSession(const QString& nameOrId) const -{ - KDevelop::Core::self()->sessionController()->loadSession(nameOrId); -} - -void SessionsModel::sessionDeleted(const QString& id) -{ - for(int i=0; i - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef SESSIONSMODEL_H -#define SESSIONSMODEL_H - -#include -#include - -class SessionsModel : public QAbstractListModel -{ - Q_OBJECT - public: - enum Roles { Uuid = Qt::UserRole+1, Projects, ProjectNames, VisibleIdentifier }; - explicit SessionsModel(QObject* parent = 0); - virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; - virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; - Q_SCRIPTABLE void loadSession(const QString& nameOrId) const; - private: - QList m_sessions; - - private slots: - void sessionDeleted(const QString& id); -}; - -#endif // SESSIONSMODEL_H diff --git a/kdevelop/app/welcomepage/uihelper.cpp b/kdevelop/app/welcomepage/uihelper.cpp deleted file mode 100644 index f1c61c51..00000000 --- a/kdevelop/app/welcomepage/uihelper.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* This file is part of KDevelop - Copyright 2010 Aleix Pol Gonzalez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "uihelper.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace KDevelop; - -UiHelper::UiHelper(QObject* parent): QObject(parent) -{} - -QAction* findActionRec(const QStringList& path, const QList& actions) -{ - QStringList newPath = path; - QString current = newPath.takeFirst(); - - foreach(QAction* a, actions) { - if(a->objectName() == current) { - if(newPath.isEmpty()) - return a; - else if(a->menu()) - return findActionRec(newPath, a->menu()->actions()); - else - qDebug() << "shouldn't get here:" << path; - } - } - - qWarning() << "error: action path not found: " << path; - return 0; -} - -QAction* UiHelper::retrieveMenuAction(const QString& menuPath) -{ - QMenuBar* m = ICore::self()->uiController()->activeMainWindow()->menuBar(); - - QAction* a=findActionRec(menuPath.split('/'), m->actions()); - return a; -} - -void UiHelper::setArea(const QString& name) -{ - ICore::self()->uiController()->switchToArea(name, IUiController::ThisWindow); -} - -void UiHelper::raiseToolView(const QString& id) -{ - QList< Sublime::View* > views = ICore::self()->uiController()->activeArea()->toolViews(); - foreach(Sublime::View* v, views) { - QWidget* w=v->widget(); - if(w && id==w->objectName()) - ICore::self()->uiController()->raiseToolView(w); - } -} - -void UiHelper::showMenu(const QString& name) -{ - QAction* action = retrieveMenuAction(name); - Q_ASSERT(action); - Q_ASSERT(action->menu()); - - action->menu()->popup(QCursor::pos()); -} diff --git a/kdevelop/app/welcomepage/uihelper.h b/kdevelop/app/welcomepage/uihelper.h deleted file mode 100644 index 78b1df63..00000000 --- a/kdevelop/app/welcomepage/uihelper.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of KDevelop - Copyright 2010 Aleix Pol Gonzalez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef UIHELPER_H -#define UIHELPER_H - -#include -#include - -class QUrl; -class QAction; -class UiHelper : public QObject -{ - Q_OBJECT - public: - UiHelper(QObject* parent); - - public slots: - QAction* retrieveMenuAction(const QString& name); - void showMenu(const QString& name); - void setArea(const QString& name); - void raiseToolView(const QString& id); -}; - -#endif // UIHELPER_H - diff --git a/kdevelop/app/welcomepage/welcomepage.qrc b/kdevelop/app/welcomepage/welcomepage.qrc deleted file mode 100644 index 7be2bb0c..00000000 --- a/kdevelop/app/welcomepage/welcomepage.qrc +++ /dev/null @@ -1,18 +0,0 @@ - - - - qml/Develop.qml - qml/GettingStarted.qml - qml/Link.qml - qml/StandardPage.qml - qml/Heading.qml - qml/StandardBackground.qml - - - qml/area_code.qml - qml/area_debug.qml - qml/area_review.qml - - qml/main.qml - - diff --git a/kdevelop/app/welcomepage/welcomepageview.cpp b/kdevelop/app/welcomepage/welcomepageview.cpp deleted file mode 100644 index 482de74c..00000000 --- a/kdevelop/app/welcomepage/welcomepageview.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* This file is part of KDevelop - Copyright 2011 Aleix Pol Gonzalez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "welcomepageview.h" - -#include "uihelper.h" -#include "sessionsmodel.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -using namespace KDevelop; - -WelcomePageView::WelcomePageView(QWidget* parent) - : QDeclarativeView(parent) -{ - qRegisterMetaType("KDevelop::IProjectController*"); - qRegisterMetaType("KDevelop::IPluginController*"); - qRegisterMetaType("PatchReviewPlugin*"); - qmlRegisterType("org.kdevelop.welcomepage", 4, 3, "SessionsModel"); - - QPalette p = palette(); - p.setColor(QPalette::Active, QPalette::Text, QColor(Qt::black)); - setPalette(p); - - //setup kdeclarative library - KDeclarative kdeclarative; - kdeclarative.setDeclarativeEngine(engine()); - kdeclarative.initialize(); - //binds things like kconfig and icons - kdeclarative.setupBindings(); - - setResizeMode(QDeclarativeView::SizeRootObjectToView); - - UiHelper* helper = new UiHelper(this); - rootContext()->setContextProperty("kdev", helper); - rootContext()->setContextProperty("ICore", KDevelop::ICore::self()); - areaChanged(ICore::self()->uiController()->activeArea()); - - setSource(QUrl("qrc:/qml/main.qml")); - if(!errors().isEmpty()) { - kWarning() << "welcomepage errors:" << errors(); - } - areaChanged(Core::self()->uiControllerInternal()->activeSublimeWindow()->area()); - connect(Core::self()->uiControllerInternal()->activeSublimeWindow(), SIGNAL(areaChanged(Sublime::Area*)), - this, SLOT(areaChanged(Sublime::Area*))); -} - -void WelcomePageView::areaChanged(Sublime::Area* area) -{ - rootContext()->setContextProperty("area", area->objectName()); -} - -void trySetupWelcomePageView() -{ - WelcomePageView* v = new WelcomePageView; - - // make sure plasma component is available - QDeclarativeComponent component(v->engine()); - component.setData("import org.kde.plasma.components 0.1\nimport QtQuick 1.0\nText { text: \"Hello world!\" }", QUrl()); - - if (component.isError()) { - kWarning() << "Welcome Page not supported. errors: " << component.errors(); - delete v; - } else { - Core::self()->uiControllerInternal()->activeSublimeWindow()->setBackgroundCentralWidget(v); - } -} diff --git a/kdevelop/app/welcomepage/welcomepageview.h b/kdevelop/app/welcomepage/welcomepageview.h deleted file mode 100644 index 7d6d4fe9..00000000 --- a/kdevelop/app/welcomepage/welcomepageview.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of KDevelop - Copyright 2011 Aleix Pol Gonzalez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef WELCOMEPAGEVIEW_H -#define WELCOMEPAGEVIEW_H - -#include - -namespace Sublime -{ -class Area; -} - -class WelcomePageView : public QDeclarativeView -{ - Q_OBJECT -public: - WelcomePageView(QWidget* parent = 0); - -public slots: - void areaChanged(Sublime::Area* a); -}; - -void trySetupWelcomePageView(); - -#endif // WELCOMEPAGEVIEW_H diff --git a/kdevelop/app_templates/CMakeLists.txt b/kdevelop/app_templates/CMakeLists.txt deleted file mode 100644 index 6fcee43d..00000000 --- a/kdevelop/app_templates/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(apptemplate_DIRS - cpp/CMake/cmake_qt4core - cpp/CMake/cmake_qt4gui - cpp/CMake/cmake_qt4core_qtest - cpp/CMake/cmake_plaincpp -) - -include(${CMAKE_SOURCE_DIR}/kdevplatform/cmake/modules/KDevPlatformMacros.cmake) -kdevplatform_add_app_templates(${apptemplate_DIRS}) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/%{PROJECTDIRNAME}.kdev4 b/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/%{PROJECTDIRNAME}.kdev4 deleted file mode 100644 index 9bf12adc..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/%{PROJECTDIRNAME}.kdev4 +++ /dev/null @@ -1,4 +0,0 @@ -[Project] -Name=%{APPNAME} -Manager=KDevCMakeManager -VersionControl=%{VERSIONCONTROLPLUGIN} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/CMakeLists.txt b/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/CMakeLists.txt deleted file mode 100644 index 0977e593..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(%{APPNAMELC}) - -add_executable(%{APPNAMELC} main.cpp) - -install(TARGETS %{APPNAMELC} RUNTIME DESTINATION bin) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/cmake_plaincpp.kdevtemplate b/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/cmake_plaincpp.kdevtemplate deleted file mode 100644 index 75ed1616..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/cmake_plaincpp.kdevtemplate +++ /dev/null @@ -1,74 +0,0 @@ -# KDE Config File -[General] -Name=CMake C++ -Name[bs]=CMake C++ -Name[ca]=CMake C++ -Name[ca@valencia]=CMake C++ -Name[cs]=CMake C++ -Name[da]=CMake C++ -Name[de]=CMake C++ -Name[el]=CMake C++ -Name[en_GB]=CMake C++ -Name[es]=CMake C++ -Name[et]=CMake C++ -Name[fi]=CMake C++ -Name[fr]=CMake C++ -Name[ga]=CMake C++ -Name[gl]=CMake C++ -Name[hu]=CMake C++ -Name[it]=CMake C++ -Name[kk]=CMake C++ -Name[nb]=CMake C++ -Name[nds]=CMake C++ -Name[nl]=CMake C++ -Name[pl]=CMake C++ -Name[pt]=C++ com CMake -Name[pt_BR]=CMake C++ -Name[ru]=C++ (CMake) -Name[sk]=CMake C++ -Name[sl]=CMake C++ -Name[sv]=CMake C++ -Name[tr]=CMake C++ -Name[uk]=CMake C++ -Name[x-test]=xxCMake C++xx -Name[zh_CN]=CMake C++ -Name[zh_TW]=CMake C++ -Comment=Simple CMake-based C++ application -Comment[bs]=Jednostavna na CMake bazirana C++ aplikacija -Comment[ca]=Senzilla aplicació C++ basada en CMake -Comment[ca@valencia]=Senzilla aplicació C++ basada en CMake -Comment[cs]=Jednoduchá aplikace C++ založená na CMake -Comment[da]=Simpel CMake-baseret C++-applikation -Comment[de]=Einfache auf CMake basierende C++-Anwendung -Comment[el]=Απλή εφαρμογή C++ με βάση το CMake -Comment[en_GB]=Simple CMake-based C++ application -Comment[es]=Aplicación C++ sencilla basada en CMake -Comment[et]=Lihtne CMake'i põhine C++ rakendus -Comment[fi]=Yksinkertainen CMake-perustainen C++-sovellus -Comment[fr]=Application C++ simple utilisant CMake -Comment[ga]=Feidhmchlár simplí C++ bunaithe ar CMake -Comment[gl]=Programa básico en C++ baseado en CMake -Comment[hu]=Egyszerű CMake alapú C++ alkalmazás -Comment[it]=Semplice applicazione in C++ basata su CMake -Comment[kk]=CMake негіздеген қарапайым C++ бағдарламасы -Comment[lt]=Paprasta CMake-paremta C++ programa -Comment[nb]=Enkelt C++-program basert på CMake -Comment[nds]=En eenfach op CMake-baseert "C++"-Programm -Comment[nl]=Eenvoudig op CMake gebaseerd C++ programma -Comment[pl]=Prosty program w C++ oparty na CMake -Comment[pt]=Aplicação simples em C++, baseada no CMake -Comment[pt_BR]=Simples Aplicativo C++ baseado no CMake -Comment[ru]=Простое приложение на С++ с CMake -Comment[sk]=Jednoduchá C++ aplikácia založená na CMake -Comment[sl]=Preprost program v C++, temelječ na CMake -Comment[sv]=Enkelt CMake-baserat C++ program -Comment[tr]=Basit CMake tabanlı C++ uygulaması -Comment[ug]=ئاددىي CMake ئاساسىدىكى C++ پروگراممىسى -Comment[uk]=Проста заснована на CMake програма C++ -Comment[x-test]=xxSimple CMake-based C++ applicationxx -Comment[zh_CN]=基于 CMake 的简单 C++ 应用程序 -Comment[zh_TW]=簡單的使用 CMake 的 C++ 應用程式 -Category=Standard/Terminal -Icon=default-kdevelop -ShowFilesAfterGeneration=%{PROJECTDIR}/main.cpp -ValidProjectName=^[a-zA-Z_][a-zA-Z0-9_]+$ diff --git a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/main.cpp b/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/main.cpp deleted file mode 100644 index 8bb47f1c..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_plaincpp/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - std::cout << "Hello, world!" << std::endl; - return 0; -} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.cpp deleted file mode 100644 index b374a1cb..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "%{APPNAME}.h" - -#include -#include - -%{APPNAMEID}::%{APPNAMEID}() -{ - QTimer* timer = new QTimer(this); - connect( timer, SIGNAL(timeout()), SLOT(output()) ); - timer->start( 1000 ); -} - -%{APPNAMEID}::~%{APPNAMEID}() -{} - -void %{APPNAMEID}::output() -{ - std::cout << "Hello World!" << std::endl; -} - -#include "moc_%{APPNAME}.cpp" diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.h b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.h deleted file mode 100644 index 3f0f2338..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{APPNAME}.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef %{APPNAMEID}_H -#define %{APPNAMEID}_H - -#include - -class %{APPNAMEID} : public QObject -{ - Q_OBJECT - -public: - %{APPNAMEID}(); - virtual ~%{APPNAMEID}(); - -private slots: - void output(); -}; - -#endif // %{APPNAMEID}_H diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{PROJECTDIRNAME}.kdev4 b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{PROJECTDIRNAME}.kdev4 deleted file mode 100644 index 9bf12adc..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/%{PROJECTDIRNAME}.kdev4 +++ /dev/null @@ -1,4 +0,0 @@ -[Project] -Name=%{APPNAME} -Manager=KDevCMakeManager -VersionControl=%{VERSIONCONTROLPLUGIN} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/CMakeLists.txt b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/CMakeLists.txt deleted file mode 100644 index f2f539b1..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(%{APPNAMELC}) -find_package(Qt4 REQUIRED) - -include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) - -set(%{APPNAME}_SRCS %{APPNAME}.cpp main.cpp) - -qt4_automoc(${%{APPNAME}_SRCS}) -add_executable(%{APPNAMELC} ${%{APPNAME}_SRCS}) -target_link_libraries(%{APPNAMELC} ${QT_QTCORE_LIBRARY}) - -install(TARGETS %{APPNAMELC} RUNTIME DESTINATION bin) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/cmake_qt4core.kdevtemplate b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/cmake_qt4core.kdevtemplate deleted file mode 100644 index 23972cd2..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/cmake_qt4core.kdevtemplate +++ /dev/null @@ -1,71 +0,0 @@ -# KDE Config File -[General] -Name=CMake QtCore C++ -Name[bs]=CMake QtCore C++ -Name[ca]=CMake QtCore C++ -Name[ca@valencia]=CMake QtCore C++ -Name[cs]=CMake QtCore C++ -Name[da]=CMake QtCore C++ -Name[de]=CMake QtCore C++ -Name[el]=CMake QtCore C++ -Name[en_GB]=CMake QtCore C++ -Name[es]=CMake QtCore C++ -Name[et]=CMake QtCore C++ -Name[fi]=CMake QtCore C++ -Name[fr]=CMake QtCore C++ -Name[ga]=CMake QtCore C++ -Name[gl]=CMake QtCore C++ -Name[hu]=CMake QtCore C++ -Name[it]=CMake QtCore C++ -Name[kk]=CMake QtCore C++ -Name[nb]=CMake QtCore C++ -Name[nds]=CMake QtCore C++ -Name[nl]=CMake QtCore C++ -Name[pl]=CMake QtCore C++ -Name[pt]=QtCore em C++ com CMake -Name[pt_BR]=CMake QtCore C++ -Name[ru]=C++ (CMake, QtCore) -Name[sk]=CMake QtCore C++ -Name[sl]=CMake QtCore C++ -Name[sv]=CMake QtCore C++ -Name[tr]=CMake QtCore C++ -Name[uk]=CMake QtCore C++ -Name[x-test]=xxCMake QtCore C++xx -Name[zh_CN]=CMake QtCore C++ -Name[zh_TW]=CMake QtCore C++ -Comment=Qt4 CMake Core application. Generate a CMake/Qt4 based application (crossplatform compatible) -Comment[bs]=Qt4 CMake osnovna aplikacija. Generiše CMake/Qt4 baziranu aplikaciju (kompatibilna s više platformi) -Comment[ca]=Aplicació de nucli CMake Qt4. Genera una aplicació basada en CMake/Qt4 (multi plataforma) -Comment[ca@valencia]=Aplicació de nucli CMake Qt4. Genera una aplicació basada en CMake/Qt4 (multi plataforma) -Comment[cs]=Aplikace Qt4 CMake Core. Generuje aplikaci typu CMake/Qt4 (multiplatformní) -Comment[da]=Qt4 CMake Core-program. Genererer et CMake-/Qt4-baseret program (krydsplatform kompatibelt) -Comment[de]=Qt4/CMake-Core-Anwendung. Eine auf CMake und Qt4 basierende Anwendung (plattformunabhängig) erstellen. -Comment[el]=Qt4 CMake Core εφαρμογή. Δημιουργία μιας εφαρμογής με βάση τα CMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) -Comment[en_GB]=Qt4 CMake Core application. Generate a CMake/Qt4 based application (crossplatform compatible) -Comment[es]=Aplicación Qt4 CMake Core. Genera una aplicación basada en CMake/Qt4 (compatible multiplataforma) -Comment[et]=Qt4 CMake Core rakendus. Rakenduse loomine CMake/Qt4 põhjal (mitmeplatvormne) -Comment[fi]=Qt 4 CMake Core -sovellus. Generoi CMake/Qt4-perustainen sovellus (toimii useissa käyttöjärjestelmissä) -Comment[fr]=Application principale CMake pour Qt4. Génère une application utilisant QMake / Qt4 (compatible multi-plate-forme) -Comment[ga]=Feidhmchlár bunúsach CMake Qt4. Cruthaigh feidhmchlár bunaithe ar CMake/Qt4 (feidhmchlár trasardáin) -Comment[gl]=Programa principal con CMake para Qt4. Xera un programa baseado en QMake/Qt4 (compatíbel con multiplataforma) -Comment[hu]=Qt4 CMake mag alkalmazás. Előállít egy CMake/Qt4 alapú alkalmazást (keresztplatform kompatibilis) -Comment[it]=Applicazione base CMake in Qt4. Genera un'applicazione basata su CMake/Qt4 (multipiattaforma) -Comment[kk]=Qt4 CMake Core бағдарламасы. CMake/Qt4 негіздеген бағдарламаны жасап береді (кроссплатформалық үлесімді) -Comment[nb]=Qt4 CMake kjerneprogram. Lag et program basert på CMake/Qt4 (kryssplattform-kompatibelt) -Comment[nds]=Qt4-CMake-Karnprogramm. Stellt en op CMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) -Comment[nl]=Kerntoepassing van Qt4 CMake. Genereert een op CMake/Qt4 gebaseerd programma (crossplatform compatibel) -Comment[pl]=Program jądra Qt4 CMake. Generuj programy oparte o CMake/Qt4 (kompatybilne na wielu platformach) -Comment[pt]=Gera uma aplicação baseada no CMake/Qt4 Core (compatível com várias plataformas) -Comment[pt_BR]=Aplicativo principal com CMake para Qt4. Gera um aplicativo em CMake/Qt4 (compatível com várias plataformas) -Comment[ru]=Основа приложения для Qt4 и CMake. Создаёт кроссплатформенное приложение на базе CMake/Qt4. -Comment[sk]=Ústredná aplikácia Qt4 CMake. Generuje aplikáciu založenú na CMake/Qt4 (cross-platformovo kompatibilné) -Comment[sl]=Jedrni program Qt4 CMake. Ustvari program temelječ na CMake/Qt4 (združljiv z več okolji) -Comment[sv]=Qt4 CMake-kärnprogram. Skapa ett CMake/Qt4-baserat program (som fungerar på flera plattformar) -Comment[tr]=Qt4 CMake Çekirdek uygulaması. CMake/Qt4 tabanlı uygulama oluştur (çapraz platform uyumlu) -Comment[uk]=Основна програма Qt4 з системою збирання CMake. Створити програму, засновану на CMake/Qt4 (сумісну з декількома платформами) -Comment[x-test]=xxQt4 CMake Core application. Generate a CMake/Qt4 based application (crossplatform compatible)xx -Comment[zh_CN]=生成基于 CMake/Qt4 的应用程序(跨平台兼容) -Comment[zh_TW]=Qt4 CMake Core 應用程式。產生一個 CMake/Qt4 為基礎的使用者介面應用程式(跨平台相容) -ShowFilesAfterGeneration=%{PROJECTDIR}/src/%{APPNAMELC}.cpp -Category=Qt/Terminal -ValidProjectName=^[a-zA-Z_][a-zA-Z0-9_]+$ diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/main.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4core/main.cpp deleted file mode 100644 index a8849748..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "%{APPNAME}.h" - - -int main(int argc, char** argv) -{ - QCoreApplication app(argc, argv); - %{APPNAMEID} %{APPNAMELC}; - return app.exec(); -} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.cpp deleted file mode 100644 index a1a8f848..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "%{APPNAME}.h" - -%{APPNAMEID}::%{APPNAMEID}() -{} - -%{APPNAMEID}::~%{APPNAMEID}() -{} - -#include "moc_%{APPNAME}.cpp" diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.h b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.h deleted file mode 100644 index 9c5c2a98..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{APPNAME}.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef %{APPNAMEID}_H -#define %{APPNAMEID}_H - -#include - -class %{APPNAMEID} : public QObject -{ - Q_OBJECT - -public: - %{APPNAMEID}(); - virtual ~%{APPNAMEID}(); -}; - -#endif // %{APPNAMEID}_H diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{PROJECTDIRNAME}.kdev4 b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{PROJECTDIRNAME}.kdev4 deleted file mode 100644 index 9bf12adc..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/%{PROJECTDIRNAME}.kdev4 +++ /dev/null @@ -1,4 +0,0 @@ -[Project] -Name=%{APPNAME} -Manager=KDevCMakeManager -VersionControl=%{VERSIONCONTROLPLUGIN} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/CMakeLists.txt b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/CMakeLists.txt deleted file mode 100644 index 72b50caa..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(%{APPNAMELC}) -find_package(Qt4 REQUIRED) - -enable_testing() - -include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) - -set(%{APPNAME}_SRCS %{APPNAME}.cpp main.cpp) - -qt4_automoc(${%{APPNAME}_SRCS}) -add_executable(%{APPNAMELC} ${%{APPNAME}_SRCS}) -target_link_libraries(%{APPNAMELC} ${QT_QTCORE_LIBRARY}) - -add_subdirectory(tests) - -install(TARGETS %{APPNAMELC} RUNTIME DESTINATION bin) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/cmake_qt4core_qtest.kdevtemplate b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/cmake_qt4core_qtest.kdevtemplate deleted file mode 100644 index 0504d084..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/cmake_qt4core_qtest.kdevtemplate +++ /dev/null @@ -1,68 +0,0 @@ -# KDE Config File -[General] -Name=CMake QtTest -Name[bs]=CMake QtTest -Name[ca]=CMake QtTest -Name[ca@valencia]=CMake QtTest -Name[cs]=CMake QtTest -Name[da]=CMake QtTest -Name[de]=CMake QtTest -Name[el]=CMake QtTest -Name[en_GB]=CMake QtTest -Name[es]=CMake QtTest -Name[et]=CMake QtTest -Name[fi]=CMake QtTest -Name[fr]=CMake QtTest -Name[gl]=CMake QtTest -Name[hu]=CMake QtTest -Name[it]=CMake QtTest -Name[kk]=CMake QtTest -Name[nb]=CMake QtTest -Name[nds]=CMake QtTest -Name[nl]=CMake QtTest -Name[pl]=CMake QtTest -Name[pt]=QtTest com CMake -Name[pt_BR]=CMake QtTest -Name[ru]=QtTest (CMake) -Name[sk]=CMake QtTest -Name[sl]=CMake QtTest -Name[sv]=CMake QtTest -Name[tr]=CMake QtTest -Name[uk]=CMake QtTest -Name[x-test]=xxCMake QtTestxx -Name[zh_CN]=CMake QtTest -Name[zh_TW]=CMake QtTest -Comment=Qt4 CMake QTest Core application. Generate a CMake/Qt4 based application (cross-platform) -Comment[bs]=Qt4 CMake QTest osnovna aplikacija. Generiše CMake/Qt4 baziranu aplikaciju (radi s više platformi) -Comment[ca]=Aplicació de nucli QTest CMake Qt4. Genera una aplicació basada en CMake/Qt4 (multi plataforma) -Comment[ca@valencia]=Aplicació de nucli QTest CMake Qt4. Genera una aplicació basada en CMake/Qt4 (multi plataforma) -Comment[da]=Qt4 CMake QTest Core-program. Genererer et CMake-/Qt4-baseret program (krydsplatform) -Comment[de]=Qt4/CMake/QTest-Core-Anwendung. Eine auf CMake und Qt4 basierende Anwendung (plattformunabhängig) erstellen. -Comment[el]=Qt4 CMake QTest Core εφαρμογή. Δημιουργία μιας εφαρμογής με βάση τα CMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) -Comment[en_GB]=Qt4 CMake QTest Core application. Generate a CMake/Qt4 based application (cross-platform) -Comment[es]=Aplicación Qt4 CMake QTest Core. Genera una aplicación basada en CMake/Qt4 (compatible multiplataforma) -Comment[et]=Qt4 CMake QTest Core rakendus. Rakenduse loomine CMake/Qt4 põhjal (mitmeplatvormne) -Comment[fi]=Qt4 CMake QTest Core -sovellus. Generoi CMake/Qt4-perustainen sovellus (eri käyttöjärjestelmissä yhteensopiva) -Comment[fr]=Application principale QTest CMake pour Qt4. Génère une application utilisant CMake / Qt4 (compatible multi-plate-forme) -Comment[gl]=Programa principal QTest con CMake para Qt4. Xera un programa baseado en QMake/Qt4 (compatíbel con multiplataforma) -Comment[hu]=Qt4 CMake QTest mag alkalmazás. Előállít egy CMake/Qt4 alapú alkalmazást (keresztplatform) -Comment[it]=Applicazione base QTest CMake in Qt4. Genera un'applicazione basata su CMake/Qt4 (multipiattaforma) -Comment[kk]=Qt4 CMake QTest Core бағдарламасы. CMake/Qt4 негіздеген бағдарламаны жасап береді (кроссплатформалық) -Comment[nb]=Qt4 CMake QTest kjerneprogram. Lag et program basert på CMake/Qt4 (kryssplattform-kompatibelt) -Comment[nds]=Qt4-CMake-QTest-Karnprogramm. Stellt en op CMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) -Comment[nl]=Kerntoepassing van Qt4 CMake QTest. Genereert een op CMake/Qt4-gebaseerd programma (crossplatform compatibel) -Comment[pl]=Program jądra Qt4 CMake QTest. Generuj programy oparte o CMake/Qt4 (kompatybilne na wielu platformach) -Comment[pt]=Gera uma aplicação baseada no CMake/Qt4 Core com QTest (compatível com várias plataformas) -Comment[pt_BR]=Aplicativo principal QTest com CMake para Qt4. Gera um aplicativo em CMake/Qt4 (compatível com várias plataformas) -Comment[ru]=Основа приложения c QTest для Qt4 и CMake. Создаёт кроссплатформенное приложение на базе CMake/Qt4. -Comment[sk]=Ústredná aplikácia Qt4 CMake QTest. Generuje aplikáciu založenú na CMake/Qt4 (cross-platformové) -Comment[sl]=Jedrni program Qt4 CMake QTest. Ustvari program temelječ na CMake/Qt4 (združljiv z več okolji) -Comment[sv]=Qt4 CMake QTest-kärnprogram. Skapa ett CMake/Qt4-baserat program (som fungerar på flera plattformar) -Comment[tr]=Qt4 CMake QTest Çekirdek uygulaması. CMake/Qt4 tabanlı uygulama oluştur (çapraz platform uyumlu) -Comment[uk]=Створити програму QTest, засновану на CMake/Qt4 (сумісну з декількома платформами) -Comment[x-test]=xxQt4 CMake QTest Core application. Generate a CMake/Qt4 based application (cross-platform)xx -Comment[zh_CN]=生成基于 CMake/Qt4 的应用程序(跨平台) -Comment[zh_TW]=Qt4 CMake QTest Core 應用程式。產生一個 CMake/Qt4 為基礎的使用者介面應用程式(跨平台相容) -ShowFilesAfterGeneration=%{PROJECTDIR}/src/%{APPNAMELC}.cpp -Category=Qt/Test -ValidProjectName=^[a-zA-Z_][a-zA-Z0-9_]+$ diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/main.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/main.cpp deleted file mode 100644 index a8849748..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "%{APPNAME}.h" - - -int main(int argc, char** argv) -{ - QCoreApplication app(argc, argv); - %{APPNAMEID} %{APPNAMELC}; - return app.exec(); -} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.cpp deleted file mode 100644 index 5e8fcdc0..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "%{APPNAME}Test.h" - -void %{APPNAMEID}Test::initTestCase() -{} - -void %{APPNAMEID}Test::init() -{} - -void %{APPNAMEID}Test::cleanup() -{} - -void %{APPNAMEID}Test::cleanupTestCase() -{} - -void %{APPNAMEID}Test::someTest() -{ - QCOMPARE(1,2); -} - -QTEST_MAIN(%{APPNAMEID}Test) - -#include "moc_%{APPNAME}Test.cpp" diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.h b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.h deleted file mode 100644 index 750aaef3..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/%{APPNAME}Test.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef %{APPNAMEID}TEST_H -#define %{APPNAMEID}TEST_H - -#include -#include - -class %{APPNAMEID}Test : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void init(); - void cleanup(); - void cleanupTestCase(); - void someTest(); -}; - -#endif // %{APPNAMEID}TEST_H diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/CMakeLists.txt b/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/CMakeLists.txt deleted file mode 100644 index b2caac73..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4core_qtest/tests/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) - -set(CMAKE_EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) -set(%{APPNAME}Test_SRCS %{APPNAME}Test.cpp) - -qt4_automoc(${%{APPNAME}Test_SRCS}) -add_executable(%{APPNAME}Test ${%{APPNAME}Test_SRCS}) -add_test(%{APPNAME}Test %{APPNAME}Test) -target_link_libraries(%{APPNAME}Test ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.cpp deleted file mode 100644 index 929b08fb..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "%{APPNAME}.h" - -#include -#include -#include -#include - -%{APPNAMEID}::%{APPNAMEID}() -{ - QLabel* label = new QLabel( this ); - label->setText( "Hello World!" ); - setCentralWidget( label ); - QAction* action = new QAction(this); - action->setText( "Quit" ); - connect(action, SIGNAL(triggered()), SLOT(close()) ); - menuBar()->addMenu( "File" )->addAction( action ); -} - -%{APPNAMEID}::~%{APPNAMEID}() -{} - -#include "moc_%{APPNAME}.cpp" diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.h b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.h deleted file mode 100644 index a1ca6c86..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{APPNAME}.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef %{APPNAMEID}_H -#define %{APPNAMEID}_H - -#include - -class %{APPNAMEID} : public QMainWindow -{ - Q_OBJECT - -public: - %{APPNAMEID}(); - virtual ~%{APPNAMEID}(); -}; - -#endif // %{APPNAMEID}_H diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{PROJECTDIRNAME}.kdev4 b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{PROJECTDIRNAME}.kdev4 deleted file mode 100644 index 9bf12adc..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/%{PROJECTDIRNAME}.kdev4 +++ /dev/null @@ -1,4 +0,0 @@ -[Project] -Name=%{APPNAME} -Manager=KDevCMakeManager -VersionControl=%{VERSIONCONTROLPLUGIN} diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/CMakeLists.txt b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/CMakeLists.txt deleted file mode 100644 index eab8167f..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(%{APPNAMELC}) -find_package(Qt4 REQUIRED) - -include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) - -set(%{APPNAME}_SRCS %{APPNAME}.cpp main.cpp) - -qt4_automoc(${%{APPNAME}_SRCS}) -add_executable(%{APPNAMELC} ${%{APPNAME}_SRCS}) -target_link_libraries(%{APPNAMELC} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) - -install(TARGETS %{APPNAMELC} RUNTIME DESTINATION bin) diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/cmake_qt4gui.kdevtemplate b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/cmake_qt4gui.kdevtemplate deleted file mode 100644 index 476a2422..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/cmake_qt4gui.kdevtemplate +++ /dev/null @@ -1,70 +0,0 @@ -# KDE Config File -[General] -Name=CMake Qt-C++ -Name[bs]=CMake Qt-C++ -Name[ca]=CMake Qt-C++ -Name[ca@valencia]=CMake Qt-C++ -Name[cs]=CMake Qt-C++ -Name[da]=CMake Qt-C++ -Name[de]=CMake Qt-C++ -Name[el]=CMake Qt-C++ -Name[en_GB]=CMake Qt-C++ -Name[es]=CMake Qt-C++ -Name[et]=CMake Qt-C++ -Name[fi]=CMake Qt-C++ -Name[fr]=CMake Qt-C++ -Name[ga]=CMake Qt-C++ -Name[gl]=CMake Qt-C++ -Name[hu]=CMake Qt-C++ -Name[it]=CMake Qt-C++ -Name[kk]=CMake Qt-C++ -Name[nb]=CMake Qt-C++ -Name[nds]=CMake Qt-C++ -Name[nl]=CMake Qt-C++ -Name[pl]=CMake Qt-C++ -Name[pt]=Qt-C++ com QMake -Name[pt_BR]=CMake Qt-C++ -Name[ru]=Qt-C++ (CMake) -Name[sk]=CMake Qt-C++ -Name[sl]=CMake Qt-C++ -Name[sv]=CMake Qt-C++ -Name[tr]=CMake Qt-C++ -Name[uk]=CMake Qt-C++ -Name[x-test]=xxCMake Qt-C++xx -Name[zh_CN]=CMake Qt-C++ -Name[zh_TW]=CMake Qt-C++ -Comment=Qt4 CMake Gui application. Generate a CMake/Qt4 based GUI application (crossplatform compatible) -Comment[bs]=Qt4 CMake Gui application. osnovna aplikacija. Generiše CMake/Qt4 baziranu grafičku aplikaciju (kompatibilna s više platformi) -Comment[ca]=Aplicació IGU CMake Qt4. Genera una aplicació IGU basada en CMake/Qt4 (multi plataforma) -Comment[ca@valencia]=Aplicació IGU CMake Qt4. Genera una aplicació IGU basada en CMake/Qt4 (multi plataforma) -Comment[da]=Qt4 CMake GUI-program. Genererer et CMake-/Qt4-baseret GUI-program (krydsplatform kompatibelt) -Comment[de]=Qt4/CMake-GUI-Anwendung. Eine auf CMake und Qt4 basierende GUI-Anwendung (plattformunabhängig) erstellen. -Comment[el]=Qt4 CMake Gui εφαρμογή. Δημιουργία μιας CMake/Qt4 εφαρμογής με γραφικό περιβάλλον (συμβατή με πολλαπλές πλατφόρμες) -Comment[en_GB]=Qt4 CMake Gui application. Generate a CMake/Qt4 based GUI application (crossplatform compatible) -Comment[es]=Aplicación con interfaz gráfica Qt4 CMake. Genera una aplicación con interfaz gráfica basada en CMake/Qt4 (compatible multiplataforma) -Comment[et]=Qt4 CMake GUI rakendus. Rakenduse loomine CMake/Qt4 põhjal (mitmeplatvormne) -Comment[fi]=Qt4 CMake Gui -sovellus. Generoi CMake/Qt4-perustainen graafinen käyttöliittymäsovellus (toimii useissa käyttöjärjestelmissä) -Comment[fr]=Application avec interface graphique CMake pour Qt4. Génère une application avec interface graphique utilisant CMake / Qt4 (compatible multi-plate-forme) -Comment[ga]=Feidhmchlár grafach CMake Qt4. Cruthaigh feidhmchlár grafach bunaithe ar CMake/Qt4 (feidhmchlár trasardáin) -Comment[gl]=Programa gráfico con CMake para Qt4. Xera un programa con GUI baseado en CMake/Qt4 (compatíbel con multiplataforma) -Comment[hu]=Qt4 CMake grafikus felületű alkalmazás. Előállít egy CMake/Qt4 alapú grafikus felületű alkalmazást (keresztplatform kompatibilis) -Comment[it]=Applicazione GUI CMake in Qt4. Genera un'applicazione con GUI basata su CMake/Qt4 (multipiattaforma) -Comment[kk]=Qt4 CMake GUI бағдарламасы. CMake/Qt4 негіздеген графикалық интерфейсті бағдарламаны жасап береді (кроссплатформалық үлесімді) -Comment[nb]=Qt4 Cmake Gui-program. Lag et program med grafisk brukerflate basert på CMake/Qt4 (kryssplattform-kompatibelt) -Comment[nds]=Qt4-CMake-Böversietprogramm. En op CMake un Qt4 opbuut Böversiet-Programm opstellen (över Bedriefümgeven weg kompatibel) -Comment[nl]=Gui-toepassing van Qt4 CMake. Genereert een op CMake/Qt4 gebaseerd GUI-programma (crossplatform compatibel) -Comment[pl]=Program Qt4 CMake Gui. Generuj programy oparte o CMake/Qt4 (kompatybilne na wielu platformach) -Comment[pt]=Aplicação gráfica do Qt4 com CMake. Gera uma aplicação gráfica baseada no CMake/Qt4 (compatível com várias plataformas) -Comment[pt_BR]=Aplicativo gráfico com CMake para Qt4. Gera um aplicativo de interface em CMake/Qt4 (compatível com várias plataformas) -Comment[ru]=Графическое приложение для Qt4 и CMake. Создаёт графическое кроссплатформенное приложение на базе CMake/Qt4. -Comment[sk]=Ústredná aplikácia Qt4 CMake Gui. Generuje GUI aplikáciu založenú na CMake/Qt4 (cross-platformovo kompatibilné) -Comment[sl]=Program z uporabniškim vmesnikom Qt4 CMake. Ustvari program temelječ na CMake/Qt4 (združljiv z več okolji) -Comment[sv]=Qt4 CMake-program med grafiskt användargränssnitt. Skapa ett CMake/Qt4-baserat program med grafiskt användargränssnitt (som fungerar på flera plattformar) -Comment[tr]=Qt4 CMake Gui uygulaması. CMake/Qt4 tabanlı GUI uygulaması oluştur (çapraz platform uyumlu) -Comment[uk]=Програма Qt4 з графічним інтерфейсом і системою збирання CMake. Створити графічну програму, засновану на CMake/Qt4 (сумісну з декількома платформами) -Comment[x-test]=xxQt4 CMake Gui application. Generate a CMake/Qt4 based GUI application (crossplatform compatible)xx -Comment[zh_CN]=生成基于 CMake/Qt4 的图形应用程序(跨平台兼容) -Comment[zh_TW]=Qt4 CMake 使用者介面應用程式。產生一個 CMake/Qt4 為基礎的使用者介面應用程式(跨平台相容) -ShowFilesAfterGeneration=%{PROJECTDIR}/src/%{APPNAMELC}.cpp -Category=Qt/Graphical -ValidProjectName=^[a-zA-Z_][a-zA-Z0-9_]+$ diff --git a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/main.cpp b/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/main.cpp deleted file mode 100644 index 70fb6bd0..00000000 --- a/kdevelop/app_templates/cpp/CMake/cmake_qt4gui/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include "%{APPNAME}.h" - - -int main(int argc, char** argv) -{ - QApplication app(argc, argv); - %{APPNAMEID} %{APPNAMELC}; - %{APPNAMELC}.show(); - return app.exec(); -} diff --git a/kdevelop/config.h.cmake b/kdevelop/config.h.cmake deleted file mode 100644 index 8147cdf8..00000000 --- a/kdevelop/config.h.cmake +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef KDEVELOP_CONFIG_H -#define KDEVELOP_CONFIG_H - -/* config.h. Generated by cmake from config.h.cmake */ - -#define VERSION "@KDEVELOP_VERSION_MAJOR@.@KDEVELOP_VERSION_MINOR@.@KDEVELOP_VERSION_PATCH@" -#define VERSION_MAJOR "@KDEVELOP_VERSION_MAJOR@" -#define VERSION_MINOR "@KDEVELOP_VERSION_MINOR@" -#define VERSION_PATCH "@KDEVELOP_VERSION_PATCH@" - -#endif // KDEVELOP_CONFIG_H diff --git a/kdevelop/debuggers/CMakeLists.txt b/kdevelop/debuggers/CMakeLists.txt deleted file mode 100644 index 592c1fcb..00000000 --- a/kdevelop/debuggers/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -if(NOT WIN32) - add_subdirectory(gdb) -endif(NOT WIN32) - diff --git a/kdevelop/debuggers/gdb/.kateconfig b/kdevelop/debuggers/gdb/.kateconfig deleted file mode 100644 index 545fb4f0..00000000 --- a/kdevelop/debuggers/gdb/.kateconfig +++ /dev/null @@ -1,2 +0,0 @@ -kate: space-indent on; indent-width 4; replace-tabs on; tab-width 4; auto-insert-doxygen on; indent-mode cstyle; - diff --git a/kdevelop/debuggers/gdb/CMakeLists.txt b/kdevelop/debuggers/gdb/CMakeLists.txt deleted file mode 100644 index a44b8a40..00000000 --- a/kdevelop/debuggers/gdb/CMakeLists.txt +++ /dev/null @@ -1,174 +0,0 @@ -project(gdb) - -function(add_debuggable_executable target) - cmake_parse_arguments(add_debuggable_executable "" "" "SRCS" ${ARGN}) - add_executable(${target} ${add_debuggable_executable_SRCS}) - # force debug symbols for our debuggees, disable optimizations - if (WIN32) - set(_flags "/0d") - else() - set(_flags "-O0") - endif() - set_target_properties(${target} PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} ${_flags}") -endfunction() - -macro_optional_find_package(KDE4Workspace) - -macro_log_feature( KDE4WORKSPACE_FOUND -"KDE 4 Workspace" "KDE 4 Workspace libraries" "kdebase/workspace" FALSE -"" "Required for building the process selection dialog for attaching GDB to a running process." -) - -if(KDE4WORKSPACE_FOUND) - include_directories( - ${KDE4WORKSPACE_INCLUDE_DIR} - ) - add_definitions( - -DKDEV_ENABLE_GDB_ATTACH_DIALOG - ) -endif(KDE4WORKSPACE_FOUND) - -if (CMAKE_VERSION VERSION_GREATER "2.9" OR NOT CMAKE_GENERATOR MATCHES "Ninja") - set(HAVE_PATH_WITH_SPACES_TEST TRUE) -else() - message(WARNING "Disabling 'path with spaces' test, this CMake version would create a faulty build.ninja file. Upgrade to at least CMake v3.0") -endif() - -add_subdirectory(unittests) -add_subdirectory(printers) - -add_definitions( -DKDE_DEFAULT_DEBUG_AREA=9012 ) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -#add_subdirectory(tests) - -########### next target ############### - -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") - -set(kdevgdb_PART_SRCS - gdb.cpp - debuggerplugin.cpp - gdbcommandqueue.cpp - gdbcommand.cpp - gdbparser.cpp - stty.cpp - disassemblewidget.cpp - memviewdlg.cpp - gdboutputwidget.cpp -# debuggertracingdialog.cpp - breakpointcontroller.cpp - mi/gdbmi.cpp - mi/milexer.cpp - mi/miparser.cpp - stringhelpers.cpp - debugsession.cpp - gdblaunchconfig.cpp - debugjob.cpp - selectcoredialog.cpp - variablecontroller.cpp - gdbframestackmodel.cpp - gdbvariable.cpp - registers/registersview.cpp - registers/registercontroller.cpp - registers/registersmanager.cpp - registers/registercontroller_x86.cpp - registers/registercontroller_arm.cpp - registers/modelsmanager.cpp - registers/converters.cpp - debuggertracingdialog.ui - debuggerconfigwidget.ui - selectcore.ui - selectaddress.ui - registers/registersview.ui -) - -if(KDE4WORKSPACE_FOUND) - set(kdevgdb_PART_SRCS - ${kdevgdb_PART_SRCS} - processselection.cpp - ) -endif(KDE4WORKSPACE_FOUND) - -kde4_add_plugin(kdevgdb ${kdevgdb_PART_SRCS}) -target_link_libraries(kdevgdb ${KDEVPLATFORM_SUBLIME_LIBRARIES} - ${KDEVPLATFORM_INTERFACES_LIBRARIES} - ${KDEVPLATFORM_LANGUAGE_LIBRARIES} - ${KDEVPLATFORM_DEBUGGER_LIBRARIES} - ${KDEVPLATFORM_OUTPUTVIEW_LIBRARIES} - ${KDEVPLATFORM_PROJECT_LIBRARIES} - ${KDE4_KDEUI_LIBS} - ${KDEVPLATFORM_UTIL_LIBRARIES} - ${KDE4_KTEXTEDITOR_LIBS} - ${KDE4WORKSPACE_PROCESSUI_LIBS} -) - -install(TARGETS kdevgdb DESTINATION ${PLUGIN_INSTALL_DIR}) - - -########### next target ############### - -set(gdbtest_PART_SRCS - unittests/gdbtest.cpp - gdb.cpp - gdbcommandqueue.cpp - gdbcommand.cpp - gdbparser.cpp - stty.cpp - disassemblewidget.cpp - memviewdlg.cpp - gdboutputwidget.cpp -# debuggertracingdialog.cpp - breakpointcontroller.cpp - mi/gdbmi.cpp - mi/milexer.cpp - mi/miparser.cpp - stringhelpers.cpp - debugsession.cpp - variablecontroller.cpp - gdbframestackmodel.cpp - gdbvariable.cpp - registers/registersview.cpp - registers/registercontroller.cpp - registers/registersmanager.cpp - registers/registercontroller_x86.cpp - registers/registercontroller_arm.cpp - registers/modelsmanager.cpp - registers/converters.cpp - debuggertracingdialog.ui - selectaddress.ui - registers/registersview.ui -) - -if(KDE4WORKSPACE_FOUND) - set(gdbtest_PART_SRCS - ${gdbtest_PART_SRCS} - processselection.cpp - ) -endif(KDE4WORKSPACE_FOUND) - -kde4_add_test(gdbtest ${gdbtest_PART_SRCS}) -target_link_libraries(gdbtest - ${QT_QTTEST_LIBRARY} - ${KDEVPLATFORM_SHELL_LIBRARIES} - ${KDEVPLATFORM_INTERFACES_LIBRARIES} - ${KDEVPLATFORM_PROJECT_LIBRARIES} - ${KDEVPLATFORM_DEBUGGER_LIBRARIES} - ${KDEVPLATFORM_TESTS_LIBRARIES} - ${KDEVPLATFORM_UTIL_LIBRARIES} - ${KDE4_KIO_LIBS} - ${KDE4_KTEXTEDITOR_LIBS} - ${KDE4_KPARTS_LIBRARY} - ${KDE4WORKSPACE_PROCESSUI_LIBS} -) - -if (HAVE_PATH_WITH_SPACES_TEST) - set_target_properties(gdbtest PROPERTIES COMPILE_FLAGS "-DHAVE_PATH_WITH_SPACES_TEST") -endif() - -########### install files ############### - -configure_file(kdevgdb.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdevgdb.desktop) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdevgdb.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install( FILES kdevgdbui.rc DESTINATION ${DATA_INSTALL_DIR}/kdevgdb ) diff --git a/kdevelop/debuggers/gdb/DESIGN.txt b/kdevelop/debuggers/gdb/DESIGN.txt deleted file mode 100644 index ddefb700..00000000 --- a/kdevelop/debuggers/gdb/DESIGN.txt +++ /dev/null @@ -1,113 +0,0 @@ - -This document describes the design of KDevelop's debugger part. Note that it's -a work in progress, and sometimes describes desired design, not the actual -one. - -== Components and lifecycle == - -Debugger part consists of low-lever "controller" that handles talking -with gdb and remembering what state gdb is in, a number of view widgets, showing -the state of the program, and a number of places where user can click to -affect the program. - -What makes them all work together are "events" that controller sends -to all interested parties. They are: - - - Debugger exited. All view classes and actions become disabled and hidden - - Program exited. All view classes that can't be used without program - become disabled. - - Debugger is busy executing a command. All actions become disabled. - - Debugger is waiting for command. All actions becomes enabled. - - Program state changed. All views flush all cached data and - reload the content. - - Current thread/stack frame changed. All views switch to showing that - thread/frame. - -The distinction between "program state change" and "thread/frame" changed is -that the latter does not imply that any *data* changed, and so it's not -necessary to clear already cached data for other threads. - -== Command execution == - -The controller has a queue of commands to send to gdb. A command typically -has a callback (pair of QObject* and a member pointer) to be called when -command is done. - -When the queue is non-empty, and debugger is not busy executing the previous -command, the controller will send the command from the queue top to the gdb. -The command being executed is remembed in the currentCmd_ member variable. -Gdb will reply with a number of "out-of-band" responses, followed by one -"done" or "error" response. - -The "done"/"error" response, when using MI interface, is a tree-line structure -that's parsed with into GDBMI::ResultRecord structure, that is then passed -to callback assocaited with the current command. Say, for "get me value of -expression" command, MI response includes textual "value" field that can be -used by any part of GUI to show the value. After callback is called, -controller deletes the current command and then tries to execute next one from -the queue, if there's one. - -The commands related to running program (continue/step/etc) are handled in -a bit special way. Instead of calling any callbacks, controller performs -predefined set of steps: - - - Decide what's the reason for stop, and maybe do something special - - - For stop on shared lib load, just continue - - - For stop on breakpoint, run the breakpoint commands if any. - - - Set a flag that program state might have changed, and must be reloaded - - - Since hitting tracepoint adds extra commands, including possibly - "continue", we don't start reloading widgets immediately, instead - we wait for all commands currently in queue to get executed. - - - Once there are no commands in queue, and "reload_program_state" flag is - set, we raise the 'program_state_changed' event. All widgets react to - that by queueing commands for realoding their state. - - - - - - - - - - - - - -Note that all commands are executed in the order they were queued, so if you -add several commands at the same time, they are executed "automically". Each -one sees the gdb state that the previous one has left it in. - -The MI protocol is stateful, that is there are things like current thread -and current stack that affect the meaning of commands. Take care to never -switch such "current" variables unless it's explicitly asked by the user. -This means that if you have to switch thread/frame, always switch it back -as the last command in a sequences. - - -== Breakpoints handling == - -Whenever a new breakpoint is added, or an existing breakpoint is modified, -we immediately try to send the proper commands to gdb. Note that we -don't try to check which properties of breakpoint were modified, we -just send all breakpoint data. - -This is not always possible, because debugger might be busy, or just -not started yet. In this case, we set 'pending' flag for breakpoint. Each time -the debugger becomes free, we try to send the pending breakpoint again. - - - - - - - - - - - diff --git a/kdevelop/debuggers/gdb/Messages.sh b/kdevelop/debuggers/gdb/Messages.sh deleted file mode 100644 index c756f94f..00000000 --- a/kdevelop/debuggers/gdb/Messages.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -$EXTRACTRC `find . -name \*.rc` `find . -name \*.ui` >>rc.cpp -find . \( -name \*.cc -o -name \*.cpp -o -name \*.h \) -print0 | xargs -0 $XGETTEXT -o $podir/kdevgdb.pot -rm -f rc.cpp diff --git a/kdevelop/debuggers/gdb/TODO.txt b/kdevelop/debuggers/gdb/TODO.txt deleted file mode 100644 index 6387d09a..00000000 --- a/kdevelop/debuggers/gdb/TODO.txt +++ /dev/null @@ -1,199 +0,0 @@ - -Near term: - - - Implemment handling of debugger exit in GDB class - - - Implement locals. - - - Revive breakpoint tracing. - -KDEV4 Debugger overall: - - - Launch framework - - - On fly launch types -- "dbus call to connect to a given app" - - - Advanced data visualization - - - Customizable by the user - - - Assembler display that's good - - - Hex display that's good - - - Register display that is good. - - - Debugger scripts? Remembering and replaying a set of - commands? - - - Debugger as a visualizer tool? - - -TODO: - - - P1: - - - Breakpoints duplicated on editing. - - - Global radix - - - Hiding of static members. - - - No horizonal scrollbar in the variables widget. - - - Debugging optimized binaries - - - Debugged application somtimes not killed. - - - Fix moving breakpoints on editing files - - - Pressing tab in memory range dialog modified the edited file. - - - Testing stepping into code for which gdb can't find the file or fullname. - Test stepping (or stepi) into undebuggable code. - - - Test files without debug info - - - Reconsider fixed font in variable widget - - - Investigate 'stop on shlib load breaking next" on Dario's project. - - - Incoming bug reports: - - - Fix remote target dialog, which is confusing and requires - to specify tree scripts! - - - Big projects - - - Add support for other special types (STL) - - - Breakpoints - - - Add shortcuts to context menu. - - - Add icons - - - Status display column is just ugly - - - Handle "out of breakpoints" message. - - - Implement gdb -> KDevelop breakpoint addition for all existing - breakpoint types. - - - - - For function breakpoints, the 'file' property of breakpoint from - gdb is not a fullname (gdb 6.4), so we don't find the file. - - - For function breakpoints with gdb CVS, clicking on marker corresponding - to function breakpoint does not clear it, but adds a new one. - - - "Immediately leave function" breakpoint type. - - - - Watchpoints redux: - - - Fix status display for watchpoints - - - Test loading of read watchpoints from session file. - - - Change "toogle watchpoint" into checkbox. - - - "Read watchpoint triggered" message disappears too soon. - - - - Fix up the mess with relative vs. full names of files for breakpoints. - - - UI cleanup: - - - The dialog box on watchpoint hit draws slowly initially. - - - Cntrl-Enter for "add watch". - - - Close all opened thread when opening other? - - - The dialog box shown in MI errors is ugly. Often, it contains names - of internal gdb functions, or no interest to outsiders. - - - Should strip formatting when copying from gdb output window. - - Console command interaction: - - - Handle "Program exited" messages from CLI "continue". - - - Code cleanup: - - - Rename FileLine to Code. - - - Kill raw char* manipulation. - - - Fix hardcoded color in framestack widget - - - Kill 'trimmableItem'. - - Minor tweaks: - - - Need some "scope" for error reporting. Say, we can try to set invalid - breakpoint condition from session file, on debugger startup. Need to - produce message like: - "Error detected when setting condition for breakpoint 1", - not a pretty opaque error we get now. - - - Highlight type changes in variable widget - - - Highlight composite types changes? - - - Test that modifying breakpoint while application is running works. - - - If remembered expresion includes dereferences pointer as a child, - that child is still updated as we step. - - - Error in 'finish' command (e.g. on the outer frame) hides the - current line indicator. - - - Should disable the 'finish' command on the outer frame. - - Optimizations: - - - If we're in some function and looked at frame 0 and frame 1, and - then run "finish", we need to reuse VarFrameRoot for previous frame - 1, which now became frame 0, no need to recreate it. Generally, need - to preserve open/closed state of all variables for all scopes. - - - - - - -BUGS/ISSUES found: - - - "set edit off" breaks MI - - no stop reason for stop on shared library load - - using "interpreter mi -whatever" when already in MI - mode causes gdb to output two "^done" messages and - it confuses us. - - No support for "character" format in -data-evaluate-expression - or -var-set-format - - Some of the -stack* command operate on current frame unless one is - specified, but -stack-list-arguments will print all frames. - - - Output of -thread-list-ids uses the following syntax - - {thread-id="1",thread-id="2"} - - which is neither tuple nor list. - - - Pending breakpoits broken in MI. - - - - Varobj broken: - - - When entering new scope, we need to issue -stack-list-locals - to get names of new varaibles in that scope. - - - When stopping inside undebuggable code (say, on watchpoint hit), - -file-list-exec-source-file reports the last valid source file. - - - It's not possible to find if inferiour is running or not. diff --git a/kdevelop/debuggers/gdb/breakpointcontroller.cpp b/kdevelop/debuggers/gdb/breakpointcontroller.cpp deleted file mode 100644 index a3486c2e..00000000 --- a/kdevelop/debuggers/gdb/breakpointcontroller.cpp +++ /dev/null @@ -1,571 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - Copyright (C) 2006, 2008 Vladimir Prus - Copyright (C) 2007 Hamish Rodda - Copyright (C) 2009 Niko Sams - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include "breakpointcontroller.h" - -#include -#include - -#include -#include -#include -#include - -#include "gdbcommand.h" -#include "debugsession.h" - -using namespace GDBMI; - -namespace GDBDebugger { - - -QString quoteExpression(QString expr) -{ - expr.replace('"', "\\\""); - expr = expr.prepend('"').append('"'); - return expr; -} -QString unquoteExpression(QString expr) -{ - if (expr.left(1) == QString('"') && expr.right(1) == QString('"')) { - expr = expr.mid(1, expr.length()-2); - expr.replace("\\\"", "\""); - } - return expr; -} - -struct Handler : public GDBCommandHandler -{ - Handler(BreakpointController *c, KDevelop::Breakpoint *b) - : controller(c), breakpoint(b) {} - - BreakpointController *controller; - KDevelop::Breakpoint *breakpoint; -}; - -struct UpdateHandler : public Handler -{ - UpdateHandler(BreakpointController *c, KDevelop::Breakpoint *b, KDevelop::Breakpoint::Column col) - : Handler(c, b), m_column(col) {} - - void handle(const GDBMI::ResultRecord &r) - { - if (r.reason == "error") { - controller->error(breakpoint, r["msg"].literal(), m_column); - kWarning() << r["msg"].literal(); - } else { - controller->m_errors[breakpoint].remove(m_column); - } - controller->m_dirty[breakpoint].remove(m_column); - controller->breakpointStateChanged(breakpoint); - controller->sendMaybe(breakpoint); - } - virtual bool handlesError() { return true; } -private: - KDevelop::Breakpoint::Column m_column; -}; - -struct InsertedHandler : public Handler -{ - InsertedHandler(BreakpointController *c, KDevelop::Breakpoint *b) - : Handler(c, b) {} - - virtual void handle(const GDBMI::ResultRecord &r) - { - kDebug() << controller->m_dirty[breakpoint]; - - if (r.reason == "error") { - controller->error(breakpoint, r["msg"].literal(), KDevelop::Breakpoint::LocationColumn); - kWarning() << r["msg"].literal(); - } else { - controller->m_errors[breakpoint].remove(KDevelop::Breakpoint::LocationColumn); - if (r.hasField("bkpt")) { - controller->update(breakpoint, r["bkpt"]); - } else if (r.hasField("wpt")) { - // For watchpoint creation, GDB basically does not say - // anything. Just record id. - controller->m_ids[breakpoint] = r["wpt"]["number"].literal(); - } else if (r.hasField("hw-rwpt")) { - controller->m_ids[breakpoint] = r["hw-rwpt"]["number"].literal(); - } else if (r.hasField("hw-awpt")) { - controller->m_ids[breakpoint] = r["hw-awpt"]["number"].literal(); - } - Q_ASSERT(!controller->m_ids[breakpoint].isEmpty()); - kDebug() << "breakpoint id" << breakpoint << controller->m_ids[breakpoint]; - } - controller->m_dirty[breakpoint].remove(KDevelop::Breakpoint::LocationColumn); - controller->breakpointStateChanged(breakpoint); - controller->sendMaybe(breakpoint); - } - - virtual bool handlesError() { return true; } -}; - -struct DeletedHandler : public Handler -{ - DeletedHandler(BreakpointController *c, KDevelop::Breakpoint *b) - : Handler(c, b) {} - - void handle(const GDBMI::ResultRecord &r) - { - Q_UNUSED(r); - controller->m_ids.remove(breakpoint); - if (!breakpoint->deleted()) { - kDebug() << "delete finished, but was not really deleted (it was just modified)"; - controller->sendMaybe(breakpoint); - } else { - delete breakpoint; - } - } -}; - - -BreakpointController::BreakpointController(DebugSession* parent) - : KDevelop::IBreakpointController(parent), m_interrupted(false) -{ - Q_ASSERT(parent); - // FIXME: maybe, all debugger components should derive from - // a base class that does this connect. - connect(debugSession(), SIGNAL(event(IDebugSession::event_t)), - this, SLOT(slotEvent(IDebugSession::event_t))); - connect(parent, SIGNAL(programStopped(GDBMI::ResultRecord)), SLOT(programStopped(GDBMI::ResultRecord))); -} - -DebugSession *BreakpointController::debugSession() const -{ - Q_ASSERT(QObject::parent()); - return static_cast(const_cast(QObject::parent())); -} - - -void BreakpointController::slotEvent(IDebugSession::event_t e) -{ - switch(e) { - case IDebugSession::program_state_changed: - if (m_interrupted) { - m_interrupted = false; - } else { - debugSession()->addCommand( - new GDBCommand(GDBMI::BreakList, - "", - this, - &BreakpointController::handleBreakpointList)); - } - break; - - case IDebugSession::connected_to_program: - { - kDebug() << "connected to program"; - - //load breakpoints the user might have added through eg .gdbinit on startup - //*before* sending, so we avoid getting duplicates - debugSession()->addCommand( - new GDBCommand(GDBMI::BreakList, - "", - this, - &BreakpointController::handleBreakpointListInitial)); - - break; - } - case IDebugSession::debugger_exited: - { - break; - } - default: - break; - } -} - -void BreakpointController::handleBreakpointListInitial(const GDBMI::ResultRecord &r) -{ - if (!breakpointModel()) return; - - m_dontSendChanges++; - - const GDBMI::Value& blist = r["BreakpointTable"]["body"]; - - for(int i = 0, e = blist.size(); i != e; ++i) - { - KDevelop::Breakpoint *updateBreakpoint = 0; - const GDBMI::Value& mi_b = blist[i]; - QString type = mi_b["type"].literal(); - foreach(KDevelop::Breakpoint *b, breakpointModel()->breakpoints()) { - if ((type == "watchpoint" || type == "hw watchpoint") && b->kind() == KDevelop::Breakpoint::WriteBreakpoint) { - if (unquoteExpression(mi_b["original-location"].literal()) == b->expression()) { - updateBreakpoint = b; - } - } else if (type == "read watchpoint" && b->kind() == KDevelop::Breakpoint::ReadBreakpoint) { - if (unquoteExpression(mi_b["original-location"].literal()) == b->expression()) { - updateBreakpoint = b; - } - } else if (type == "acc watchpoint" && b->kind() == KDevelop::Breakpoint::AccessBreakpoint) { - if (unquoteExpression(mi_b["original-location"].literal()) == b->expression()) { - updateBreakpoint = b; - } - } else if (b->kind() == KDevelop::Breakpoint::CodeBreakpoint) { - QString condition; - if (mi_b.hasField("cond")) { - condition = mi_b["cond"].literal(); - } - if (condition != b->condition()) - continue; - - QString location; - QString line; - if (mi_b.hasField("fullname") && mi_b.hasField("line")) { - location = unquoteExpression(mi_b["fullname"].literal()); - line = mi_b["line"].literal(); - if (location == b->url().pathOrUrl(KUrl::RemoveTrailingSlash) && line.toInt() - 1 == b->line()) { - updateBreakpoint = b; - } else { - kDebug() << location << ":" << line << "!=" << b->location(); - } - } - if (updateBreakpoint) { - break; - } - - if (mi_b.hasField("original-location")) { - location = mi_b["original-location"].literal(); - kDebug() << "location" << location; - QRegExp rx("^(.+):(\\d+)$"); - if (rx.indexIn(location) != -1) { - if (unquoteExpression(rx.cap(1)) == b->url().pathOrUrl(KUrl::RemoveTrailingSlash) && rx.cap(2).toInt() - 1 == b->line()) { - updateBreakpoint = b; - } else { - kDebug() << "!=" << b->location(); - } - } else if (location == b->location()) { - updateBreakpoint = b; - } - }else if (mi_b.hasField("what") && mi_b["what"].literal() == "exception throw") { - if (b->expression() == "catch throw") { - updateBreakpoint = b; - } - }else{ - kWarning() << "That's too bad, breakpoint doesn't contain \"original-location\" field "; - } - } - if (updateBreakpoint) break; - } - - if (updateBreakpoint) { - update(updateBreakpoint, mi_b); - } else { - //ignore, we will load them in the first pause anyway - } - } - - m_dontSendChanges--; - - sendMaybeAll(); -} - -void BreakpointController::sendMaybe(KDevelop::Breakpoint* breakpoint) -{ - if (debugSession()->stateIsOn(s_dbgNotStarted)) { - return; - } - - bool addedCommand = false; - - /** See what is dirty, and send the changes. For simplicity, send - changes one-by-one and call sendMaybe again in the completion - handler. - FIXME: should handle and annotate the errors? - */ - kDebug() << breakpoint << breakpoint->location(); - if (breakpoint->deleted()) - { - kDebug() << "deleted"; - m_dirty.remove(breakpoint); - m_errors.remove(breakpoint); - if (m_ids.contains(breakpoint)) { //if id is 0 breakpoint insertion is still pending, InsertedHandler will call sendMaybe again and delete it - kDebug() << "breakpoint id" << m_ids[breakpoint]; - if (!m_ids[breakpoint].isEmpty()) { - debugSession()->addCommandToFront( - new GDBCommand(BreakDelete, m_ids[breakpoint], - new DeletedHandler(this, breakpoint))); - addedCommand = true; - } - } else { - kDebug() << "breakpoint doesn't have yet an id, just delete it"; - delete breakpoint; - } - } - else if (m_dirty[breakpoint].contains(KDevelop::Breakpoint::LocationColumn)) { - kDebug() << "location changed"; - if (m_ids.contains(breakpoint) && !m_ids[breakpoint].isEmpty()) { - /* We already have GDB breakpoint for this, so we need to remove - this one. */ - kDebug() << "We already have GDB breakpoint for this, so we need to remove this one"; - debugSession()->addCommandToFront( - new GDBCommand(BreakDelete, m_ids[breakpoint], - new DeletedHandler(this, breakpoint))); - addedCommand = true; - } else { - m_ids[breakpoint] = QString(); //add to m_ids so we don't delete it while insert command is still pending - if (breakpoint->kind() == KDevelop::Breakpoint::CodeBreakpoint) { - QString location; - if (breakpoint->line() != -1) { - location = quoteExpression(breakpoint->url().pathOrUrl(KUrl::RemoveTrailingSlash)) + ':' + QString::number(breakpoint->line()+1); - } else { - location = breakpoint->location(); - } - if (breakpoint->expression() == "catch throw") { - debugSession()->addCommand( - new GDBCommand(GDBMI::NonMI, - location)); - breakpoint->setDeleted(); - }else{ - debugSession()->addCommandToFront( - new GDBCommand(BreakInsert, - quoteExpression(location), - new InsertedHandler(this, breakpoint))); - } - addedCommand = true; - } else { - QString opt; - if (breakpoint->kind() == KDevelop::Breakpoint::ReadBreakpoint) - opt = "-r "; - else if (breakpoint->kind() == KDevelop::Breakpoint::AccessBreakpoint) - opt = "-a "; - - debugSession()->addCommandToFront( - new GDBCommand( - BreakWatch, - opt + quoteExpression(breakpoint->location()), - new InsertedHandler(this, breakpoint))); - addedCommand = true; - } - } - } else if (m_dirty[breakpoint].contains(KDevelop::Breakpoint::EnableColumn)) { - if (m_ids.contains(breakpoint) && !m_ids[breakpoint].isEmpty()) { - debugSession()->addCommandToFront( - new GDBCommand(breakpoint->enabled() ? BreakEnable : BreakDisable, - m_ids[breakpoint], - new UpdateHandler(this, breakpoint, KDevelop::Breakpoint::EnableColumn))); - addedCommand = true; - } - } else if (m_dirty[breakpoint].contains(KDevelop::Breakpoint::IgnoreHitsColumn)) { - if (m_ids.contains(breakpoint) && !m_ids[breakpoint].isEmpty()) { - debugSession()->addCommandToFront( - new GDBCommand(BreakAfter, - QString("%0 %1").arg(m_ids[breakpoint]).arg(breakpoint->ignoreHits()), - new UpdateHandler(this, breakpoint, KDevelop::Breakpoint::IgnoreHitsColumn))); - addedCommand = true; - } - } else if (m_dirty[breakpoint].contains(KDevelop::Breakpoint::ConditionColumn)) { - if (m_ids.contains(breakpoint) && !m_ids[breakpoint].isEmpty()) { - debugSession()->addCommandToFront( - new GDBCommand(BreakCondition, - QString("%0 %1").arg(m_ids[breakpoint]).arg(breakpoint->condition()), - new UpdateHandler(this, breakpoint, KDevelop::Breakpoint::ConditionColumn))); - addedCommand = true; - } - } - if (addedCommand && debugSession()->state() == KDevelop::IDebugSession::ActiveState) { - if (m_interrupted) { - kDebug() << "dbg is busy, already interrupting"; - } else { - kDebug() << "dbg is busy, interrupting"; - m_interrupted = true; - debugSession()->interruptDebugger(); - debugSession()->addCommand(ExecContinue); //continue right after interrupting, if other breakpoint related commands queue up they get inserted before continue (as addCommandToFront is used) - } - } -} - -void BreakpointController::handleBreakpointList(const GDBMI::ResultRecord &r) -{ - if (!breakpointModel()) return; - - m_dontSendChanges++; - - const GDBMI::Value& blist = r["BreakpointTable"]["body"]; - - /* Remove breakpoints that are gone in GDB. In future, we might - want to inform the user that this happened. */ - QSet present_in_gdb; - for (int i = 0, e = blist.size(); i != e; ++i) - { - present_in_gdb.insert(blist[i]["number"].literal()); - } - - foreach (KDevelop::Breakpoint *b, breakpointModel()->breakpoints()) { - if (m_ids.contains(b) && !present_in_gdb.contains(m_ids[b])) { - breakpointModel()->removeRow(breakpointModel()->breakpointIndex(b, 0).row()); - } - } - - QString previousType; - for(int i = 0, e = blist.size(); i != e; ++i) - { - const GDBMI::Value& mi_b = blist[i]; - QString id = mi_b["number"].literal(); - - KDevelop::Breakpoint* b = m_ids.key(id); - if (!b) { - QString type; - if (mi_b.hasField("type")) { - type = mi_b["type"].literal(); - } else { - //happens for breakpoints with multiple locations (the following ones don't contain a type) - type = previousType; - } - if (type == "watchpoint" || type == "hw watchpoint") { - b = breakpointModel()->addWatchpoint(); - } else if (type == "read watchpoint") { - b = breakpointModel()->addReadWatchpoint(); - } else if (type == "acc watchpoint") { - b = breakpointModel()->addAccessWatchpoint(); - } else { - //for multiple breakpoints(constructor/destructor... ) show only the parent breakpoint(1, 1.1, 1.2, ... only 1), because all other can be usefull only in dissasembleWidget. - if(mi_b.hasField("number") && !mi_b["number"].literal().contains(".")){ - b = breakpointModel()->addCodeBreakpoint(); - }else{ - continue; - } - } - previousType = type; - } - - update(b, mi_b); - } - - m_dontSendChanges--; -} - -void BreakpointController::update(KDevelop::Breakpoint *breakpoint, const GDBMI::Value &b) -{ - m_dontSendChanges++; - - m_ids[breakpoint] = b["number"].literal(); - - if (b.hasField("original-location")) { - if (breakpoint->address().isEmpty()) { - /* If the address is not empty, it means that the breakpoint - is set by KDevelop, not by the user, and that we want to - show the original expression, not the address, in the table. - TODO: this also means that if used added a watchpoint in gdb - like "watch foo", then we'll show it in the breakpoint table - just fine, but after KDevelop restart, we'll try to add the - breakpoint using basically "watch *&(foo)". I'm not sure if - that's a problem or not. */ - QString location = b["original-location"].literal(); - kDebug() << "location" << location; - if (breakpoint->kind() == KDevelop::Breakpoint::CodeBreakpoint) { - QRegExp rx("^(.+):(\\d+)$"); - if (rx.indexIn(location) != -1) { - breakpoint->setLocation(KUrl(unquoteExpression(rx.cap(1))), rx.cap(2).toInt()-1); - } else { - //for regular expression breakpoints and not only... - if(b.hasField("fullname") && b.hasField("line")){ - breakpoint->setLocation(KUrl(unquoteExpression(b["fullname"].literal())), b["line"].toInt()-1); - }else{ - breakpoint->setData(KDevelop::Breakpoint::LocationColumn, unquoteExpression(location)); - } - } - } else { - breakpoint->setData(KDevelop::Breakpoint::LocationColumn, unquoteExpression(location)); - } - } - } else if (b.hasField("what") && b["what"].literal() == "exception throw") { - breakpoint->setExpression("catch throw"); - } else { - kWarning() << "That's too bad, breakpoint doesn't contain \"original-location\" field "; - } - - if (!m_dirty[breakpoint].contains(KDevelop::Breakpoint::ConditionColumn) - && !m_errors[breakpoint].contains(KDevelop::Breakpoint::ConditionColumn)) - { - if (b.hasField("cond")) { - breakpoint->setData(KDevelop::Breakpoint::ConditionColumn, b["cond"].literal()); - } - } - - if (b.hasField("addr") && b["addr"].literal() == "") { - m_pending.insert(breakpoint); - } else { - m_pending.remove(breakpoint); - } - - if (b.hasField("times")) { - setHitCount(breakpoint, b["times"].toInt()); - } else { - setHitCount(breakpoint, -1); - } - - if (b.hasField("ignore")) { - breakpoint->setIgnoreHits(b["ignore"].toInt()); - } else { - breakpoint->setIgnoreHits(0); - } - - m_dontSendChanges--; -} - -void BreakpointController::programStopped(const GDBMI::ResultRecord& r) -{ - QString reason; - if (r.hasField("reason")) { - reason = r["reason"].literal(); - } - kDebug() << reason; - - /* This method will not do the right thing if we hit a breakpoint - that is added in GDB outside kdevelop. In this case we'll - first try to find the breakpoint, and fail, and only then - update the breakpoint table and notice the new one. */ - - QString id; - if (reason == "breakpoint-hit") { - id = r["bkptno"].literal(); - } else if (reason == "watchpoint-trigger") { - id = r["wpt"]["number"].literal(); - } else if (reason == "read-watchpoint-trigger") { - id = r["hw-rwpt"]["number"].literal(); - } else if (reason == "access-watchpoint-trigger") { - id = r["hw-awpt"]["number"].literal(); - } - if (!id.isEmpty()) { - QString msg; - if (r.hasField("value")) { - if (r["value"].hasField("old")) { - msg += i18n("
Old value: %1", r["value"]["old"].literal()); - } - if (r["value"].hasField("new")) { - msg += i18n("
New value: %1", r["value"]["new"].literal()); - } - } - KDevelop::Breakpoint* b = m_ids.key(id); - if (b) { - hit(b, msg); - } - } -} - - -} - -#include "moc_breakpointcontroller.cpp" diff --git a/kdevelop/debuggers/gdb/breakpointcontroller.h b/kdevelop/debuggers/gdb/breakpointcontroller.h deleted file mode 100644 index 1b8ae0e8..00000000 --- a/kdevelop/debuggers/gdb/breakpointcontroller.h +++ /dev/null @@ -1,83 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - Copyright (C) 2007 Hamish Rodda - Copyright (C) 2009 Niko Sams - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -#ifndef BREAKPOINTCONTROLLER_H -#define BREAKPOINTCONTROLLER_H - -#include - -#include -#include - -#include "gdbglobal.h" - -class QModelIndex; - -namespace GDBMI { -struct ResultRecord; -struct Value; -} - -namespace GDBDebugger -{ -using namespace KDevelop; - -class DebugSession; -struct InsertedHandler; -struct UpdateHandler; -struct DeletedHandler; -/** -* Handles signals from the editor that relate to breakpoints and the execution -* point of the debugger. -* We may change, add or remove breakpoints in this class. -*/ -class BreakpointController : public IBreakpointController -{ - Q_OBJECT - -public: - BreakpointController(DebugSession* parent); - -private slots: - void slotEvent(IDebugSession::event_t); - void programStopped(const GDBMI::ResultRecord &r); - -private: - DebugSession* debugSession() const; - - virtual void sendMaybe(KDevelop::Breakpoint *breakpoint); - - void handleBreakpointListInitial(const GDBMI::ResultRecord &r); - void handleBreakpointList(const GDBMI::ResultRecord &r); - - void update(KDevelop::Breakpoint *b, const GDBMI::Value& v); - - friend struct InsertedHandler; - friend struct UpdateHandler; - friend struct DeletedHandler; - - QMap m_ids; - bool m_interrupted; -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/debuggerconfigwidget.ui b/kdevelop/debuggers/gdb/debuggerconfigwidget.ui deleted file mode 100644 index fae8898c..00000000 --- a/kdevelop/debuggers/gdb/debuggerconfigwidget.ui +++ /dev/null @@ -1,328 +0,0 @@ - - - DebuggerConfigWidget - - - - 0 - 0 - 698 - 483 - - - - Debugger Configuration - - - - - - - - - - - - Debugger - - - - - - - 0 - 0 - - - - Debugger executable: - - - false - - - kcfg_gdbPath - - - - - - - Gdb executable - - - To run "gdb" binary from $PATH, leave this field empty. To run custom gdb, for example, for a different architecture, enter the executable name here. You can either run gdb from $PATH, but with a different name (say, "arm-gdb"), by typing the name here, or specify full path to the gdb executable. - - - - - - - - 0 - 0 - - - - <html><head/><body><p>If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments</p><p>Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debbuger --debuggerArguments. So script.sh <span style=" font-weight:600;">must</span> invoke &quot;debugger&quot; executable manually.</p></body></html> - - - - - - &Shell script: - - - false - - - kcfg_debuggingShell - - - - - - - <html><head/><body><p>If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments</p><p>Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debbuger --debuggerArguments. So script.sh <span style=" font-weight:600;">must</span> invoke &quot;debugger&quot; executable manually.</p></body></html> - - - <html><head/><body><p><br/></p></body></html> - - - - - - - - - - Options - - - - QFormLayout::ExpandingFieldsGrow - - - - - Display static &members: - - - kcfg_displayStaticMembers - - - - - - - Displaying static members makes GDB slower in -producing data within KDE and Qt. -It may change the "signature" of the data -which QString and friends rely on, -but if you need to debug into these values then -check this option. - - - - - - - - - - Display &demangled names: - - - kcfg_asmDemangle - - - - - - - When displaying the disassembled code you -can select to see the methods' mangled names. -However, non-mangled names are easier to read. - - - - - - - - - - Start Debugger with: - - - kcfg_startWith - - - - - - - - Application Output - - - - - GDB Console - - - - - Frame Stack - - - - - - - - - - - This script is intended for the actual commands needed to connect to a remotely running executable. - shell sleep 5 wait for remote program to start - target remote ... connect to the remote debugger - continue [optional] run debugging to the first breakpoint - - - Remote Debugging - - - - - - <html><head/><body><p>Script to start remote application</p><p></p><p>This shell script is run after the Gdb Config script has been sourced by gdb.</p><p>It's purpose is to actually start the remote process.</p><p>1) Find a way to execute a command remotely - rsh, ssh, telnet, ...</p><p>2a) Execute &quot;gdbserver ... application&quot; on target.</p><p>or if your executable contains the gdb stub:</p><p>2b) Execute &quot;application&quot; on target.</p></body></html> - - - R&un shell script: - - - false - - - kcfg_runShellScript - - - - - - - <html><head/><body><p>Script to start remote application</p><p></p><p>This shell script is run after the Gdb Config script has been sourced by gdb.</p><p>It's purpose is to actually start the remote process.</p><p>1) Find a way to execute a command remotely - rsh, ssh, telnet, ...</p><p>2a) Execute &quot;gdbserver ... application&quot; on target.</p><p>or if your executable contains the gdb stub:</p><p>2b) Execute &quot;application&quot; on target.</p></body></html> - - - - - - - - - - <html><head/><body><p>This script is sourced by gdb when the debugging starts.</p></body></html> - - - Gdb &config script: - - - false - - - kcfg_configGdbScript - - - - - - - <html><head/><body><p>Script to connect with remote application</p><p>For example:</p><p> shell sleep 5 #wait for remote program to start</p><p> target remote ... #connect to the remote debugger</p><p> continue #[optional] run debugging to the first breakpoint.</p></body></html> - - - - - - - - - - <html><head/><body><p>Script to connect with remote application</p><p>For example:</p><p> shell sleep 5 #wait for remote program to start</p><p> target remote ... #connect to the remote debugger</p><p> continue #[optional] run debugging to the first breakpoint.</p></body></html> - - - Run &gdb script: - - - false - - - kcfg_runGdbScript - - - - - - - <html><head/><body><p>This script is sourced by gdb when the debugging starts.</p></body></html> - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - KUrlRequester - QFrame -
kurlrequester.h
-
-
- - kcfg_gdbPath - kcfg_debuggingShell - kcfg_displayStaticMembers - kcfg_asmDemangle - kcfg_startWith - kcfg_configGdbScript - kcfg_runShellScript - kcfg_runGdbScript - - - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - - - -
diff --git a/kdevelop/debuggers/gdb/debuggerplugin.cpp b/kdevelop/debuggers/gdb/debuggerplugin.cpp deleted file mode 100644 index f58c44d6..00000000 --- a/kdevelop/debuggers/gdb/debuggerplugin.cpp +++ /dev/null @@ -1,434 +0,0 @@ -// /* -// * GDB Debugger Support -// * -// * Copyright 1999-2001 John Birch -// * Copyright 2001 by Bernd Gehrmann -// * Copyright 2006 Vladimir Prus -// * Copyright 2007 Hamish Rodda -// * -// * 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 2 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, write to the -// * Free Software Foundation, Inc., -// * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// */ - -#include "debuggerplugin.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "disassemblewidget.h" -#ifdef KDEV_ENABLE_GDB_ATTACH_DIALOG -#include "processselection.h" -#endif -#include "memviewdlg.h" -#include "gdbparser.h" -#include "gdboutputwidget.h" -#include "gdbglobal.h" -#include "debugsession.h" -#include "selectcoredialog.h" - -#include -#include "gdblaunchconfig.h" -#include "debugjob.h" - - -namespace GDBDebugger -{ - -K_PLUGIN_FACTORY(CppDebuggerFactory, registerPlugin(); ) -K_EXPORT_PLUGIN(CppDebuggerFactory(KAboutData("kdevgdb","kdevgdb", ki18n("GDB Support"), "0.1", ki18n("This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more."), KAboutData::License_GPL))) - -template -class DebuggerToolFactory : public KDevelop::IToolViewFactory -{ -public: - DebuggerToolFactory(CppDebuggerPlugin* plugin, const QString &id, Qt::DockWidgetArea defaultArea) - : m_plugin(plugin), m_id(id), m_defaultArea(defaultArea) - {} - - virtual QWidget* create(QWidget *parent = 0) - { - return new T(m_plugin, parent); - } - - virtual QString id() const - { - return m_id; - } - - virtual Qt::DockWidgetArea defaultPosition() - { - return m_defaultArea; - } - - virtual void viewCreated(Sublime::View* view) - { - if (view->widget()->metaObject()->indexOfSignal(QMetaObject::normalizedSignature("requestRaise()")) != -1) - QObject::connect(view->widget(), SIGNAL(requestRaise()), view, SLOT(requestRaise())); - } - - /* At present, some debugger widgets (e.g. breakpoint) contain actions so that shortcuts - work, but they don't need any toolbar. So, suppress toolbar action. */ - virtual QList toolBarActions( QWidget* viewWidget ) const - { - Q_UNUSED(viewWidget); - return QList(); - } - -private: - CppDebuggerPlugin* m_plugin; - QString m_id; - Qt::DockWidgetArea m_defaultArea; -}; - -CppDebuggerPlugin::CppDebuggerPlugin( QObject *parent, const QVariantList & ) : - KDevelop::IPlugin( CppDebuggerFactory::componentData(), parent ), - m_config(KGlobal::config(), "GDB Debugger"), m_session(0) -{ - KDEV_USE_EXTENSION_INTERFACE( KDevelop::IStatus ) - - core()->debugController()->initializeUi(); - - setXMLFile("kdevgdbui.rc"); - - disassemblefactory = new DebuggerToolFactory( - this, "org.kdevelop.debugger.DisassemblerView", Qt::BottomDockWidgetArea); - - gdbfactory = new DebuggerToolFactory( - this, "org.kdevelop.debugger.ConsoleView",Qt::BottomDockWidgetArea); - - core()->uiController()->addToolView( - i18n("Disassemble/Registers"), - disassemblefactory); - - core()->uiController()->addToolView( - i18n("GDB"), - gdbfactory); - - memoryviewerfactory = new DebuggerToolFactory( - this, "org.kdevelop.debugger.MemoryView", Qt::BottomDockWidgetArea); - core()->uiController()->addToolView( - i18n("Memory"), - memoryviewerfactory); - - setupActions(); - - setupDBus(); - - QList plugins = KDevelop::ICore::self()->pluginController()->allPluginsForExtension("org.kdevelop.IExecutePlugin"); - foreach(IPlugin* plugin, plugins) { - IExecutePlugin* iface = plugin->extension(); - Q_ASSERT(iface); - KDevelop::LaunchConfigurationType* type = core()->runController()->launchConfigurationTypeForId( iface->nativeAppConfigTypeId() ); - Q_ASSERT(type); - type->addLauncher( new GdbLauncher( this, iface ) ); - } - // The output from tracepoints goes to "application" window, because - // we don't have any better alternative, and using yet another window - // is undesirable. Besides, this makes tracepoint look even more similar - // to printf debugging. -// PORTING TODO broken - need intermediate signal? -// connect( gdbBreakpointWidget, SIGNAL(tracingOutput(QByteArray)), -// procLineMaker, SLOT(slotReceivedStdout(QByteArray))); -} - -void CppDebuggerPlugin::unload() -{ - core()->uiController()->removeToolView(disassemblefactory); - core()->uiController()->removeToolView(gdbfactory); - core()->uiController()->removeToolView(memoryviewerfactory); -} - -void CppDebuggerPlugin::setupActions() -{ - KActionCollection* ac = actionCollection(); - - KAction* action = new KAction(KIcon("core"), i18n("Examine Core File..."), this); - action->setToolTip( i18n("Examine core file") ); - action->setWhatsThis( i18n("Examine core file

" - "This loads a core file, which is typically created " - "after the application has crashed, e.g. with a " - "segmentation fault. The core file contains an " - "image of the program memory at the time it crashed, " - "allowing you to do a post-mortem analysis.

") ); - connect(action, SIGNAL(triggered(bool)), this, SLOT(slotExamineCore())); - ac->addAction("debug_core", action); - - #ifdef KDEV_ENABLE_GDB_ATTACH_DIALOG - action = new KAction(KIcon("connect_creating"), i18n("Attach to Process"), this); - action->setToolTip( i18n("Attach to process...") ); - action->setWhatsThis(i18n("Attach to process

Attaches the debugger to a running process.

")); - connect(action, SIGNAL(triggered(bool)), this, SLOT(slotAttachProcess())); - ac->addAction("debug_attach", action); - #endif -} - -void CppDebuggerPlugin::setupDBus() -{ - m_drkonqiMap = new QSignalMapper(this); - connect(m_drkonqiMap, SIGNAL(mapped(QObject*)), this, SLOT(slotDebugExternalProcess(QObject*))); - - QDBusConnectionInterface* dbusInterface = QDBusConnection::sessionBus().interface(); - foreach (const QString& service, dbusInterface->registeredServiceNames().value()) - slotDBusServiceRegistered(service); - - QDBusServiceWatcher* watcher = new QDBusServiceWatcher(this); - connect(watcher, SIGNAL(serviceRegistered(QString)), - this, SLOT(slotDBusServiceRegistered(QString))); - connect(watcher, SIGNAL(serviceUnregistered(QString)), - this, SLOT(slotDBusServiceUnregistered(QString))); -} - -void CppDebuggerPlugin::slotDBusServiceRegistered( const QString& service ) -{ - if (service.startsWith("org.kde.drkonqi")) { - // New registration - QDBusInterface* drkonqiInterface = new QDBusInterface(service, "/krashinfo", QString(), QDBusConnection::sessionBus(), this); - m_drkonqis.insert(service, drkonqiInterface); - - connect(drkonqiInterface, SIGNAL(acceptDebuggingApplication()), m_drkonqiMap, SLOT(map())); - m_drkonqiMap->setMapping(drkonqiInterface, drkonqiInterface); - - drkonqiInterface->call("registerDebuggingApplication", i18n("KDevelop")); - } -} - -void CppDebuggerPlugin::slotDBusServiceUnregistered( const QString& service ) -{ - if (service.startsWith("org.kde.drkonqi")) { - // Deregistration - if (m_drkonqis.contains(service)) - delete m_drkonqis.take(service); - } -} - -void CppDebuggerPlugin::slotDebugExternalProcess(QObject* interface) -{ - QDBusReply reply = static_cast(interface)->call("pid"); - - if (reply.isValid()) { - attachProcess(reply.value()); - QTimer::singleShot(500, this, SLOT(slotCloseDrKonqi())); - - m_drkonqi = m_drkonqis.key(static_cast(interface)); - } - - KDevelop::ICore::self()->uiController()->activeMainWindow()->raise(); -} - -void CppDebuggerPlugin::slotCloseDrKonqi() -{ - if (!m_drkonqi.isEmpty()) { - QDBusInterface drkonqiInterface(m_drkonqi, "/MainApplication", "org.kde.KApplication"); - drkonqiInterface.call("quit"); - m_drkonqi.clear(); - } -} - -CppDebuggerPlugin::~CppDebuggerPlugin() -{ - GDBParser::destroy(); -} - - -void CppDebuggerPlugin::initializeGuiState() -{ -} - -KDevelop::ContextMenuExtension CppDebuggerPlugin::contextMenuExtension( KDevelop::Context* context ) -{ - KDevelop::ContextMenuExtension menuExt = KDevelop::IPlugin::contextMenuExtension( context ); - - if( context->type() != KDevelop::Context::EditorContext ) - return menuExt; - - KDevelop::EditorContext *econtext = dynamic_cast(context); - if (!econtext) - return menuExt; - - m_contextIdent = econtext->currentWord(); - - //bool running = m_session && m_session->isRunning(); - - // If debugger is running, we insert items at the top. - // The reason is user has explicitly run the debugger, so he's - // surely debugging, not editing code or something. So, first - // menu items should be about debugging, not some copy/paste/cut - // things. - //if (!running) - //popup->addSeparator(); - - if (!m_contextIdent.isEmpty()) - { - // PORTING TODO - //QString squeezed = KStringHandler::csqueeze(m_contextIdent, 30); - QAction* action = new QAction( i18n("Evaluate: %1", m_contextIdent), this); - connect(action, SIGNAL(triggered(bool)), this, SLOT(contextEvaluate())); - action->setWhatsThis(i18n("Evaluate expression

Shows the value of the expression under the cursor.

")); - menuExt.addAction( KDevelop::ContextMenuExtension::DebugGroup, action); - - action = new QAction( i18n("Watch: %1", m_contextIdent), this); - connect(action, SIGNAL(triggered(bool)), this, SLOT(contextWatch())); - action->setWhatsThis(i18n("Watch expression

Adds an expression under the cursor to the Variables/Watch list.

")); - menuExt.addAction( KDevelop::ContextMenuExtension::DebugGroup, action); - } - - return menuExt; -} - -void CppDebuggerPlugin::contextWatch() -{ - emit addWatchVariable(m_contextIdent); -} - -void CppDebuggerPlugin::contextEvaluate() -{ - emit evaluateExpression(m_contextIdent); -} - -DebugSession* CppDebuggerPlugin::createSession() -{ - DebugSession *session = new DebugSession(); - KDevelop::ICore::self()->debugController()->addSession(session); - connect(session, SIGNAL(showMessage(QString,int)), SLOT(controllerMessage(QString,int))); - connect(session, SIGNAL(reset()), SIGNAL(reset())); - connect(session, SIGNAL(finished()), SLOT(slotFinished())); - connect(session, SIGNAL(raiseGdbConsoleViews()), SIGNAL(raiseGdbConsoleViews())); - return session; -} - -void CppDebuggerPlugin::slotExamineCore() -{ - emit showMessage(this, i18n("Choose a core file to examine..."), 1000); - - SelectCoreDialog dlg(KDevelop::ICore::self()->uiController()->activeMainWindow()); - if (dlg.exec() == KDialog::Rejected) { - return; - } - - emit showMessage(this, i18n("Examining core file %1", dlg.core().toLocalFile()), 1000); - - DebugSession* session = createSession(); - session->examineCoreFile(dlg.binary(), dlg.core()); - - KillSessionJob *job = new KillSessionJob(session); - job->setObjectName(i18n("Debug core file")); - core()->runController()->registerJob(job); - job->start(); -} - -#ifdef KDEV_ENABLE_GDB_ATTACH_DIALOG -void CppDebuggerPlugin::slotAttachProcess() -{ - emit showMessage(this, i18n("Choose a process to attach to..."), 1000); - - ProcessSelectionDialog dlg; - if (!dlg.exec() || !dlg.pidSelected()) - return; - - int pid = dlg.pidSelected(); - if(QApplication::applicationPid()==pid) - KMessageBox::error(KDevelop::ICore::self()->uiController()->activeMainWindow(), - i18n("Not attaching to process %1: cannot attach the debugger to itself.", pid)); - else - attachProcess(pid); -} -#endif - -void CppDebuggerPlugin::attachProcess(int pid) -{ - emit showMessage(this, i18n("Attaching to process %1", pid), 1000); - - DebugSession* session = createSession(); - session->attachToProcess(pid); - - KillSessionJob *job = new KillSessionJob(session); - job->setObjectName(i18n("Debug process %1", pid)); - core()->runController()->registerJob(job); - job->start(); -} - -// Used to disable breakpoint actions when non-text document selected - -// save/restore partial project session - -KConfigGroup CppDebuggerPlugin::config() const -{ - return m_config; -} - -QString CppDebuggerPlugin::statusName() const -{ - return i18n("Debugger"); -} - -void CppDebuggerPlugin::slotFinished() -{ - /* TODO: is this required? - Q_ASSERT(dynamic_cast(sender())); - DebugSession* session = static_cast(sender()); - */ -} - -void CppDebuggerPlugin::controllerMessage( const QString& msg, int timeout ) -{ - emit showMessage(this, msg, timeout); -} - -} - -#include "moc_debuggerplugin.cpp" diff --git a/kdevelop/debuggers/gdb/debuggerplugin.h b/kdevelop/debuggers/gdb/debuggerplugin.h deleted file mode 100644 index 0ec300a4..00000000 --- a/kdevelop/debuggers/gdb/debuggerplugin.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 1999-2001 John Birch - * Copyright 2001 by Bernd Gehrmann - * Copyright 2007 Hamish Rodda - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _DEBUGGERPART_H_ -#define _DEBUGGERPART_H_ - -#include -#include -#include - -#include -#include - -#include -#include - -class QLabel; -class QMenu; -class QDBusInterface; -class QSignalMapper; -class KDialog; -class ProcessWidget; - -class KToolBar; -class KAction; - -namespace KDevelop { -class Context; -class ProcessLineMaker; -} - -namespace GDBDebugger -{ -class GDBBreakpointWidget; -class FramestackWidget; -class DisassembleWidget; -class Breakpoint; -class GDBOutputWidget; -class MemoryViewerWidget; -class DebugSession; -template class DebuggerToolFactory; - -class CppDebuggerPlugin : public KDevelop::IPlugin, public KDevelop::IStatus -{ - Q_OBJECT - Q_INTERFACES(KDevelop::IStatus) - -public: - friend class DebugSession; - - CppDebuggerPlugin( QObject *parent, const QVariantList & = QVariantList() ); - ~CppDebuggerPlugin(); - - virtual void unload(); - - virtual KDevelop::ContextMenuExtension contextMenuExtension( KDevelop::Context* ); - - DebugSession *createSession(); - -public: - //BEGIN IStatus - virtual QString statusName() const; - -Q_SIGNALS: - void clearMessage(KDevelop::IStatus*); - void showMessage(KDevelop::IStatus*, const QString & message, int timeout = 0); - void hideProgress(KDevelop::IStatus*); - void showProgress(KDevelop::IStatus*, int minimum, int maximum, int value); - void showErrorMessage(const QString&, int); - //END IStatus - - void addWatchVariable(const QString& variable); - void evaluateExpression(const QString& variable); - - void raiseGdbConsoleViews(); - - void reset(); - -private Q_SLOTS: - void setupDBus(); - void slotDebugExternalProcess(QObject* interface); - void contextEvaluate(); - void contextWatch(); - - void slotExamineCore(); - #ifdef KDEV_ENABLE_GDB_ATTACH_DIALOG - void slotAttachProcess(); - #endif - - void slotDBusServiceRegistered(const QString& service); - void slotDBusServiceUnregistered(const QString& service); - - void slotCloseDrKonqi(); - - void slotFinished(); - - void controllerMessage(const QString&, int); - -Q_SIGNALS: - //TODO: port to launch framework - //void startDebugger(const KDevelop::IRun & run, KJob* job); - void stopDebugger(); - void attachTo(int pid); - void coreFile(const QString& core); - void runUntil(const KUrl& url, int line); - void jumpTo(const KUrl& url, int line); - -protected: - virtual void initializeGuiState(); - -private: - KConfigGroup config() const; - - void attachProcess(int pid); - void setupActions(); - - QHash m_drkonqis; - QSignalMapper* m_drkonqiMap; - QString m_drkonqi; - - QString m_contextIdent; - - // Set to true after each debugger restart - // Currently used to auto-show variables view - // on the first pause. - bool justRestarted_; - - KConfigGroup m_config; - - DebugSession* m_session; - DebuggerToolFactory< DisassembleWidget >* disassemblefactory; - DebuggerToolFactory< GDBOutputWidget >* gdbfactory; - DebuggerToolFactory< MemoryViewerWidget >* memoryviewerfactory; -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/debuggertracingdialog.cpp b/kdevelop/debuggers/gdb/debuggertracingdialog.cpp deleted file mode 100644 index 6eac91a9..00000000 --- a/kdevelop/debuggers/gdb/debuggertracingdialog.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Dialog for configuring breakpoint tracing. - * - * Copyright 2006 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "debuggertracingdialog.h" -#include "breakpoint.h" - -#include -#include -#include -#include -#include - -/* WARNING: this code was not yet ported to KDevelop4 and is unused, but is - intended to be ported. */ - -namespace GDBDebugger -{ - - DebuggerTracingDialog - ::DebuggerTracingDialog(Breakpoint* bp, - QWidget* parent) - : QDialog(parent), bp_(bp) - { - setupUi(this); - - expressions->setButtons(KEditListBox::Add | KEditListBox::Remove); - - connect(enable, SIGNAL(stateChanged(int)), - this, SLOT(enableOrDisable(int))); - - connect(enableCustomFormat, SIGNAL(stateChanged(int)), - this, SLOT(enableOrDisableCustomFormat(int))); - - enable->setChecked(bp_->tracingEnabled()); - expressions->setItems(bp_->tracedExpressions()); - enableCustomFormat->setChecked(bp_->traceFormatStringEnabled()); - customFormat->setText(bp_->traceFormatString()); - - enableOrDisable(enable->isChecked()); - - // Go away if the breakpoint does - connect(bp_, SIGNAL(destroyed(QObject*)), this, SLOT(reject())); - } - - void DebuggerTracingDialog::enableOrDisable(int state) - { - bool enable = (state == Qt::Checked); - - expressionsLabel->setEnabled(enable); - expressions->setEnabled(enable); - enableCustomFormat->setEnabled(enable); - customFormat->setEnabled(enable && enableCustomFormat->isChecked()); - } - - void DebuggerTracingDialog::enableOrDisableCustomFormat(int state) - { - customFormat->setEnabled(state == Qt::Checked); - } - - void DebuggerTracingDialog::accept() - { - // Check that if we use format string, - // the number of expression is not larget than the number of - // format specifiers - bool ok = true; - - if (enableCustomFormat->isChecked()) - { - QString s = customFormat->text(); - int percent_count = 0; - for (int i = 0; i < s.length(); ++i) - if (s[i] == '%') - { - if (i+1 < s.length()) - { - if (s[i+1] != '%') - { - ++percent_count; - } - else - { - // Double % - ++i; - } - } - } - - if (percent_count < expressions->items().count()) - { - ok = false; - - KMessageBox::error( - this, - "Not enough format specifiers" - "

The number of format specifiers in the custom format " - "string is less than the number of expressions. Either remove " - "some expressions or edit the format string.", - "Not enough format specifiers"); - } - } - - if (ok) - { - bp_->setTracingEnabled(enable->isChecked()); - bp_->setTracedExpressions(expressions->items()); - bp_->setTraceFormatStringEnabled(enableCustomFormat->isChecked()); - bp_->setTraceFormatString(customFormat->text()); - QDialog::accept(); - } - } - -} diff --git a/kdevelop/debuggers/gdb/debuggertracingdialog.h b/kdevelop/debuggers/gdb/debuggertracingdialog.h deleted file mode 100644 index 7c42adb6..00000000 --- a/kdevelop/debuggers/gdb/debuggertracingdialog.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Vladimir Prus * - * ghost@cs.msu.su * - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - - -#ifndef DEBUGGER_TRACING_DIALOG_VP_2005_08_22 -#define DEBUGGER_TRACING_DIALOG_VP_2005_08_22 - -#include "ui_debuggertracingdialog.h" -#include - -namespace GDBDebugger -{ - class Breakpoint; - - class DebuggerTracingDialog : public QDialog, public Ui::DebuggerTracingDialog - { - Q_OBJECT - public: - DebuggerTracingDialog(Breakpoint* bp, QWidget* parent); - - private Q_SLOTS: - void enableOrDisable(int); - void enableOrDisableCustomFormat(int); - - private: - void accept(); - - private: - Breakpoint* bp_; - }; -} - -#endif diff --git a/kdevelop/debuggers/gdb/debuggertracingdialog.ui b/kdevelop/debuggers/gdb/debuggertracingdialog.ui deleted file mode 100644 index e27e510d..00000000 --- a/kdevelop/debuggers/gdb/debuggertracingdialog.ui +++ /dev/null @@ -1,159 +0,0 @@ - - DebuggerTracingDialog - - - - 0 - 0 - 433 - 409 - - - - Tracing Configuration - - - - - - <b>Enable tracing</b> -<p>Tracing is a mechanism to automatically print values of the chosen expressions and continue execution when breakpoint is hit. You can think of it as printf debugging that does not require modifying the source.</p> - - - Enable tracing - - - - - - - Cancel - - - - - - - false - - - Custom format string - - - - - - - OK - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 40 - 20 - - - - - - - - false - - - <b>Custom format string</b> -<p>Specify a C-style format string that will be used when printing the chosen expression. For example: -<p align="center"> <tt>Tracepoint 1: g = %d</tt></p> -If custom format string is not enabled, names and values of all expressions will be printed, using "%d" as format specifier for all expressions. - - - - - - - false - - - - - - - - - - false - - - Expressions to print: - - - false - - - - - - - - KEditListBox - QGroupBox -

keditlistbox.h
- - - KLineEdit - QLineEdit -
klineedit.h
-
- - - keditlistbox.h - klineedit.h - - - - - okButton - clicked() - DebuggerTracingDialog - accept() - - - 20 - 20 - - - 20 - 20 - - - - - cancelButton - clicked() - DebuggerTracingDialog - reject() - - - 20 - 20 - - - 20 - 20 - - - - - diff --git a/kdevelop/debuggers/gdb/debugjob.cpp b/kdevelop/debuggers/gdb/debugjob.cpp deleted file mode 100644 index 2807484b..00000000 --- a/kdevelop/debuggers/gdb/debugjob.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* -* GDB Debugger Support -* -* Copyright 2006 Vladimir Prus -* Copyright 2007 Hamish Rodda -* Copyright 2009 Andreas Pakulat -* -* 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 2 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, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "debugjob.h" -#include "debuggerplugin.h" -#include -#include -#include -#include -#include -#include -#include "debugsession.h" - -#include - -using namespace GDBDebugger; -using namespace KDevelop; - -DebugJob::DebugJob( GDBDebugger::CppDebuggerPlugin* p, KDevelop::ILaunchConfiguration* launchcfg, IExecutePlugin* execute, QObject* parent) - : KDevelop::OutputJob(parent) - , m_launchcfg( launchcfg ) - , m_execute( execute ) -{ - setCapabilities(Killable); - - m_session = p->createSession(); - connect(m_session, SIGNAL(applicationStandardOutputLines(QStringList)), SLOT(stderrReceived(QStringList))); - connect(m_session, SIGNAL(applicationStandardErrorLines(QStringList)), SLOT(stdoutReceived(QStringList))); - connect(m_session, SIGNAL(finished()), SLOT(done()) ); - - setObjectName(launchcfg->name()); -} - -void DebugJob::start() -{ - KConfigGroup grp = m_launchcfg->config(); - KDevelop::EnvironmentGroupList l(KGlobal::config()); - Q_ASSERT(m_execute); - QString err; - QString executable = m_execute->executable( m_launchcfg, err ).toLocalFile(); - - if( !err.isEmpty() ) - { - setError( -1 ); - setErrorText( err ); - emitResult(); - return; - } - - if(!QFileInfo(executable).isExecutable()){ - setError( -1 ); - setErrorText(QString("'%1' is not an executable").arg(executable)); - emitResult(); - return; - } - - QStringList arguments = m_execute->arguments( m_launchcfg, err ); - if( !err.isEmpty() ) - { - setError( -1 ); - setErrorText( err ); - } - if( error() != 0 ) - { - emitResult(); - return; - } - - setStandardToolView(KDevelop::IOutputView::DebugView); - setBehaviours(KDevelop::IOutputView::Behaviours(KDevelop::IOutputView::AllowUserClose) | KDevelop::IOutputView::AutoScroll); - setModel( new KDevelop::OutputModel ); - setTitle(m_launchcfg->name()); - - QString startWith = grp.readEntry(GDBDebugger::startWithEntry, QString("ApplicationOutput")); - if (startWith == "GdbConsole") { - setVerbosity(Silent); - } else if (startWith == "FrameStack") { - setVerbosity(Silent); - } else { - setVerbosity(Verbose); - } - - startOutput(); - - m_session->startProgram( m_launchcfg, m_execute ); -} - -bool DebugJob::doKill() -{ - kDebug(); - m_session->stopDebugger(); - return true; -} - -void DebugJob::stderrReceived(const QStringList& l ) -{ - if (KDevelop::OutputModel* m = model()) { - m->appendLines( l ); - } -} - -void DebugJob::stdoutReceived(const QStringList& l ) -{ - if (KDevelop::OutputModel* m = model()) { - m->appendLines( l ); - } -} - -KDevelop::OutputModel* DebugJob::model() -{ - return dynamic_cast( KDevelop::OutputJob::model() ); -} - - -void DebugJob::done() -{ - emitResult(); -} - - -KillSessionJob::KillSessionJob(DebugSession *session, QObject* parent): KJob(parent), m_session(session) -{ - connect(m_session, SIGNAL(finished()), SLOT(sessionFinished())); - setCapabilities(Killable); -} - -void KillSessionJob::start() -{ - //NOOP -} - -bool KillSessionJob::doKill() -{ - m_session->stopDebugger(); - return true; -} - -void KillSessionJob::sessionFinished() -{ - emitResult(); -} diff --git a/kdevelop/debuggers/gdb/debugjob.h b/kdevelop/debuggers/gdb/debugjob.h deleted file mode 100644 index d026069a..00000000 --- a/kdevelop/debuggers/gdb/debugjob.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -* GDB Debugger Support -* -* Copyright 2006 Vladimir Prus -* Copyright 2007 Hamish Rodda -* Copyright 2009 Andreas Pakulat -* -* 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 2 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, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -#ifndef GDBDEBUGJOB -#define GDBDEBUGJOB - -#include - -class IExecutePlugin; -namespace KDevelop -{ -class OutputModel; -class ILaunchConfiguration; -} - -namespace GDBDebugger -{ -class CppDebuggerPlugin; -class DebugSession; - - -class DebugJob : public KDevelop::OutputJob -{ -Q_OBJECT -public: - DebugJob( GDBDebugger::CppDebuggerPlugin* p, KDevelop::ILaunchConfiguration* launchcfg, - IExecutePlugin* plugin, QObject* parent = 0 ); - virtual void start(); -protected: - virtual bool doKill(); -private slots: - void stdoutReceived(const QStringList&); - void stderrReceived(const QStringList&); - void done(); -private: - KDevelop::OutputModel* model(); - DebugSession* m_session; - KDevelop::ILaunchConfiguration* m_launchcfg; - IExecutePlugin* m_execute; -}; - -//this job is just here to be able to kill the debug session -class KillSessionJob : public KJob -{ -Q_OBJECT -public: - KillSessionJob(DebugSession *session, QObject *parent = 0); - virtual void start(); -protected: - virtual bool doKill(); -private: - DebugSession* m_session; -private slots: - void sessionFinished(); -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/debugsession.cpp b/kdevelop/debuggers/gdb/debugsession.cpp deleted file mode 100644 index 0f523035..00000000 --- a/kdevelop/debuggers/gdb/debugsession.cpp +++ /dev/null @@ -1,1496 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 1999-2001 John Birch - * Copyright 2001 by Bernd Gehrmann - * Copyright 2006 Vladimir Prus - * Copyright 2007 Hamish Rodda - * Copyright 2009 Niko Sams - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "debugsession.h" - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "breakpointcontroller.h" -#include "variablecontroller.h" -#include "gdb.h" -#include "gdbcommandqueue.h" -#include "stty.h" -#include "gdbframestackmodel.h" - -using namespace KDevelop; - -namespace GDBDebugger { - -DebugSession::DebugSession() - : KDevelop::IDebugSession(), - m_sessionState(NotStartedState), - justRestarted_(false), - m_config(KGlobal::config(), "GDB Debugger"), - commandQueue_(new CommandQueue), - m_tty(0), - state_(s_dbgNotStarted|s_appNotStarted), - state_reload_needed(false), - stateReloadInProgress_(false) -{ - configure(); - - // FIXME: this poking at parent's member variable is bad. - // Introduce functions to set them? - m_breakpointController = new BreakpointController(this); - m_variableController = new VariableController(this); - - m_procLineMaker = new KDevelop::ProcessLineMaker(this); - - connect( m_procLineMaker, SIGNAL(receivedStdoutLines(QStringList)), - this, SIGNAL(applicationStandardOutputLines(QStringList))); - connect( m_procLineMaker, SIGNAL(receivedStderrLines(QStringList)), - this, SIGNAL(applicationStandardErrorLines(QStringList)) ); - setupController(); -} - -// Deleting the session involves shutting down gdb nicely. -// When were attached to a process, we must first detach so that the process -// can continue running as it was before being attached. gdb is quite slow to -// detach from a process, so we must process events within here to get a "clean" -// shutdown. -DebugSession::~DebugSession() -{ - kDebug(); - - if (!stateIsOn(s_dbgNotStarted)) { - stopDebugger(); - // This currently isn't working, so comment out until it can be resolved - at the moment it just causes a delay on stopping kdevelop - //m_process->waitForFinished(); - } - - delete commandQueue_; -} - -KDevelop::IDebugSession::DebuggerState DebugSession::state() const { - return m_sessionState; -} - -#define ENUM_NAME(o,e,v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v))) -void DebugSession::setSessionState(DebuggerState state) -{ - kDebug() << "STATE CHANGED" << this << state << ENUM_NAME(IDebugSession, DebuggerState, state); - if (state != m_sessionState) { - m_sessionState = state; - emit stateChanged(state); - } -} - -KDevelop::IFrameStackModel* DebugSession::createFrameStackModel() -{ - return new GdbFrameStackModel(this); -} - -void DebugSession::setupController() -{ - // variableTree -> gdbBreakpointWidget -// connect( variableTree, SIGNAL(toggleWatchpoint(QString)), -// gdbBreakpointWidget, SLOT(slotToggleWatchpoint(QString))); - - // controller -> procLineMaker - connect( this, SIGNAL(ttyStdout(QByteArray)), - m_procLineMaker, SLOT(slotReceivedStdout(QByteArray))); - connect( this, SIGNAL(ttyStderr(QByteArray)), - m_procLineMaker, SLOT(slotReceivedStderr(QByteArray))); - -// connect(statusBarIndicator, SIGNAL(doubleClicked()), -// controller, SLOT(explainDebuggerStatus())); - - // TODO: reimplement / re-enable - //connect(this, SIGNAL(addWatchVariable(QString)), controller->variables(), SLOT(slotAddWatchVariable(QString))); - //connect(this, SIGNAL(evaluateExpression(QString)), controller->variables(), SLOT(slotEvaluateExpression(QString))); -} - -void DebugSession::_gdbStateChanged(DBGStateFlags oldState, DBGStateFlags newState) -{ - QString message; - - DBGStateFlags changedState = oldState ^ newState; - - if (changedState & s_dbgNotStarted) { - if (newState & s_dbgNotStarted) { - message = i18n("Debugger stopped"); - - } else { - setSessionState(StartingState); - } - - //core()->running(this, false); - // TODO enable/disable tool views as applicable - } - - // As soon as debugger clears 's_appNotStarted' flag, we - // set 'justRestarted' variable. - // The other approach would be to set justRestarted in slotRun, slotCore - // and slotAttach. - // Note that setting this var in startDebugger is not OK, because the - // initial state of debugger is exactly the same as state after pause, - // so we'll always show varaibles view. - if (changedState & s_appNotStarted) { - if (newState & s_appNotStarted) { - setSessionState(StoppedState); - justRestarted_ = false; - - } else { - justRestarted_ = true; - } - } - - if (changedState & s_explicitBreakInto) - if (!(newState & s_explicitBreakInto)) - message = i18n("Application interrupted"); - - if (changedState & s_programExited) { - if (newState & s_programExited) { - message = i18n("Process exited"); - setSessionState(StoppedState); - } - } - - if (changedState & s_appRunning) { - if (newState & s_appRunning) { - message = i18n("Application is running"); - setSessionState(ActiveState); - } - else - { - if (!(newState & s_appNotStarted)) { - message = i18n("Application is paused"); - setSessionState(PausedState); - - // On the first stop, show the variables view. - // We do it on first stop, and not at debugger start, because - // a program might just successfully run till completion. If we show - // the var views on start and hide on stop, this will look like flicker. - // On the other hand, if application is paused, it's very - // likely that the user wants to see variables. - if (justRestarted_) - { - justRestarted_ = false; - //mainWindow()->setViewAvailable(variableWidget, true); - //FIXME: emit raiseVariableViews(); - } - } - } - } - - // And now? :-) - kDebug(9012) << "state: " << newState << message; - - if (!message.isEmpty()) - emit showMessage(message, 3000); - - if (!(oldState & s_dbgNotStarted) && (newState & s_dbgNotStarted)) - { - emit finished(); - setSessionState(EndedState); //this will delete the DebugSession, so do it last - } - - emit gdbStateChanged(oldState, newState); -} - -void DebugSession::examineCoreFile(const KUrl& debugee, const KUrl& coreFile) -{ - setStateOff(s_programExited|s_appNotStarted); - setStateOn(s_core); - - if (stateIsOn(s_dbgNotStarted)) - startDebugger(0); - - // TODO support non-local URLs - queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, debugee.toLocalFile())); - queueCmd(new GDBCommand(GDBMI::NonMI, "core " + coreFile.toLocalFile())); - - raiseEvent(connected_to_program); - raiseEvent(program_state_changed); -} - -void DebugSession::attachToProcess(int pid) -{ - kDebug() << pid; - - setStateOff(s_appNotStarted|s_programExited); - setStateOn(s_attached); - - //set current state to running, after attaching we will get *stopped response - setStateOn(s_appRunning); - - if (stateIsOn(s_dbgNotStarted)) - startDebugger(0); - - // Currently, we always start debugger with a name of binary, - // we might be connecting to a different binary completely, - // so cancel all symbol tables gdb has. - // We can't omit application name from gdb invocation - // because for libtool binaries, we have no way to guess - // real binary name. - queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols)); - - queueCmd(new GDBCommand(GDBMI::TargetAttach, pid, this, &DebugSession::handleTargetAttach, true)); - - raiseEvent(connected_to_program); - - emit raiseFramestackViews(); -} - -void DebugSession::run() -{ - if (stateIsOn(s_appNotStarted|s_dbgNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecContinue)); -} - -void DebugSession::stepOut() -{ - if (stateIsOn(s_appNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecFinish)); -} - -void DebugSession::restartDebugger() -{ - // We implement restart as kill + slotRun, as opposed as plain "run" - // command because kill + slotRun allows any special logic in slotRun - // to apply for restart. - // - // That includes: - // - checking for out-of-date project - // - special setup for remote debugging. - // - // Had we used plain 'run' command, restart for remote debugging simply - // would not work. - slotKill(); - run(); -} - -void DebugSession::stopDebugger() -{ - commandQueue_->clear(); - - kDebug(9012) << "DebugSession::slotStopDebugger() called"; - if (stateIsOn(s_shuttingDown) || !m_gdb) - return; - - setStateOn(s_shuttingDown); - kDebug(9012) << "DebugSession::slotStopDebugger() executing"; - - // Get gdb's attention if it's busy. We need gdb to be at the - // command line so we can stop it. - if (!m_gdb.data()->isReady()) - { - kDebug(9012) << "gdb busy on shutdown - interruping"; - m_gdb.data()->interrupt(); - } - - // If the app is attached then we release it here. This doesn't stop - // the app running. - if (stateIsOn(s_attached)) - { - queueCmd(new GDBCommand(GDBMI::TargetDetach)); - emit gdbUserCommandStdout("(gdb) detach\n"); - } - - // Now try to stop gdb running. - queueCmd(new GDBCommand(GDBMI::GdbExit)); - emit gdbUserCommandStdout("(gdb) quit"); - - // We cannot wait forever, kill gdb after 5 seconds if it's not yet quit - QTimer::singleShot(5000, this, SLOT(slotKillGdb())); - - emit reset(); -} - -// Pausing an app removes any pending run commands so that the app doesn't -// start again. If we want to be silent then we remove any pending info -// commands as well. -void DebugSession::interruptDebugger() -{ - Q_ASSERT(m_gdb); - - setStateOn(s_explicitBreakInto); - - m_gdb.data()->interrupt(); -} - -void DebugSession::runToCursor() -{ - if (KDevelop::IDocument* doc = KDevelop::ICore::self()->documentController()->activeDocument()) { - KTextEditor::Cursor cursor = doc->cursorPosition(); - if (cursor.isValid()) - runUntil(doc->url().path(), cursor.line() + 1); - } -} - -void DebugSession::jumpToCursor() -{ - if (KDevelop::IDocument* doc = KDevelop::ICore::self()->documentController()->activeDocument()) { - KTextEditor::Cursor cursor = doc->cursorPosition(); - if (cursor.isValid()) - jumpTo(doc->url().path(), cursor.line() + 1); - } -} - -void DebugSession::stepOver() -{ - if (stateIsOn(s_appNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecNext)); -} - -void DebugSession::stepOverInstruction() -{ - if (stateIsOn(s_appNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecNextInstruction)); -} - -void DebugSession::stepInto() -{ - if (stateIsOn(s_appNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecStep)); -} - -void DebugSession::stepIntoInstruction() -{ - if (stateIsOn(s_appNotStarted|s_shuttingDown)) - return; - - queueCmd(new GDBCommand(GDBMI::ExecStepInstruction)); -} - -void DebugSession::slotDebuggerAbnormalExit() -{ - KMessageBox::information( - KDevelop::ICore::self()->uiController()->activeMainWindow(), - i18n("GDB exited abnormally" - "

This is likely a bug in GDB. " - "Examine the gdb output window and then stop the debugger"), - i18n("GDB exited abnormally")); - - // Note: we don't stop the debugger here, becuse that will hide gdb - // window and prevent the user from finding the exact reason of the - // problem. -} - -bool DebugSession::restartAvaliable() const -{ - if (stateIsOn(s_attached) || stateIsOn(s_core)) { - return false; - } else { - return true; - } -} -void DebugSession::configure() -{ -// KConfigGroup config(KGlobal::config(), "GDB Debugger"); -// -// // A a configure.gdb script will prevent these from uncontrolled growth... -// config_configGdbScript_ = config.readEntry("Remote GDB Configure Script", ""); -// config_runShellScript_ = config.readEntry("Remote GDB Shell Script", ""); -// config_runGdbScript_ = config.readEntry("Remote GDB Run Script", ""); -// -// // PORTING TODO: where is this in the ui? -// config_forceBPSet_ = config.readEntry("Allow Forced Breakpoint Set", true); -// -// config_dbgTerminal_ = config.readEntry("Separate Terminal For Application IO", false); -// -// bool old_displayStatic = config_displayStaticMembers_; -// config_displayStaticMembers_ = config.readEntry("Display Static Members",false); -// -// bool old_asmDemangle = config_asmDemangle_; -// config_asmDemangle_ = config.readEntry("Display Demangle Names",true); -// -// bool old_breakOnLoadingLibrary_ = config_breakOnLoadingLibrary_; -// config_breakOnLoadingLibrary_ = config.readEntry("Try Setting Breakpoints On Loading Libraries",true); -// -// // FIXME: should move this into debugger part or variable widget. -// int old_outputRadix = config_outputRadix_; -// #if 0 -// config_outputRadix_ = DomUtil::readIntEntry("Output Radix", 10); -// varTree_->setRadix(config_outputRadix_); -// #endif -// -// -// if (( old_displayStatic != config_displayStaticMembers_ || -// old_asmDemangle != config_asmDemangle_ || -// old_breakOnLoadingLibrary_ != config_breakOnLoadingLibrary_ || -// old_outputRadix != config_outputRadix_) && -// m_gdb) -// { -// bool restart = false; -// if (stateIsOn(s_dbgBusy)) -// { -// slotPauseApp(); -// restart = true; -// } -// -// if (old_displayStatic != config_displayStaticMembers_) -// { -// if (config_displayStaticMembers_) -// queueCmd(new GDBCommand(GDBMI::GdbSet, "print static-members on")); -// else -// queueCmd(new GDBCommand(GDBMI::GdbSet, "print static-members off")); -// } -// if (old_asmDemangle != config_asmDemangle_) -// { -// if (config_asmDemangle_) -// queueCmd(new GDBCommand(GDBMI::GdbSet, "print asm-demangle on")); -// else -// queueCmd(new GDBCommand(GDBMI::GdbSet, "print asm-demangle off")); -// } -// -// // Disabled for MI port. -// if (old_outputRadix != config_outputRadix_) -// { -// queueCmd(new GDBCommand(GDBMI::GdbSet, QString().sprintf("output-radix %d", -// config_outputRadix_))); -// -// // FIXME: should do this in variable widget anyway. -// // After changing output radix, need to refresh variables view. -// raiseEvent(program_state_changed); -// -// } -// -// if (config_configGdbScript_.isValid()) -// queueCmd(new GDBCommand(GDBMI::NonMI, "source " + config_configGdbScript_.toLocalFile())); -// -// -// if (restart) -// queueCmd(new GDBCommand(GDBMI::ExecContinue)); -// } -} - -// ************************************************************************** - -void DebugSession::addCommand(GDBCommand* cmd) -{ - queueCmd(cmd); -} - -void DebugSession::addCommand(GDBMI::CommandType type, const QString& str) -{ - queueCmd(new GDBCommand(type, str)); -} - -void DebugSession::addCommandToFront(GDBCommand* cmd) -{ - queueCmd(cmd, QueueAtFront); -} - -void DebugSession::addCommandBeforeRun(GDBCommand* cmd) -{ - queueCmd(cmd, QueueWhileInterrupted); -} - -// Fairly obvious that we'll add whatever command you give me to a queue -// If you tell me to, I'll put it at the head of the queue so it'll run ASAP -// Not quite so obvious though is that if we are going to run again. then any -// information requests become redundent and must be removed. -// We also try and run whatever command happens to be at the head of -// the queue. -void DebugSession::queueCmd(GDBCommand *cmd, QueuePosition queue_where) -{ - if (stateIsOn(s_dbgNotStarted)) - { - KMessageBox::information( - qApp->activeWindow(), - i18n("Gdb command sent when debugger is not running
" - "The command was:
%1", cmd->initialString()), - i18n("Internal error")); - return; - } - - if (stateReloadInProgress_) - cmd->setStateReloading(true); - - commandQueue_->enqueue(cmd, queue_where); - - kDebug(9012) << "QUEUE: " << cmd->initialString() << (stateReloadInProgress_ ? "(state reloading)" : ""); - - bool varCommandWithContext= (cmd->type() >= GDBMI::VarAssign - && cmd->type() <= GDBMI::VarUpdate - && cmd->type() != GDBMI::VarDelete); - - bool stackCommandWithContext = (cmd->type() >= GDBMI::StackInfoDepth - && cmd->type() <= GDBMI::StackListLocals); - - if (varCommandWithContext || stackCommandWithContext) - { - if (cmd->thread() == -1) - kDebug(9012) << "\t--thread will be added on execution"; - - if (cmd->frame() == -1) - kDebug(9012) << "\t--frame will be added on execution"; - } - - setStateOn(s_dbgBusy); - raiseEvent(debugger_busy); - - executeCmd(); -} - -bool DebugSession::executeCmd() -{ - Q_ASSERT(m_gdb); - - if (!m_gdb.data()->isReady()) - return false; - - GDBCommand* currentCmd = commandQueue_->nextCommand(); - if (!currentCmd) - return false; - - bool varCommandWithContext= (currentCmd->type() >= GDBMI::VarAssign - && currentCmd->type() <= GDBMI::VarUpdate - && currentCmd->type() != GDBMI::VarDelete); - - bool stackCommandWithContext = (currentCmd->type() >= GDBMI::StackInfoDepth - && currentCmd->type() <= GDBMI::StackListLocals); - - if (varCommandWithContext || stackCommandWithContext) - { - // Most var commands should be executed in the context - // of the selected thread and frame. - if (currentCmd->thread() == -1) - currentCmd->setThread(frameStackModel()->currentThread()); - - if (currentCmd->frame() == -1) - currentCmd->setFrame(frameStackModel()->currentFrame()); - } - - QString commandText = currentCmd->cmdToSend(); - bool bad_command = false; - QString message; - - int length = commandText.length(); - // No i18n for message since it's mainly for debugging. - if (length == 0) - { - // The command might decide it's no longer necessary to send - // it. - if (SentinelCommand* sc = dynamic_cast(currentCmd)) - { - kDebug(9012) << "SEND: sentinel command, not sending"; - sc->invokeHandler(); - } - else - { - kDebug(9012) << "SEND: command " << currentCmd->initialString() - << "changed its mind, not sending"; - } - - delete currentCmd; - return executeCmd(); - } - else - { - if (commandText[length-1] != '\n') - { - bad_command = true; - message = "Debugger command does not end with newline"; - } - } - if (bad_command) - { - KMessageBox::information(qApp->activeWindow(), - i18n("Invalid debugger command
%1", message), - i18n("Invalid debugger command")); - return executeCmd(); - } - - m_gdb.data()->execute(currentCmd); - return true; -} - -// ************************************************************************** - -void DebugSession::destroyCmds() -{ - commandQueue_->clear(); -} - - -void DebugSession::slotProgramStopped(const GDBMI::ResultRecord& r) -{ - /* By default, reload all state on program stop. */ - state_reload_needed = true; - setStateOff(s_appRunning); - - QString reason; - if (r.hasField("reason")) reason = r["reason"].literal(); - - if (reason == "exited-normally" || reason == "exited") - { - if (r.hasField("exit-code")) { - programNoApp(i18n("Exited with return code: %1", r["exit-code"].literal())); - } else { - programNoApp(i18n("Exited normally")); - } - state_reload_needed = false; - return; - } - - if (reason == "exited-signalled") - { - programNoApp(i18n("Exited on signal %1", r["signal-name"].literal())); - state_reload_needed = false; - return; - } - - if (reason == "watchpoint-scope") - { - QString number = r["wpnum"].literal(); - - // FIXME: shuld remove this watchpoint - // But first, we should consider if removing all - // watchpoinst on program exit is the right thing to - // do. - - queueCmd(new GDBCommand(GDBMI::ExecContinue)); - - state_reload_needed = false; - return; - } - - //Indicates if program state should be reloaded immediately. - bool updateState = false; - - if (reason == "signal-received") - { - QString name = r["signal-name"].literal(); - QString user_name = r["signal-meaning"].literal(); - - if (name == "SIGSEGV") { - setStateOn(s_appNotStarted|s_programExited); - } - - // SIGINT is a "break into running program". - // We do this when the user set/mod/clears a breakpoint but the - // application is running. - // And the user does this to stop the program also. - bool suppress_reporting = false; - if (name == "SIGINT" && stateIsOn(s_explicitBreakInto)) - { - suppress_reporting = true; - // TODO: check that we do something reasonable on - // implicit break into program (for setting breakpoints, - // or whatever). - - setStateOff(s_explicitBreakInto); - // Will show the source line in the code - // handling non-special stop kinds, below. - - //If program is interrupted by breakpointcontroller reloadProgramState() won't be called, because the last command in queue'll be ExecContinue. - updateState = true; - } - - if (!suppress_reporting) - { - // Whenever we have a signal raised then tell the user, but don't - // end the program as we want to allow the user to look at why the - // program has a signal that's caused the prog to stop. - // Continuing from SIG FPE/SEGV will cause a "Cannot ..." and - // that'll end the program. - programFinished(i18n("Program received signal %1 (%2)", name, user_name)); - } - } - - if (!reason.contains("exited")) - { - // FIXME: we should immediately update the current thread and - // frame in the framestackmodel, so that any user actions - // are in that thread. However, the way current framestack model - // is implemented, we can't change thread id until we refresh - // the entire list of threads -- otherwise we might set a thread - // id that is not already in the list, and it will be upset. - - if (r.hasField("frame")) { - const GDBMI::Value& frame = r["frame"]; - QString file, line, addr; - - if (frame.hasField("fullname")) file = frame["fullname"].literal();; - if (frame.hasField("line")) line = frame["line"].literal(); - if (frame.hasField("addr")) addr = frame["addr"].literal(); - - // gdb counts lines from 1 and we don't - setCurrentPosition(KUrl::fromLocalFile(file), line.toInt() - 1, addr); - - updateState = true; - } - - if (updateState) { - reloadProgramState(); - } - } -} - - -void DebugSession::reloadProgramState() -{ - raiseEvent(program_state_changed); - state_reload_needed = false; -} - - -// ************************************************************************** - -// There is no app anymore. This can be caused by program exiting -// an invalid program specified or ... -// gdb is still running though, but only the run command (may) make sense -// all other commands are disabled. -void DebugSession::programNoApp(const QString& msg) -{ - kDebug() << msg; - - setState(s_appNotStarted|s_programExited|(state_&s_shuttingDown)); - - destroyCmds(); - - // The application has existed, but it's possible that - // some of application output is still in the pipe. We use - // different pipes to communicate with gdb and to get application - // output, so "exited" message from gdb might have arrived before - // last application output. Get this last bit. - - // Note: this method can be called when we open an invalid - // core file. In that case, tty_ won't be set. - if (m_tty){ - m_tty->readRemaining(); - // Tty is no longer usable, delete it. Without this, QSocketNotifier - // will continiously bomd STTY with signals, so we need to either disable - // QSocketNotifier, or delete STTY. The latter is simpler, since we can't - // reuse it for future debug sessions anyway. - m_tty.reset(0); - } - - stopDebugger(); - - raiseEvent(program_exited); - raiseEvent(debugger_exited); - - emit showMessage(msg, 0); - - programFinished(msg); -} - - -void DebugSession::programFinished(const QString& msg) -{ - QString m = QString("*** %0 ***").arg(msg.trimmed()); - emit applicationStandardErrorLines(QStringList(m)); - - /* Also show message in gdb window, so that users who - prefer to look at gdb window know what's up. */ - emit gdbUserCommandStdout(m); -} - - -void DebugSession::parseStreamRecord(const GDBMI::StreamRecord& s) -{ - if (s.reason == '~') - { - QString line = s.message; - if (line.startsWith("Program terminated")) { - //when examining core file - setStateOff(s_appRunning); - setStateOn(s_appNotStarted|s_programExited); - } else if (line.startsWith("The program no longer exists") - || line.startsWith("Program exited")) { - programNoApp(line); - } else if (!line.isEmpty() && line.at(0) == '[' && line.contains(QRegExp("^\\[Inferior \\d+ \\(.*process|target.*\\) exited .*\\]"))) { - m_inferiorExitCode = line; - addCommand(new CliCommand(GDBMI::NonMI, "info inferiors", this, &DebugSession::lastInferiorHandler)); - } - } -} - -bool DebugSession::startDebugger(KDevelop::ILaunchConfiguration* cfg) -{ - kDebug(9012) << "Starting debugger controller"; - - if(m_gdb) { - kWarning() << "m_gdb object still existed"; - delete m_gdb.data(); - m_gdb.clear(); - } - - GDB* gdb = new GDB(this); - m_gdb = gdb; - - // FIXME: here, we should wait until GDB is up and waiting for input. - // Then, clear s_dbgNotStarted - // It's better to do this right away so that the state bit is always - // correct. - - /** FIXME: connect ttyStdout. It takes QByteArray, so - I'm not sure what to do. */ -#if 0 - connect(gdb, SIGNAL(applicationOutput(QString)), - this, SIGNAL(ttyStdout(QString))); -#endif - connect(gdb, SIGNAL(userCommandOutput(QString)), this, - SIGNAL(gdbUserCommandStdout(QString))); - connect(gdb, SIGNAL(internalCommandOutput(QString)), this, - SIGNAL(gdbInternalCommandStdout(QString))); - - connect(gdb, SIGNAL(ready()), this, SLOT(gdbReady())); - connect(gdb, SIGNAL(gdbExited()), this, SLOT(gdbExited())); - connect(gdb, SIGNAL(programStopped(GDBMI::ResultRecord)), - this, SLOT(slotProgramStopped(GDBMI::ResultRecord))); - connect(gdb, SIGNAL(programStopped(GDBMI::ResultRecord)), - this, SIGNAL(programStopped(GDBMI::ResultRecord))); - connect(gdb, SIGNAL(programRunning()), - this, SLOT(programRunning())); - - connect(gdb, SIGNAL(streamRecord(GDBMI::StreamRecord)), - this, SLOT(parseStreamRecord(GDBMI::StreamRecord))); - - // Start gdb. Do this after connecting all signals so that initial - // GDB output, and important events like "GDB died" are reported. - - - if (cfg) - { - KConfigGroup config = cfg->config(); - m_gdb.data()->start(config); - } - else - { - // FIXME: this is hack, I am not sure there's any way presently - // to edit this via GUI. - KConfigGroup config(KGlobal::config(), "GDB Debugger"); - m_gdb.data()->start(config); - } - - setStateOff(s_dbgNotStarted); - - // Initialise gdb. At this stage gdb is sitting wondering what to do, - // and to whom. Organise a few things, then set up the tty for the application, - // and the application itself - //queueCmd(new GDBCommand(GDBMI::EnableTimings, "yes")); - - queueCmd(new CliCommand(GDBMI::GdbShow, "version", this, &DebugSession::handleVersion)); - - // This makes gdb pump a variable out on one line. - queueCmd(new GDBCommand(GDBMI::GdbSet, "width 0")); - queueCmd(new GDBCommand(GDBMI::GdbSet, "height 0")); - - queueCmd(new GDBCommand(GDBMI::SignalHandle, "SIG32 pass nostop noprint")); - queueCmd(new GDBCommand(GDBMI::SignalHandle, "SIG41 pass nostop noprint")); - queueCmd(new GDBCommand(GDBMI::SignalHandle, "SIG42 pass nostop noprint")); - queueCmd(new GDBCommand(GDBMI::SignalHandle, "SIG43 pass nostop noprint")); - - queueCmd(new GDBCommand(GDBMI::EnablePrettyPrinting)); - - queueCmd(new GDBCommand(GDBMI::GdbSet, "charset UTF-8")); - queueCmd(new GDBCommand(GDBMI::GdbSet, "print sevenbit-strings off")); - - QString fileName = KStandardDirs::locate("data", "kdevgdb/printers/gdbinit"); - if (!fileName.isEmpty()) { - queueCmd(new GDBCommand(GDBMI::NonMI, "source " + fileName)); - } - - return true; -} - -bool DebugSession::startProgram(KDevelop::ILaunchConfiguration* cfg, IExecutePlugin* iface) -{ - if (stateIsOn( s_appNotStarted ) ) - { - emit showMessage(i18n("Running program"), 1000); - } - - if (stateIsOn(s_dbgNotStarted)) - if (!startDebugger(cfg)) - return false; - - if (stateIsOn(s_shuttingDown)) { - kDebug() << "Tried to run when debugger shutting down"; - return false; - } - - - - KConfigGroup grp = cfg->config(); - KDevelop::EnvironmentGroupList l(KGlobal::config()); - - QString envgrp = iface->environmentGroup( cfg ); - if( envgrp.isEmpty() ) - { - kWarning() << i18n("No environment group specified, looks like a broken " - "configuration, please check run configuration '%1'. " - "Using default environment group.", cfg->name() ); - envgrp = l.defaultGroup(); - } - - - if (grp.readEntry("Break on Start", false)) { - BreakpointModel* m = KDevelop::ICore::self()->debugController()->breakpointModel(); - bool found = false; - foreach (KDevelop::Breakpoint *b, m->breakpoints()) { - if (b->location() == "main") { - found = true; - break; - } - } - if (!found) { - KDevelop::ICore::self()->debugController()->breakpointModel()->addCodeBreakpoint("main"); - } - } - - - // Configuration values - bool config_displayStaticMembers_ = grp.readEntry( GDBDebugger::staticMembersEntry, false ); - bool config_asmDemangle_ = grp.readEntry( GDBDebugger::demangleNamesEntry, true ); - KUrl config_dbgShell_ = grp.readEntry( GDBDebugger::debuggerShellEntry, KUrl() ); - KUrl config_configGdbScript_ = grp.readEntry( GDBDebugger::remoteGdbConfigEntry, KUrl() ); - KUrl config_runShellScript_ = grp.readEntry( GDBDebugger::remoteGdbShellEntry, KUrl() ); - KUrl config_runGdbScript_ = grp.readEntry( GDBDebugger::remoteGdbRunEntry, KUrl() ); - - Q_ASSERT(iface); - bool config_useExternalTerminal = iface->useTerminal( cfg ); - QString config_externalTerminal = iface->terminal( cfg ); - if (!config_externalTerminal.isEmpty()) { - // the external terminal cmd contains additional arguments, just get the terminal name - config_externalTerminal = KShell::splitArgs(config_externalTerminal).first(); - } - - m_tty.reset(new STTY(config_useExternalTerminal, config_externalTerminal)); - if (!config_useExternalTerminal) - { - connect( m_tty.data(), SIGNAL(OutOutput(QByteArray)), SIGNAL(ttyStdout(QByteArray)) ); - connect( m_tty.data(), SIGNAL(ErrOutput(QByteArray)), SIGNAL(ttyStderr(QByteArray)) ); - } - - QString tty(m_tty->getSlave()); - if (tty.isEmpty()) - { - KMessageBox::information(qApp->activeWindow(), m_tty->lastError(), i18n("Warning")); - - m_tty.reset(0); - return false; - } - - queueCmd(new GDBCommand(GDBMI::InferiorTtySet, tty)); - - // Only dummy err here, actual erros have been checked already in the job and we don't get here if there were any - QString err; - QString executable = iface->executable(cfg, err).toLocalFile(); - - QStringList arguments = iface->arguments(cfg, err); - // Change the "Working directory" to the correct one - QString dir = iface->workingDirectory(cfg).toLocalFile(); - if (dir.isEmpty() || !KUrl(dir).isValid()) - { - dir = QFileInfo(executable).absolutePath(); - } - - queueCmd(new GDBCommand(GDBMI::EnvironmentCd, '"' + dir + '"')); - - // Set the run arguments - if (!arguments.isEmpty()) - queueCmd( - new GDBCommand(GDBMI::ExecArguments, KShell::joinArgs( arguments ))); - - foreach (const QString& envvar, l.createEnvironment(envgrp, QStringList())) - queueCmd(new GDBCommand(GDBMI::GdbSet, "environment " + envvar)); - - // Needed so that breakpoint widget has a chance to insert breakpoints. - // FIXME: a bit hacky, as we're really not ready for new commands. - setStateOn(s_dbgBusy); - raiseEvent(debugger_ready); - - - if (config_displayStaticMembers_) - queueCmd(new GDBCommand(GDBMI::GdbSet, "print static-members on")); - else - queueCmd(new GDBCommand(GDBMI::GdbSet, "print static-members off")); - if (config_asmDemangle_) - queueCmd(new GDBCommand(GDBMI::GdbSet, "print asm-demangle on")); - else - queueCmd(new GDBCommand(GDBMI::GdbSet, "print asm-demangle off")); - - if (config_configGdbScript_.isValid()) - queueCmd(new GDBCommand(GDBMI::NonMI, "source " + KShell::quoteArg(config_configGdbScript_.toLocalFile()))); - - - if (!config_runShellScript_.isEmpty()) { - // Special for remote debug... - QByteArray tty(m_tty->getSlave().toLatin1()); - QByteArray options = QByteArray(">") + tty + QByteArray(" 2>&1 <") + tty; - - QProcess *proc = new QProcess; - QStringList arguments; - arguments << "-c" << KShell::quoteArg(config_runShellScript_.toLocalFile()) + - ' ' + KShell::quoteArg(executable) + QString::fromAscii( options ); - - kDebug() << "starting sh" << arguments; - proc->start("sh", arguments); - //PORTING TODO QProcess::DontCare); - } - - if (!config_runGdbScript_.isEmpty()) {// gdb script at run is requested - - // Race notice: wait for the remote gdbserver/executable - // - but that might be an issue for this script to handle... - - // Future: the shell script should be able to pass info (like pid) - // to the gdb script... - - kDebug(9012) << "Running gdb script " << KShell::quoteArg(config_runGdbScript_.toLocalFile()); - queueCmd(new GDBCommand(GDBMI::NonMI, "source " + KShell::quoteArg(config_runGdbScript_.toLocalFile()))); - - // Note: script could contain "run" or "continue" - - raiseEvent(connected_to_program); - } - else - { - queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, KShell::quoteArg(executable), this, &DebugSession::handleFileExecAndSymbols, true)); - raiseEvent(connected_to_program); - queueCmd(new GDBCommand(GDBMI::ExecRun)); - } - - setStateOff(s_appNotStarted|s_programExited); - - { - QString startWith = grp.readEntry(GDBDebugger::startWithEntry, QString("ApplicationOutput")); - if (startWith == "GdbConsole") { - emit raiseGdbConsoleViews(); - } else if (startWith == "FrameStack") { - emit raiseFramestackViews(); - } else { - //ApplicationOutput is raised in DebugJob (by setting job to Verbose/Silent) - } - } - - return true; -} - - -// ************************************************************************** -// SLOTS -// ***** -// For most of these slots data can only be sent to gdb when it -// isn't busy and it is running. - -// ************************************************************************** - -void DebugSession::slotKillGdb() -{ - if (!stateIsOn(s_programExited) && stateIsOn(s_shuttingDown)) - { - kDebug(9012) << "gdb not shutdown - killing"; - m_gdb.data()->kill(); - - setState(s_dbgNotStarted | s_appNotStarted); - - raiseEvent(debugger_exited); - } -} - -// ************************************************************************** - -void DebugSession::slotKill() -{ - if (stateIsOn(s_dbgNotStarted|s_shuttingDown)) - return; - - if (stateIsOn(s_dbgBusy)) - { - interruptDebugger(); - } - - // The -exec-abort is not implemented in gdb - // queueCmd(new GDBCommand(GDBMI::ExecAbort)); - queueCmd(new GDBCommand(GDBMI::NonMI, "kill")); - - setStateOn(s_appNotStarted); -} - -// ************************************************************************** - -void DebugSession::runUntil(const KUrl& url, int line) -{ - if (stateIsOn(s_dbgNotStarted|s_shuttingDown)) - return; - - if (!url.isValid()) - queueCmd(new GDBCommand(GDBMI::ExecUntil, line)); - else - queueCmd(new GDBCommand(GDBMI::ExecUntil, - QString("%1:%2").arg(url.toLocalFile()).arg(line))); -} - -void DebugSession::runUntil(QString& address){ - if (stateIsOn(s_dbgNotStarted|s_shuttingDown)) - return; - - if (!address.isEmpty()) { - queueCmd(new GDBCommand(GDBMI::ExecUntil, QString("*%1").arg(address))); - } -} -// ************************************************************************** - -void DebugSession::jumpToMemoryAddress(QString& address){ - if (stateIsOn(s_dbgNotStarted|s_shuttingDown)) - return; - - if (!address.isEmpty()) { - queueCmd(new GDBCommand(GDBMI::NonMI, QString("tbreak *%1").arg(address))); - queueCmd(new GDBCommand(GDBMI::NonMI, QString("jump *%1").arg(address))); - } -} - -void DebugSession::jumpTo(const KUrl& url, int line) -{ - if (stateIsOn(s_dbgNotStarted|s_shuttingDown)) - return; - - if (url.isValid()) { - queueCmd(new GDBCommand(GDBMI::NonMI, QString("tbreak %1:%2").arg(url.toLocalFile()).arg(line))); - queueCmd(new GDBCommand(GDBMI::NonMI, QString("jump %1:%2").arg(url.toLocalFile()).arg(line))); - } -} - -// ************************************************************************** - -// FIXME: connect to GDB's slot. -void DebugSession::defaultErrorHandler(const GDBMI::ResultRecord& result) -{ - QString msg = result["msg"].literal(); - - if (msg.contains("No such process")) - { - setState(s_appNotStarted|s_programExited); - raiseEvent(program_exited); - return; - } - - KMessageBox::information( - qApp->activeWindow(), - i18n("Debugger error" - "

Debugger reported the following error:" - "

%1", result["msg"].literal()), - i18n("Debugger error")); - - // Error most likely means that some change made in GUI - // was not communicated to the gdb, so GUI is now not - // in sync with gdb. Resync it. - // - // Another approach is to make each widget reload it content - // on errors from commands that it sent, but that's too complex. - // Errors are supposed to happen rarely, so full reload on error - // is not a big deal. Well, maybe except for memory view, but - // it's no auto-reloaded anyway. - // - // Also, don't reload state on errors appeared during state - // reloading! - if (!m_gdb.data()->currentCommand()->stateReloading()) - raiseEvent(program_state_changed); -} - -void DebugSession::gdbReady() -{ - stateReloadInProgress_ = false; - - if (!executeCmd()) - { - /* We know that gdb is ready, so if executeCmd returns false - it means there's nothing in command queue. */ - - if (state_reload_needed) - { - kDebug(9012) << "Finishing program stop\n"; - // Set to false right now, so that if 'actOnProgramPauseMI_part2' - // sends some commands, we won't call it again when handling replies - // from that commands. - state_reload_needed = false; - reloadProgramState(); - } - - kDebug(9012) << "No more commands\n"; - setStateOff(s_dbgBusy); - raiseEvent(debugger_ready); - } -} - -void DebugSession::gdbExited() -{ - kDebug(); - /* Technically speaking, GDB is likely not to kill the application, and - we should have some backup mechanism to make sure the application is - killed by KDevelop. But even if application stays around, we no longer - can control it in any way, so mark it as exited. */ - setStateOn(s_appNotStarted); - setStateOn(s_dbgNotStarted); - setStateOff(s_shuttingDown); -} - -// FIXME: I don't fully remember what is the business with -// stateReloadInProgress_ and whether we can lift it to the -// generic level. -void DebugSession::raiseEvent(event_t e) -{ - if (e == program_exited || e == debugger_exited) - { - stateReloadInProgress_ = false; - } - - if (e == program_state_changed) - { - stateReloadInProgress_ = true; - kDebug(9012) << "State reload in progress\n"; - } - - IDebugSession::raiseEvent(e); - - if (e == program_state_changed) - { - stateReloadInProgress_ = false; - } -} - -// ************************************************************************** - -void DebugSession::slotUserGDBCmd(const QString& cmd) -{ - queueCmd(new UserCommand(GDBMI::NonMI, cmd)); - - // User command can theoreticall modify absolutely everything, - // so need to force a reload. - - // We can do it right now, and don't wait for user command to finish - // since commands used to reload all view will be executed after - // user command anyway. - if (!stateIsOn(s_appNotStarted) && !stateIsOn(s_programExited)) - raiseEvent(program_state_changed); -} - -void DebugSession::explainDebuggerStatus() -{ - GDBCommand* currentCmd_ = m_gdb.data()->currentCommand(); - QString information = - i18np("1 command in queue\n", "%1 commands in queue\n", commandQueue_->count()) + - i18ncp("Only the 0 and 1 cases need to be translated", "1 command being processed by gdb\n", "%1 commands being processed by gdb\n", (currentCmd_ ? 1 : 0)) + - i18n("Debugger state: %1\n", state_); - - if (currentCmd_) - { - QString extra = i18n("Current command class: '%1'\n" - "Current command text: '%2'\n" - "Current command original text: '%3'\n", - typeid(*currentCmd_).name(), - currentCmd_->cmdToSend(), - currentCmd_->initialString()); - - information += extra; - } - - KMessageBox::information(qApp->activeWindow(), information, - i18n("Debugger status")); -} - -bool DebugSession::stateIsOn(DBGStateFlags state) const -{ - return state_ & state; -} - -DBGStateFlags DebugSession::debuggerState() const -{ - return state_; -} - -void DebugSession::setStateOn(DBGStateFlags stateOn) -{ - DBGStateFlags oldState = state_; - - debugStateChange(state_, state_ | stateOn); - state_ |= stateOn; - - _gdbStateChanged(oldState, state_); -} - -void DebugSession::setStateOff(DBGStateFlags stateOff) -{ - DBGStateFlags oldState = state_; - - debugStateChange(state_, state_ & ~stateOff); - state_ &= ~stateOff; - - _gdbStateChanged(oldState, state_); -} - -void DebugSession::setState(DBGStateFlags newState) -{ - DBGStateFlags oldState = state_; - - debugStateChange(state_, newState); - state_ = newState; - - _gdbStateChanged(oldState, state_); -} - -void DebugSession::debugStateChange(DBGStateFlags oldState, DBGStateFlags newState) -{ - int delta = oldState ^ newState; - if (delta) - { - QString out = "STATE: "; - for(int i = 1; i < s_lastDbgState; i <<= 1) - { - if (delta & i) - { - if (i & newState) - out += '+'; - else - out += '-'; - - bool found = false; -#define STATE_CHECK(name)\ - if (i == name) { out += #name; found = true; } - STATE_CHECK(s_dbgNotStarted); - STATE_CHECK(s_appNotStarted); - STATE_CHECK(s_programExited); - STATE_CHECK(s_attached); - STATE_CHECK(s_core); - STATE_CHECK(s_waitTimer); - STATE_CHECK(s_shuttingDown); - STATE_CHECK(s_explicitBreakInto); - STATE_CHECK(s_dbgBusy); - STATE_CHECK(s_appRunning); -#undef STATE_CHECK - - if (!found) - out += QString::number(i); - out += ' '; - - } - } - kDebug(9012) << out; - } -} - -void DebugSession::programRunning() -{ - setStateOn(s_appRunning); - raiseEvent(program_running); -} - -void DebugSession::handleVersion(const QStringList& s) -{ - kDebug() << s.first(); - // minimal version is 7.0,0 - QRegExp rx("([7-9]+)\\.([0-9]+)(\\.([0-9]+))?"); - int idx = rx.indexIn(s.first()); - if (idx == -1) - { - if (qApp->type() == QApplication::Tty) { - //for unittest - qFatal("You need gdb 7.0.0 or higher."); - } - KMessageBox::error( - qApp->activeWindow(), - i18n("You need gdb 7.0.0 or higher.
" - "You are using: %1", s.first()), - i18n("gdb error")); - stopDebugger(); - } -} - - -void DebugSession::handleFileExecAndSymbols(const GDBMI::ResultRecord& r) -{ - if (r.reason == "error") { - KMessageBox::error( - qApp->activeWindow(), - i18n("Could not start debugger:
")+ - r["msg"].literal(), - i18n("Startup error")); - stopDebugger(); - } -} - -void DebugSession::handleTargetAttach(const GDBMI::ResultRecord& r) -{ - if (r.reason == "error") { - KMessageBox::error( - qApp->activeWindow(), - i18n("Could not attach debugger:
")+ - r["msg"].literal(), - i18n("Startup error")); - stopDebugger(); - } -} - -void DebugSession::lastInferiorHandler(const QStringList& l) -{ - //* 1 - QRegExp rx("^\\*?\\s+\\d+\\s+\\\\s.*$"); - - for (int i = 2 ; i < l.size(); i++) { - if (!rx.exactMatch(l[i])) { - kDebug() << "Still running: " << l[i]; - return; - } - } - kDebug() << "Exiting"; - programNoApp(m_inferiorExitCode); - state_reload_needed = false; -} - -} - - -#include "moc_debugsession.cpp" diff --git a/kdevelop/debuggers/gdb/debugsession.h b/kdevelop/debuggers/gdb/debugsession.h deleted file mode 100644 index 33b50709..00000000 --- a/kdevelop/debuggers/gdb/debugsession.h +++ /dev/null @@ -1,342 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 1999-2001 John Birch - * Copyright 2001 by Bernd Gehrmann - * Copyright 2007 Hamish Rodda - * Copyright 2009 Niko Sams - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - - -#ifndef GDB_DEBUGSESSION_H -#define GDB_DEBUGSESSION_H - -#include -#include - -#include - -#include - -#include "gdbglobal.h" -#include "mi/gdbmi.h" - -class IExecutePlugin; -class KToolBar; - -namespace KTextEditor { -class Cursor; -} -namespace KDevelop { -class ProcessLineMaker; -class ILaunchConfiguration; -} - -namespace GDBDebugger { - -class STTY; -class CommandQueue; -class GDBCommand; -class GDB; -class BreakpointController; - - -static QString gdbPathEntry = "GDB Path"; -static QString debuggerShellEntry = "Debugger Shell"; -static QString remoteGdbConfigEntry = "Remote GDB Config Script"; -static QString remoteGdbShellEntry = "Remote GDB Shell Script"; -static QString remoteGdbRunEntry = "Remote GDB Run Script"; -static QString staticMembersEntry = "Display Static Members"; -static QString demangleNamesEntry = "Display Demangle Names"; -//static QString separateTerminalEntry = "Separate Terminal For Application IO"; -static QString allowForcedBPEntry = "Allow Forced Breakpoint Set"; -static QString startWithEntry = "Start With"; - -class DebugSession : public KDevelop::IDebugSession -{ - Q_OBJECT -public: - DebugSession(); - ~DebugSession(); - - virtual DebuggerState state() const; - - virtual bool restartAvaliable() const; - -Q_SIGNALS: - void applicationStandardOutputLines(const QStringList& lines); - void applicationStandardErrorLines(const QStringList& lines); - void showMessage(const QString& message, int timeout); - void reset(); - void programStopped(const GDBMI::ResultRecord& mi_record); - -public Q_SLOTS: - /** - * Start the debugger, and execute the program specified by \a run. - */ - bool startProgram(KDevelop::ILaunchConfiguration* run, IExecutePlugin* execute); - virtual void restartDebugger(); - virtual void stopDebugger(); - virtual void interruptDebugger(); - virtual void run(); - virtual void runToCursor(); - virtual void jumpToCursor(); - virtual void stepOver(); - virtual void stepIntoInstruction(); - virtual void stepInto(); - virtual void stepOverInstruction(); - virtual void stepOut(); - - /** - * Start the debugger and examine the core file given by \a coreFile. - */ - void examineCoreFile(const KUrl& debugee, const KUrl& coreFile); - - /** - * Attach to currently running process with the given \a pid. - */ - void attachToProcess(int pid); - -Q_SIGNALS: - void raiseGdbConsoleViews(); - -private Q_SLOTS: - void slotDebuggerAbnormalExit(); - -private: - void _gdbStateChanged(DBGStateFlags oldState, DBGStateFlags newState); - - KDevelop::IFrameStackModel* createFrameStackModel(); - void setupController(); - void setSessionState(KDevelop::IDebugSession::DebuggerState state); - - KDevelop::ProcessLineMaker *m_procLineMaker; - KDevelop::ProcessLineMaker *m_gdbLineMaker; - DebuggerState m_sessionState; - bool justRestarted_; - KConfigGroup m_config; - QWeakPointer m_gdb; - - - - -public: - /** - * Run currently executing program to the given \a url and \a line. - */ - void runUntil(const KUrl& url, int line); - - /** - * Run currently executing program to the given \a address - */ - void runUntil(QString& address); - /** - * Move the execution point of the currently executing program to the given \a url and \a line. - */ - void jumpTo(const KUrl& url, int line); - - /** - * Move the execution point of the currently executing program to the given \a address. - *Note: It can be really very dangerous, so use jumpTo instead. - */ - void jumpToMemoryAddress(QString& address); - - /** Adds a command to the end of queue of commands to be executed - by gdb. The command will be actually sent to gdb only when - replies from all previous commands are received and full processed. - - The literal command sent to gdb is obtained by calling - cmd->cmdToSend. The call is made immediately before sending the - command, so it's possible to use results of prior commands when - computing the exact command to send. - */ - void addCommand(GDBCommand* cmd); - - /** Same as above, but internally constructs new GDBCommand - instance from the string. */ - void addCommand(GDBMI::CommandType type, const QString& cmd = QString()); - - /** Adds command to the front of the commands queue. It will be executed - next. - - This is useful to implement 'atomic' command sequences. For example, - if one wants to switch to each thread in turn, asking gdb where that - thread stand, this should never be interrupted by other command, since - other commands might not expect that thread magically changes. - - In this specific case, first -thread-list-ids commands is issued. The - handler for reply will add a number of command to front, and it will - guarantee that no other command will get in between. - - Note that if you call: - - addCommandToFront(cmd1); - addCommandToFront(cmd2); - - The execution order will be 'cmd2', then 'cmd1'. - - FIXME: is not used for now, maybe remove. - */ - void addCommandToFront(GDBCommand* cmd); - - /* If current command queue has any command - for which isRun is true, inserts 'cmd' - before the first such command. Otherwise, - works the same as addCommand. */ - void addCommandBeforeRun(GDBCommand* cmd); - - bool stateIsOn(DBGStateFlags state) const; - DBGStateFlags debuggerState() const; - - using QObject::event; - -private: - - /** Handles a result response from a MI command -- that is - all MI responses except for Stream and Prompt responses. - Uses currentCmd to decide what to do with response and - calls appropriate method. - */ - void processMICommandResponse(const GDBMI::ResultRecord& r); - - /** Try to execute next command in the queue. If GDB is not - busy with previous command, and there's a command in the - queue, sends it and returns true. - Otherwise, returns false. */ - bool executeCmd (); - void destroyCmds(); - void removeInfoRequests(); - /** Called when there are no pending commands and 'state_reload_needed' - is true. Also can be used to immediately reload program state. - Issues commands to completely reload all program state shown - to the user. - */ - void reloadProgramState(); - - void programNoApp(const QString &msg); - void programFinished(const QString &msg); - - void setStateOn(DBGStateFlags stateOn); - void setStateOff(DBGStateFlags stateOff); - void setState(DBGStateFlags newState); - - void debugStateChange(DBGStateFlags oldState, DBGStateFlags newState); - void commandDone(); - - void raiseEvent(event_t e); - - void maybeAnnounceWatchpointHit(); - - bool startDebugger(KDevelop::ILaunchConfiguration* cfg); - - ///Checks if exited inferior is the last one, if so ends the debug session. - void lastInferiorHandler(const QStringList& l); - -private Q_SLOTS: - - void gdbReady(); - - void gdbExited(); - - void slotProgramStopped(const GDBMI::ResultRecord& mi_record); - - /** Parses the CLI output line, and catches interesting messages - like "Program exited". This is intended to allow using console - commands in the gdb window despite the fact that GDB does not - produce right MI notification for CLI commands. I.e. if you - run "continue" there will be no MI message if the application has - exited. - */ - void parseStreamRecord(const GDBMI::StreamRecord& s); - - /** Default handler for errors. - Tries to guess is the error message is telling that target is - gone, if so, informs the user. - Otherwise, shows a dialog box and reloads view state. */ - void defaultErrorHandler(const GDBMI::ResultRecord& result); - - /**Triggered every time program begins/continues it's execution.*/ - void programRunning(); - - // All of these slots are entered in the controller's thread, as they use queued connections or are called internally - void queueCmd(GDBCommand *cmd, QueuePosition queue_where = QueueAtEnd); - - void configure(); - - void slotUserGDBCmd(const QString&); - - // Pops up a dialog box with some hopefully - // detailed information about which state debugger - // is in, which commands were sent and so on. - void explainDebuggerStatus(); - - void slotKillGdb(); - - void handleVersion(const QStringList& s); - void handleFileExecAndSymbols(const GDBMI::ResultRecord& r); - void handleTargetAttach(const GDBMI::ResultRecord& r); - -public Q_SLOTS: - void slotKill(); - -Q_SIGNALS: - void rawGDBMemoryDump (char *buf); - void rawGDBRegisters (char *buf); - void rawGDBLibraries (char *buf); - void ttyStdout (const QByteArray& output); - void ttyStderr (const QByteArray& output); - void gdbInternalCommandStdout (const QString& output); - void gdbUserCommandStdout (const QString& output); - void gdbStateChanged(DBGStateFlags oldState, DBGStateFlags newState); - - void debuggerAbnormalExit(); - - - /** Emitted immediately after breakpoint is hit, before any commands - are sent and before current line indicator is shown. */ - void breakpointHit(int id); - /** Emitted for watchpoint hit, after line indicator is shown. */ - void watchpointHit(int id, - const QString& oldValue, const QString& newValue); - -private: - friend class GdbTest; - - CommandQueue* commandQueue_; - - QScopedPointer m_tty; - QString badCore_; - - // Some state variables - DBGStateFlags state_; - - /**When program stops and all commands from queue are executed and this variable is true, program state shown to the user is updated.*/ - bool state_reload_needed; - - QTime commandExecutionTime; - - /**True if program has stopped and all stuff like breakpoints is being updated.*/ - bool stateReloadInProgress_; - - ///Exit code of the last inferior(in format: exit normally, with code "number" e.t.c) - QString m_inferiorExitCode; -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/disassemblewidget.cpp b/kdevelop/debuggers/gdb/disassemblewidget.cpp deleted file mode 100644 index eb20bd85..00000000 --- a/kdevelop/debuggers/gdb/disassemblewidget.cpp +++ /dev/null @@ -1,443 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 2000 John Birch - * Copyright 2006 Vladimir Prus - * Copyright 2007 Hamish Rodda - * Copyright 2013 Vlas Puhov - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "disassemblewidget.h" -#include "gdbcommand.h" -#include "debuggerplugin.h" - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include "debugsession.h" - -#include "registers/registersmanager.h" - -using namespace GDBMI; - -namespace GDBDebugger -{ - -SelectAddrDialog::SelectAddrDialog(QWidget* parent) - : KDialog(parent) -{ - QWidget *widget = new QWidget; - m_ui.setupUi(widget); - setMainWidget(widget); - setCaption(i18n("Address Selector")); - - connect(m_ui.comboBox, SIGNAL(editTextChanged(QString)), - this, SLOT(validateInput()) ); - connect(m_ui.comboBox, SIGNAL(returnPressed()), - this, SLOT(itemSelected()) ); - connect(this, SIGNAL(okClicked()), this, SLOT(itemSelected()) ); -} - -bool SelectAddrDialog::hasValidAddress() const -{ - bool ok; - m_ui.comboBox->currentText().toLongLong(&ok, 16); - - return ok; -} - -void SelectAddrDialog::updateOkState() -{ - enableButtonOk( hasValidAddress() ); -} - -void SelectAddrDialog::validateInput() -{ - updateOkState(); -} - -void SelectAddrDialog::itemSelected() -{ - QString text = m_ui.comboBox->currentText(); - if( hasValidAddress() && m_ui.comboBox->findText(text) < 0 ) - m_ui.comboBox->addItem(text); -} - - - -DisassembleWindow::DisassembleWindow(QWidget *parent, DisassembleWidget* widget) - : QTreeWidget(parent) -{ - /*context menu commands */{ - m_selectAddrAction = new QAction(i18n("Change &address"), this); - m_selectAddrAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); - connect(m_selectAddrAction, SIGNAL(triggered()), widget, SLOT(slotChangeAddress())); - - m_jumpToLocation = new QAction(KIcon("debug-execute-to-cursor"), i18n("&Jump to Cursor"), this); - m_jumpToLocation->setWhatsThis(i18n("Sets the execution pointer to the current cursor position.")); - connect(m_jumpToLocation,SIGNAL(triggered()), widget, SLOT(jumpToCursor())); - - m_runUntilCursor = new QAction(KIcon("debug-run-cursor"), i18n("&Run to Cursor"), this); - m_runUntilCursor->setWhatsThis(i18n("Continues execution until the cursor position is reached.")); - connect(m_runUntilCursor,SIGNAL(triggered()), widget, SLOT(runToCursor())); - } -} - -void DisassembleWindow::contextMenuEvent(QContextMenuEvent *e) -{ - QMenu popup(this); - popup.addAction(m_selectAddrAction); - popup.addAction(m_jumpToLocation); - popup.addAction(m_runUntilCursor); - popup.exec(e->globalPos()); -} -/***************************************************************************/ -/***************************************************************************/ -/***************************************************************************/ -const KIcon DisassembleWidget::icon_=KIcon("go-next"); - -DisassembleWidget::DisassembleWidget(CppDebuggerPlugin* plugin, QWidget *parent) - : QWidget(parent), - active_(false), - lower_(0), - upper_(0), - address_(0), - m_splitter(new KDevelop::AutoOrientedSplitter(this)) -{ - QVBoxLayout* topLayout = new QVBoxLayout(this); - - QHBoxLayout* controlsLayout = new QHBoxLayout; - - topLayout->addLayout(controlsLayout); - - - { // initialize disasm/registers views - topLayout->addWidget(m_splitter); - - //topLayout->setMargin(0); - - m_disassembleWindow = new DisassembleWindow(m_splitter, this); - - m_disassembleWindow->setWhatsThis(i18n("Machine code display

" - "A machine code view into your running " - "executable with the current instruction " - "highlighted. You can step instruction by " - "instruction using the debuggers toolbar " - "buttons of \"step over\" instruction and " - "\"step into\" instruction.")); - - m_disassembleWindow->setFont(KGlobalSettings::fixedFont()); - m_disassembleWindow->setSelectionMode(QTreeWidget::SingleSelection); - m_disassembleWindow->setColumnCount(ColumnCount); - m_disassembleWindow->setUniformRowHeights(true); - m_disassembleWindow->setRootIsDecorated(false); - - m_disassembleWindow->setHeaderLabels(QStringList() << "" << i18n("Address") << i18n("Function") << i18n("Instruction")); - - m_splitter->setStretchFactor(0, 1); - m_splitter->setContentsMargins(0, 0, 0, 0); - - m_registersManager = new RegistersManager(m_splitter); - - m_config = KGlobal::config()->group("Disassemble/Registers View"); - - QByteArray state = m_config.readEntry("splitterState", QByteArray()); - if (!state.isEmpty()) { - m_splitter->restoreState(state); - } - - } - - setLayout(topLayout); - - setWindowIcon( KIcon("system-run") ); - setWindowTitle(i18n("Disassemble/Registers View")); - - KDevelop::IDebugController* pDC=KDevelop::ICore::self()->debugController(); - Q_ASSERT(pDC); - - connect(pDC, - SIGNAL(currentSessionChanged(KDevelop::IDebugSession*)), - SLOT(currentSessionChanged(KDevelop::IDebugSession*))); - - connect(plugin, SIGNAL(reset()), this, SLOT(slotDeactivate())); - - m_dlg = new SelectAddrDialog(this); - - // show the data if debug session is active - KDevelop::IDebugSession* pS = pDC->currentSession(); - - currentSessionChanged(pS); - - if(pS && !pS->currentAddr().isEmpty()) - slotShowStepInSource(pS->currentUrl(), pS->currentLine(), pS->currentAddr()); -} - -void DisassembleWidget::jumpToCursor() { - DebugSession *s = qobject_cast(KDevelop::ICore:: - self()->debugController()->currentSession()); - if (s && s->isRunning()) { - QString address = m_disassembleWindow->selectedItems().at(0)->text(Address); - s->jumpToMemoryAddress(address); - } -} - -void DisassembleWidget::runToCursor(){ - DebugSession *s = qobject_cast(KDevelop::ICore:: - self()->debugController()->currentSession()); - if (s && s->isRunning()) { - QString address = m_disassembleWindow->selectedItems().at(0)->text(Address); - s->runUntil(address); - } -} - -void DisassembleWidget::currentSessionChanged(KDevelop::IDebugSession* s) -{ - DebugSession *session = qobject_cast(s); - - enableControls( session != NULL ); // disable if session closed - - m_registersManager->setSession(session); - - if (session) { - connect(session, SIGNAL(showStepInSource(KUrl,int,QString)), - SLOT(slotShowStepInSource(KUrl,int,QString))); - connect(session,SIGNAL(showStepInDisassemble(QString)),SLOT(update(QString))); - } -} - - -/***************************************************************************/ - -DisassembleWidget::~DisassembleWidget() -{ - m_config.writeEntry("splitterState", m_splitter->saveState()); -} - -/***************************************************************************/ - -bool DisassembleWidget::displayCurrent() -{ - if(address_ < lower_ || address_ > upper_) return false; - - bool bFound=false; - for (int line=0; line < m_disassembleWindow->topLevelItemCount(); line++) - { - QTreeWidgetItem* item = m_disassembleWindow->topLevelItem(line); - unsigned long address = item->text(Address).toULong(&ok,16); - - if (address == address_) - { - // put cursor at start of line and highlight the line - m_disassembleWindow->setCurrentItem(item); - item->setIcon(Icon, icon_); - bFound = true; // need to process all items to clear icons - } - else if(!item->icon(Icon).isNull()) item->setIcon(Icon, QIcon()); - } - - return bFound; -} - -/***************************************************************************/ - -void DisassembleWidget::slotActivate(bool activate) -{ - kDebug(9012) << "Disassemble widget active: " << activate; - - if (active_ != activate) - { - active_ = activate; - if (active_) - { - m_registersManager->updateRegisters(); - if (!displayCurrent()) - disassembleMemoryRegion(); - } - } -} - -/***************************************************************************/ - -void DisassembleWidget::slotShowStepInSource(const KUrl&, int, - const QString& currentAddress) -{ - update(currentAddress); -} - -void DisassembleWidget::updateExecutionAddressHandler(const GDBMI::ResultRecord& r) -{ - const GDBMI::Value& content = r["asm_insns"]; - const GDBMI::Value& pc = content[0]; - if( pc.hasField("address") ){ - QString addr = pc["address"].literal(); - address_ = addr.toULong(&ok,16); - - disassembleMemoryRegion(addr); - } -} - -/***************************************************************************/ - -void DisassembleWidget::disassembleMemoryRegion(const QString& from, const QString& to) -{ - DebugSession *s = qobject_cast(KDevelop::ICore:: - self()->debugController()->currentSession()); - if(!s || !s->isRunning()) return; - - //only get $pc - if (from.isEmpty()){ - s->addCommandToFront( - new GDBCommand(DataDisassemble, "-s \"$pc\" -e \"$pc+1\" -- 0", this, &DisassembleWidget::updateExecutionAddressHandler ) ); - }else{ - - QString cmd = (to.isEmpty())? - QString("-s %1 -e \"%1 + 256\" -- 0").arg(from ): - QString("-s %1 -e %2+1 -- 0").arg(from).arg(to); // if both addr set - - s->addCommandToFront( - new GDBCommand(DataDisassemble, cmd, this, &DisassembleWidget::disassembleMemoryHandler ) ); - - } -} - -/***************************************************************************/ - -void DisassembleWidget::disassembleMemoryHandler(const GDBMI::ResultRecord& r) -{ - const GDBMI::Value& content = r["asm_insns"]; - QString currentFunction; - - m_disassembleWindow->clear(); - - for(int i = 0; i < content.size(); ++i) - { - const GDBMI::Value& line = content[i]; - - QString addr, fct, offs, inst; - - if( line.hasField("address") ) addr = line["address"].literal(); - if( line.hasField("func-name") ) fct = line["func-name"].literal(); - if( line.hasField("offset") ) offs = line["offset"].literal(); - if( line.hasField("inst") ) inst = line["inst"].literal(); - - //We use offset at the same column where function is. - if(currentFunction == fct){ - if(!fct.isEmpty()){ - fct = QString("+") + offs; - } - }else { currentFunction = fct; } - - m_disassembleWindow->addTopLevelItem(new QTreeWidgetItem(m_disassembleWindow, - QStringList() << QString() << addr << fct << inst)); - - if (i == 0) { - lower_ = addr.toULong(&ok,16); - } else if (i == content.size()-1) { - upper_ = addr.toULong(&ok,16); - } - } - - displayCurrent(); - - m_disassembleWindow->resizeColumnToContents(Icon); // make Icon always visible - m_disassembleWindow->resizeColumnToContents(Address); // make entire address always visible -} - - -void DisassembleWidget::showEvent(QShowEvent*) -{ - slotActivate(true); - - //it doesn't work for large names of functions -// for (int i = 0; i < m_disassembleWindow->model()->columnCount(); ++i) -// m_disassembleWindow->resizeColumnToContents(i); -} - -void DisassembleWidget::hideEvent(QHideEvent*) -{ - slotActivate(false); -} - -void DisassembleWidget::slotDeactivate() -{ - slotActivate(false); -} - -void DisassembleWidget::enableControls(bool enabled) -{ - m_disassembleWindow->setEnabled(enabled); -} - -void DisassembleWidget::slotChangeAddress() -{ - if(!m_dlg) return; - m_dlg->updateOkState(); - - if (!m_disassembleWindow->selectedItems().isEmpty()) { - m_dlg->setAddress(m_disassembleWindow->selectedItems().first()->text(Address)); - } - - if( m_dlg->exec() == KDialog::Rejected) return; - - unsigned long addr = m_dlg->getAddr().toULong(&ok,16); - - if (addr < lower_ || addr > upper_ || !displayCurrent()) - disassembleMemoryRegion(m_dlg->getAddr()); -} - -void SelectAddrDialog::setAddress ( const QString& address ) -{ - m_ui.comboBox->setCurrentItem ( address, true ); -} - -void DisassembleWidget::update(const QString &address) -{ - if (!active_) { - return; - } - - address_ = address.toULong(&ok, 16); - if (!displayCurrent()) { - disassembleMemoryRegion(); - } - m_registersManager->updateRegisters(); -} - -} - -#include "moc_disassemblewidget.cpp" diff --git a/kdevelop/debuggers/gdb/disassemblewidget.h b/kdevelop/debuggers/gdb/disassemblewidget.h deleted file mode 100644 index ccffc2f0..00000000 --- a/kdevelop/debuggers/gdb/disassemblewidget.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 1999 John Birch - * Copyright 2007 Hamish Rodda - * Copyright 2013 Vlas Puhov - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _DISASSEMBLEWIDGET_H_ -#define _DISASSEMBLEWIDGET_H_ - -#include "mi/gdbmi.h" - -#include - -#include -#include -#include - -#include - -#include "ui_selectaddress.h" - -/***************************************************************************/ -/***************************************************************************/ -/***************************************************************************/ - -class QSplitter; - -namespace KDevelop { - class IDebugSession; -} - -namespace GDBDebugger -{ - -class RegistersManager; - -class SelectAddrDialog: public KDialog -{ - Q_OBJECT - -public: - SelectAddrDialog(QWidget *parent = 0); - - QString getAddr() const - { return hasValidAddress() ? m_ui.comboBox->currentText() : QString(); } - - void setAddress(const QString& address); - bool hasValidAddress() const; - void updateOkState(); - -private Q_SLOTS: - void validateInput(); - void itemSelected(); - -private: - Ui::SelectAddress m_ui; -}; - -class DisassembleWidget; - -class DisassembleWindow : public QTreeWidget -{ -public: - DisassembleWindow(QWidget *parent, DisassembleWidget* widget); - -protected: - virtual void contextMenuEvent(QContextMenuEvent *e); - -private: - QAction* m_selectAddrAction; - QAction* m_jumpToLocation; - QAction* m_runUntilCursor; -}; - -class Breakpoint; -class DebugSession; -class CppDebuggerPlugin; - - -class DisassembleWidget : public QWidget -{ - Q_OBJECT - -public: - enum Columns { - Icon, - Address, - Function, - Instruction, - ColumnCount - }; - - DisassembleWidget( CppDebuggerPlugin* plugin, QWidget *parent=0 ); - virtual ~DisassembleWidget(); - -Q_SIGNALS: - void requestRaise(); - -public Q_SLOTS: - void slotActivate(bool activate); - void slotDeactivate(); - void slotShowStepInSource(const KUrl &fileName, int lineNum, const QString &address); - void slotChangeAddress(); - ///Disassembles code at @p address and updates registers - void update(const QString &address); - -private Q_SLOTS: - void currentSessionChanged(KDevelop::IDebugSession* session); - void jumpToCursor(); - void runToCursor(); - -protected: - virtual void showEvent(QShowEvent*); - virtual void hideEvent(QHideEvent*); - void enableControls(bool enabled); - -private: - bool displayCurrent(); - - /// Disassembles memory region from..to - /// if from is empty current execution position is used - /// if to is empty, 256 bytes range is taken - void disassembleMemoryRegion(const QString& from=QString(), - const QString& to=QString() ); - - /// callbacks for GDBCommands - void disassembleMemoryHandler(const GDBMI::ResultRecord& r); - void updateExecutionAddressHandler(const GDBMI::ResultRecord& r); - - //for str to uint conversion. - bool ok; - bool active_; - unsigned long lower_; - unsigned long upper_; - unsigned long address_; - - RegistersManager* m_registersManager ; - - DisassembleWindow * m_disassembleWindow; - - static const KIcon icon_; - SelectAddrDialog* m_dlg; - - KConfigGroup m_config; - QSplitter *m_splitter; -}; - -} - -/***************************************************************************/ -/***************************************************************************/ -/***************************************************************************/ - -#endif diff --git a/kdevelop/debuggers/gdb/gdb.cpp b/kdevelop/debuggers/gdb/gdb.cpp deleted file mode 100644 index 46420876..00000000 --- a/kdevelop/debuggers/gdb/gdb.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Low level GDB interface. - * - * Copyright 1999 John Birch - * Copyright 2007 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "gdb.h" -#include "debugsession.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -// #define DEBUG_NO_TRY //to get a backtrace to where the exception was thrown - -using namespace GDBDebugger; - -GDB::GDB(QObject* parent) -: QObject(parent), process_(0), sawPrompt_(false), currentCmd_(0), receivedReply_(false), isRunning_(false), childPid_(0) -{ -} - -GDB::~GDB() -{ - // prevent Qt warning: QProcess: Destroyed while process is still running. - if (process_ && process_->state() == QProcess::Running) { - disconnect(process_, SIGNAL(error(QProcess::ProcessError)), - this, SLOT(processErrored(QProcess::ProcessError))); - process_->kill(); - process_->waitForFinished(10); - } -} - -void GDB::start(KConfigGroup& config) -{ - // FIXME: verify that default value leads to something sensible - KUrl gdbUrl = config.readEntry(GDBDebugger::gdbPathEntry, KUrl()); - if (gdbUrl.isEmpty()) { - gdbBinary_ = "gdb"; - } else { - // FIXME: verify its' a local path. - gdbBinary_ = gdbUrl.toLocalFile(KUrl::RemoveTrailingSlash); - } - process_ = new KProcess(this); - process_->setOutputChannelMode( KProcess::SeparateChannels ); - connect(process_, SIGNAL(readyReadStandardOutput()), - SLOT(readyReadStandardOutput())); - connect(process_, SIGNAL(readyReadStandardError()), - SLOT(readyReadStandardError())); - connect(process_, - SIGNAL(finished(int,QProcess::ExitStatus)), - SLOT(processFinished(int,QProcess::ExitStatus))); - connect(process_, SIGNAL(error(QProcess::ProcessError)), - SLOT(processErrored(QProcess::ProcessError))); - - - QStringList arguments; - arguments << "--interpreter=mi2" << "-quiet"; - - KUrl shell = config.readEntry(GDBDebugger::debuggerShellEntry, KUrl()); - if( !shell.isEmpty() ) - { - kDebug(9012) << "have shell" << shell; - QString shell_without_args = shell.toLocalFile().split(QChar(' ')).first(); - - QFileInfo info( shell_without_args ); - /*if( info.isRelative() ) - { - shell_without_args = build_dir + "/" + shell_without_args; - info.setFile( shell_without_args ); - }*/ - if( !info.exists() ) - { - KMessageBox::information( - qApp->activeWindow(), - i18n("Could not locate the debugging shell '%1'.", shell_without_args ), - i18n("Debugging Shell Not Found") ); - // FIXME: throw, or set some error message. - return; - } - - arguments.insert(0, gdbBinary_); - arguments.insert(0, shell.toLocalFile()); - process_->setShellCommand( KShell::joinArgs( arguments ) ); - } - else - { - process_->setProgram( gdbBinary_, arguments ); - } - - process_->start(); - - kDebug(9012) << "STARTING GDB\n"; - emit userCommandOutput(shell.toLocalFile() + ' ' + gdbBinary_ - + " --interpreter=mi2 -quiet\n" ); -} - - -void GDB::execute(GDBCommand* command) -{ - currentCmd_ = command; - QString commandText = currentCmd_->cmdToSend(); - - kDebug(9012) << "SEND:" << commandText; - - isRunning_ = false; - receivedReply_ = false; - - QByteArray commandUtf8 = commandText.toUtf8(); - - process_->write(commandUtf8, commandUtf8.length()); - - QString prettyCmd = currentCmd_->cmdToSend(); - prettyCmd.remove( QRegExp("set prompt \032.\n") ); - prettyCmd = "(gdb) " + prettyCmd; - - if (currentCmd_->isUserCommand()) - emit userCommandOutput(prettyCmd); - else - emit internalCommandOutput(prettyCmd); -} - -bool GDB::isReady() const -{ - return currentCmd_ == 0; -} - -void GDB::interrupt() -{ - //TODO:win32 Porting needed - int pid = process_->pid(); - if (childPid_) { - ::kill(childPid_, SIGINT); - } else if (pid != 0) { - ::kill(pid, SIGINT); - } -} - -GDBCommand* GDB::currentCommand() const -{ - return currentCmd_; -} - -void GDB::kill() -{ - process_->kill(); -} - -void GDB::readyReadStandardOutput() -{ - process_->setReadChannel(QProcess::StandardOutput); - - buffer_ += process_->readAll(); - for (;;) - { - /* In MI mode, all messages are exactly one line. - See if we have any complete lines in the buffer. */ - int i = buffer_.indexOf('\n'); - if (i == -1) - break; - QByteArray reply(buffer_.left(i)); - buffer_ = buffer_.mid(i+1); - - processLine(reply); - } -} - -void GDB::readyReadStandardError() -{ - process_->setReadChannel(QProcess::StandardOutput); - emit internalCommandOutput(QString::fromUtf8(process_->readAll())); -} - -void GDB::processLine(const QByteArray& line) -{ - kDebug(9012) << "GDB output: " << line; - if(!currentCmd_) - { - kDebug(9012) << "No current command\n"; - return; - } - - FileSymbol file; - file.contents = line; - - std::unique_ptr r(mi_parser_.parse(&file)); - - if (!r) - { - // FIXME: Issue an error! - kDebug(9012) << "Invalid MI message:" << line; - // We don't consider the current command done. - // So, if a command results in unparseable reply, - // we'll just wait for the "right" reply, which might - // never come. However, marking the command as - // done in this case is even more risky. - // It's probably possible to get here if we're debugging - // natively without PTY, though this is uncommon case. - return; - } - - if (!sawPrompt_) - { - if (r->kind == GDBMI::Record::Stream) - { - GDBMI::StreamRecord& s = dynamic_cast(*r); - emit userCommandOutput(s.message); - } - else if (r->kind == GDBMI::Record::Prompt) - { - sawPrompt_ = true; - } - } - else - { - - #ifndef DEBUG_NO_TRY - try - { - #endif - switch(r->kind) - { - case GDBMI::Record::Result: { - - GDBMI::ResultRecord& result = static_cast(*r); - - emit internalCommandOutput(QString::fromUtf8(line) + '\n'); - - if (result.reason == "thread-group-started") { - receivedReply_ = true; - // (gdb) -exec-run - // =thread-group-started,id="i1",pid="16768" - if (line.contains("pid=\"")) { - QList splitLine = line.split(','); - if (splitLine.size() > 2) { - QByteArray pidStr = splitLine[2]; - pidStr.chop(1); - childPid_ = pidStr.mid(5).toULong(); - if (childPid_ == 0) { - kDebug() << "line=" << line << "pidStr=" << pidStr << pidStr.mid(5) << "pid=" << childPid_; - } - } - } - } - - // FIXME: the code below should be reviewed to consider result record - // subtype when doing all decisions. - - if (result.subkind == GDBMI::ResultRecord::GeneralNotification) - { - kDebug(9012) << "General notification"; - emit notification(result); - return; - } - - if (result.reason == "stopped") - { - //stopped is *not* a reply, wait for ^running or ^done (running before stopped, done after stopped) - isRunning_ = false; - emit programStopped(result); - } - else if (result.reason == "running") - { - receivedReply_ = true; - isRunning_ = true; - emit programRunning(); - } - else - { - receivedReply_ = true; - } - - if (result.reason == "done") - { - currentCmd_->invokeHandler(result); - emit resultRecord(result); - } - else if (result.reason == "error") - { - kDebug(9012) << "Handling error"; - // Some commands want to handle errors themself. - if (currentCmd_->handlesError() && - currentCmd_->invokeHandler(result)) - { - kDebug(9012) << "Invoked custom handler\n"; - // Done, nothing more needed - } - else - emit error(result); - } - - break; - } - - case GDBMI::Record::Stream: { - - GDBMI::StreamRecord& s = dynamic_cast(*r); - - if (s.reason == '@') - emit applicationOutput(s.message); - - if (currentCmd_->isUserCommand()) - emit userCommandOutput(s.message); - else - emit internalCommandOutput(s.message); - - currentCmd_->newOutput(s.message); - - emit streamRecord(s); - - break; - } - case GDBMI::Record::Prompt: - break; - } - #ifndef DEBUG_NO_TRY - } - catch(const std::exception& e) - { - KMessageBox::detailedSorry( - qApp->activeWindow(), - i18nc("Internal debugger error", - "

The debugger component encountered internal error while " - "processing reply from gdb. Please submit a bug report."), - i18n("The exception is: %1\n" - "The MI response is: %2", e.what(), - QString::fromLatin1(line)), - i18n("Internal debugger error")); - isRunning_ = false; - receivedReply_ = true; - } - #endif - - if (receivedReply_ && !isRunning_) - { - delete currentCmd_; - currentCmd_ = 0; - emit ready(); - } - } -} - -// ************************************************************************** - -void GDB::processFinished(int exitCode, QProcess::ExitStatus exitStatus) -{ - Q_UNUSED(exitCode); - Q_UNUSED(exitStatus); - kDebug(9012) << "GDB FINISHED\n"; - /* FIXME: return the status? */ - emit gdbExited(); - - -/* FIXME: revive. Need to arrange for controller to delete us. - bool abnormal = exitCode != 0 || exitStatus != QProcess::NormalExit; - deleteLater(); - delete tty_; - tty_ = 0; - - if (abnormal) - emit debuggerAbnormalExit(); - - raiseEvent(debugger_exited); - - destroyCmds(); - setState(s_dbgNotStarted|s_appNotStarted|s_programExited); - emit showMessage(i18n("Process exited"), 3000); - - emit gdbUserCommandStdout("(gdb) Process exited\n"); -*/ -} - -void GDB::processErrored(QProcess::ProcessError error) -{ - kDebug(9012) << "GDB ERRORED" << error; - if( error == QProcess::FailedToStart ) - { - KMessageBox::information( - qApp->activeWindow(), - i18n("Could not start debugger." - "

Could not run '%1'. " - "Make sure that the path name is specified correctly.", - gdbBinary_), - i18n("Could not start debugger")); - - /* FIXME: make sure the controller gets rids of GDB instance - emit debuggerAbnormalExit(); - - raiseEvent(debugger_exited); */ - - /* Used to be before, GDB controller might want to do - the same. - destroyCmds(); - setState(s_dbgNotStarted|s_appNotStarted|s_programExited); - emit showMessage(i18n("Process didn't start"), 3000); - */ - emit userCommandOutput("(gdb) didn't start\n"); - } else if (error == QProcess::Crashed) { - KMessageBox::error( - qApp->activeWindow(), - i18n("Gdb crashed." - "

Because of that the debug session has to be ended.
" - "Try to reproduce the crash with plain gdb and report a bug.
"), - i18n("Gdb crashed")); - } -} diff --git a/kdevelop/debuggers/gdb/gdb.h b/kdevelop/debuggers/gdb/gdb.h deleted file mode 100644 index 31688cd9..00000000 --- a/kdevelop/debuggers/gdb/gdb.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Low level GDB interface. - * - * Copyright 2007 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDB_H_d5c9cb274cbad688fe7a507a84f6633b -#define GDB_H_d5c9cb274cbad688fe7a507a84f6633b - -#include "mi/gdbmi.h" -#include "mi/miparser.h" -#include "gdbcommand.h" - -#include - -#include -#include - -class KConfigGroup; - -namespace GDBDebugger -{ - -class GDB : public QObject -{ - Q_OBJECT -public: - explicit GDB(QObject* parent = 0); - virtual ~GDB(); - - /** Starts GDB. This should be done after connecting to all - signals the client is interested in. */ - void start(KConfigGroup& config); - - /** Executes a command. This method may be called at - most once each time 'ready' is emitted. When the - GDB instance is just constructed, one should wait - for 'ready' as well. - - The ownership of 'command' is transferred to GDB. */ - void execute(GDBCommand* command); - - /** Returns true if 'execute' can be called immediately. */ - bool isReady() const; - - /** FIXME: temporary, to be eliminated. */ - GDBCommand* currentCommand() const; - - /** Arrange to gdb to stop doing whatever it's doing, - and start waiting for a command. - FIXME: probably should make sure that 'ready' is - emitted, or something. */ - void interrupt(); - - /** Kills GDB. */ - void kill(); - -Q_SIGNALS: - /** Emitted when debugger becomes ready -- i.e. when - isReady call will return true. */ - void ready(); - - /** Emitted when GDB itself exits. This could happen because - it just crashed due to internal bug, or we killed it - explicitly. */ - void gdbExited(); - - /** Emitted when GDB reports stop, with 'r' being the - data provided by GDB. */ - void programStopped(const GDBMI::ResultRecord& r); - - /** Emitted when GDB believes that the program is running. */ - void programRunning(); - - /** Emitted for each MI stream record found. Presently only - used to recognize some CLI messages that mean that the program - has died. - FIXME: connect to parseCliLine - */ - void streamRecord(const GDBMI::StreamRecord& s); - - /** FIXME: temporary, to be eliminated. */ - void resultRecord(const GDBMI::ResultRecord& s); - - /** Reports a general MI notification. */ - void notification(const GDBMI::ResultRecord& n); - - /** Emitted for error that is not handled by the - command being executed. */ - void error(const GDBMI::ResultRecord& s); - - /** Reports output from the running application. - Generally output will only be available when - using remote GDB targets. When running locally, - the output will either appear on GDB stdout, and - ignored, or routed via pty. */ - void applicationOutput(const QString& s); - - /** Reports output of a command explicitly typed by - the user, or output from .gdbinit commands. */ - void userCommandOutput(const QString& s); - - /** Reports output of a command issued internally - by KDevelop. At the moment, stderr output from - GDB and the 'log' MI channel will be also routed here. */ - void internalCommandOutput(const QString& s); - -private Q_SLOTS: - void readyReadStandardOutput(); - void readyReadStandardError(); - void processFinished(int exitCode, QProcess::ExitStatus exitStatus); - void processErrored(QProcess::ProcessError); - -private: - void processLine(const QByteArray& line); - -private: - QString gdbBinary_; - KProcess* process_; - bool sawPrompt_; - - GDBCommand* currentCmd_; - - MIParser mi_parser_; - - /** The unprocessed output from gdb. Output is - processed as soon as we see newline. */ - QByteArray buffer_; - - bool receivedReply_; - bool isRunning_; - unsigned long childPid_; -}; -} - -#endif diff --git a/kdevelop/debuggers/gdb/gdbcommand.cpp b/kdevelop/debuggers/gdb/gdbcommand.cpp deleted file mode 100644 index 67abbd87..00000000 --- a/kdevelop/debuggers/gdb/gdbcommand.cpp +++ /dev/null @@ -1,611 +0,0 @@ -/*************************************************************************** - begin : Sun Aug 8 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "gdbcommand.h" - -using namespace GDBMI; - -namespace GDBDebugger -{ - -GDBCommand::GDBCommand(GDBMI::CommandType type, const QString &command) -: type_(type), command_(command), handler_method(0), commandHandler_(0), - run(false), stateReloading_(false), handlesError_(false), m_thread(-1), m_frame(-1) -{ -} - -GDBCommand::GDBCommand(GDBMI::CommandType type, int index) -: type_(type), command_(QString::number(index)), handler_method(0), commandHandler_(0), - run(false), stateReloading_(false), handlesError_(false), m_thread(-1), m_frame(-1) -{ -} - -GDBCommand::GDBCommand(CommandType type, const QString& arguments, GDBCommandHandler* handler) -: type_(type), command_(arguments), handler_method(0), commandHandler_(handler), - run(false), stateReloading_(false), m_thread(-1), m_frame(-1) -{ - handlesError_ = handler->handlesError(); -} - -QString GDBCommand::cmdToSend() -{ - return initialString() + '\n'; -} - -QString GDBCommand::initialString() const -{ - if (type() == NonMI) - return command_; - else - { - QString result = gdbCommand(); - - if (m_thread != -1) - result = result + QString(" --thread %1").arg(m_thread); - if (m_frame != -1) - result = result + QString(" --frame %1").arg(m_frame); - - if (!command_.isEmpty()) - result += ' ' + command_; - - return result; - } -} - -bool GDBCommand::isUserCommand() const -{ - return false; -} - -bool -GDBCommand::invokeHandler(const GDBMI::ResultRecord& r) -{ - if (handler_this) { - (handler_this.data()->*handler_method)(r); - return true; - } else if (commandHandler_) { - bool autoDelete = commandHandler_->autoDelete(); //ask before calling handler as it might deleted itself in handler - commandHandler_->handle(r); - if (autoDelete) { - delete commandHandler_; - } - commandHandler_ = 0; - return true; - } else { - return false; - } -} - -void GDBCommand::newOutput(const QString& line) -{ - lines.push_back(line); -} - -const QStringList& GDBCommand::allStreamOutput() const -{ - return lines; -} - -bool GDBCommand::handlesError() const -{ - return handlesError_; -} - -GDBCommand::~GDBCommand() -{ -} - -bool GDBCommand::isRun() const -{ - return run; -} - -void GDBCommand::setRun(bool run) -{ - this->run = run; -} - - -UserCommand::UserCommand(GDBMI::CommandType type, const QString& s) -: GDBCommand(type, s) -{ -} - -bool UserCommand::isUserCommand() const -{ - return true; -} - - -bool CliCommand::invokeHandler(const GDBMI::ResultRecord& r) -{ - // On error, do nothing. - if (r.reason != "done") - return true; - - if (cli_handler_this) { - (cli_handler_this.data()->*cli_handler_method)(allStreamOutput()); - return true; - } - else { - return false; - } - -} - -QString GDBCommand::gdbCommand() const -{ - QString command; - - switch (type()) { - case NonMI: - command = ""; - break; - case BreakAfter: - command = "break-after";//"ignore" - break; - case BreakCatch: - command = "break-catch"; - break; - case BreakCommands: - command = "break-commands"; - break; - case BreakCondition: - command = "break-condition";//"cond" - break; - case BreakDelete: - command = "break-delete";//"delete breakpoint" - break; - case BreakDisable: - command = "break-disable";//"disable breakpoint" - break; - case BreakEnable: - command = "break-enable";//"enable breakpoint" - break; - case BreakInfo: - command = "break-info";//"info break" - break; - case BreakInsert: - command = "break-insert -f"; - break; - case BreakList: - command = "break-list";//"info break" - break; - case BreakWatch: - command = "break-watch"; - break; - - case DataDisassemble: - command = "data-disassemble"; - break; - case DataEvaluateExpression: - command = "data-evaluate-expression"; - break; - case DataListChangedRegisters: - command = "data-list-changed-registers"; - break; - case DataListRegisterNames: - command = "data-list-register-names"; - break; - case DataListRegisterValues: - command = "data-list-register-values"; - break; - case DataReadMemory: - command = "data-read-memory"; - break; - case DataWriteMemory: - command = "data-write-memory"; - break; - case DataWriteRegisterVariables: - command = "data-write-register-values"; - break; - - case EnablePrettyPrinting: - command = "enable-pretty-printing"; - break; - case EnableTimings: - command = "enable-timings"; - break; - - case EnvironmentCd: - command = "environment-cd"; - break; - case EnvironmentDirectory: - command = "environment-directory"; - break; - case EnvironmentPath: - command = "environment-path"; - break; - case EnvironmentPwd: - command = "environment-pwd"; - break; - - case ExecAbort: - command = "exec-abort"; - break; - case ExecArguments: - command = "exec-arguments";//"set args" - break; - case ExecContinue: - command = "exec-continue"; - break; - case ExecFinish: - command = "exec-finish"; - break; - case ExecInterrupt: - command = "exec-interrupt"; - break; - case ExecNext: - command = "exec-next"; - break; - case ExecNextInstruction: - command = "exec-next-instruction"; - break; - case ExecReturn: - command = "exec-command ="; - break; - case ExecRun: - command = "exec-run"; - break; - case ExecShowArguments: - command = "exec-show-arguments"; - break; - case ExecSignal: - command = "exec-signal"; - break; - case ExecStep: - command = "exec-step"; - break; - case ExecStepInstruction: - command = "exec-step-instruction"; - break; - case ExecUntil: - command = "exec-until"; - break; - - case FileClear: - command = "file-clear"; - break; - case FileExecAndSymbols: - command = "file-exec-and-symbols";//"file" - break; - case FileExecFile: - command = "file-exec-file";//"exec-file" - break; - case FileListExecSections: - command = "file-list-exec-sections"; - break; - case FileListExecSourceFile: - command = "file-list-exec-source-file"; - break; - case FileListExecSourceFiles: - command = "file-list-exec-source-files"; - break; - case FileListSharedLibraries: - command = "file-list-shared-libraries"; - break; - case FileListSymbolFiles: - command = "file-list-symbol-files"; - break; - case FileSymbolFile: - command = "file-symbol-file";//"symbol-file" - break; - - case GdbComplete: - command = "gdb-complete"; - break; - case GdbExit: - command = "gdb-exit"; - break; - case GdbSet: - command = "gdb-set";//"set" - break; - case GdbShow: - command = "gdb-show";//"show" - break; - case GdbSource: - command = "gdb-source"; - break; - case GdbVersion: - command = "gdb-version";//"show version" - break; - - case InferiorTtySet: - command = "inferior-tty-set"; - break; - case InferiorTtyShow: - command = "inferior-tty-show"; - break; - - case InterpreterExec: - command = "interpreter-exec"; - break; - - case ListFeatures: - command = "list-features"; - break; - - case OverlayAuto: - command = "overlay-auto"; - break; - case OverlayListMappingState: - command = "overlay-list-mapping-state"; - break; - case OverlayListOverlays: - command = "overlay-list-overlays"; - break; - case OverlayMap: - command = "overlay-map"; - break; - case OverlayOff: - command = "overlay-off"; - break; - case OverlayOn: - command = "overlay-on"; - break; - case OverlayUnmap: - command = "overlay-unmap"; - break; - - case SignalHandle: - return "handle"; - //command = "signal-handle"; - break; - case SignalListHandleActions: - command = "signal-list-handle-actions"; - break; - case SignalListSignalTypes: - command = "signal-list-signal-types"; - break; - - case StackInfoDepth: - command = "stack-info-depth"; - break; - case StackInfoFrame: - command = "stack-info-frame"; - break; - case StackListArguments: - command = "stack-list-arguments"; - break; - case StackListExceptionHandlers: - command = "stack-list-exception-handlers"; - break; - case StackListFrames: - command = "stack-list-frames"; - break; - case StackListLocals: - command = "stack-list-locals"; - break; - case StackSelectFrame: - command = "stack-select-frame"; - break; - - case SymbolInfoAddress: - command = "symbol-info-address"; - break; - case SymbolInfoFile: - command = "symbol-info-file"; - break; - case SymbolInfoFunction: - command = "symbol-info-function"; - break; - case SymbolInfoLine: - command = "symbol-info-line"; - break; - case SymbolInfoSymbol: - command = "symbol-info-symbol"; - break; - case SymbolListFunctions: - command = "symbol-list-functions"; - break; - case SymbolListLines: - command = "symbol-list-lines"; - break; - case SymbolListTypes: - command = "symbol-list-types"; - break; - case SymbolListVariables: - command = "symbol-list-variables"; - break; - case SymbolLocate: - command = "symbol-locate"; - break; - case SymbolType: - command = "symbol-type"; - break; - - case TargetAttach: - command = "target-attach"; - break; - case TargetCompareSections: - command = "target-compare-sections"; - break; - case TargetDetach: - command = "target-detach";//"detach" - break; - case TargetDisconnect: - command = "target-disconnect";//"disconnect" - break; - case TargetDownload: - command = "target-download"; - break; - case TargetExecStatus: - command = "target-exec-status"; - break; - case TargetListAvailableTargets: - command = "target-list-available-targets"; - break; - case TargetListCurrentTargets: - command = "target-list-current-targets"; - break; - case TargetListParameters: - command = "target-list-parameters"; - break; - case TargetSelect: - command = "target-select"; - break; - - case ThreadInfo: - command = "thread-info"; - break; - case ThreadListAllThreads: - command = "thread-list-all-threads"; - break; - case ThreadListIds: - command = "thread-list-ids"; - break; - case ThreadSelect: - command = "thread-select"; - break; - - case TraceActions: - command = "trace-actions"; - break; - case TraceDelete: - command = "trace-delete"; - break; - case TraceDisable: - command = "trace-disable"; - break; - case TraceDump: - command = "trace-dump"; - break; - case TraceEnable: - command = "trace-enable"; - break; - case TraceExists: - command = "trace-exists"; - break; - case TraceFind: - command = "trace-find"; - break; - case TraceFrameNumber: - command = "trace-frame-number"; - break; - case TraceInfo: - command = "trace-info"; - break; - case TraceInsert: - command = "trace-insert"; - break; - case TraceList: - command = "trace-list"; - break; - case TracePassCount: - command = "trace-pass-count"; - break; - case TraceSave: - command = "trace-save"; - break; - case TraceStart: - command = "trace-start"; - break; - case TraceStop: - command = "trace-stop"; - break; - - case VarAssign: - command = "var-assign"; - break; - case VarCreate: - command = "var-create"; - break; - case VarDelete: - command = "var-delete"; - break; - case VarEvaluateExpression: - command = "var-evaluate-expression"; - break; - case VarInfoPathExpression: - command = "var-info-path-expression"; - break; - case VarInfoExpression: - command = "var-info-expression"; - break; - case VarInfoNumChildren: - command = "var-info-num-children"; - break; - case VarInfoType: - command = "var-info-type"; - break; - case VarListChildren: - command = "var-list-children"; - break; - case VarSetFormat: - command = "var-set-format"; - break; - case VarSetFrozen: - command = "var-set-frozen"; - break; - case VarShowAttributes: - command = "var-show-attributes"; - break; - case VarShowFormat: - command = "var-show-format"; - break; - case VarUpdate: - command = "var-update"; - break; - - default: - command = "unknown"; - break; - } - - return '-' + command; -} - -GDBMI::CommandType GDBCommand::type() const -{ - return type_; -} - -int GDBCommand::thread() const -{ - return m_thread; -} - -void GDBCommand::setThread(int thread) -{ - m_thread = thread; -} - -int GDBCommand::frame() const -{ - return m_frame; -} - -void GDBCommand::setFrame(int frame) -{ - m_frame = frame; -} - -QString GDBCommand::command() const -{ - return command_; -} - -void GDBCommand::setStateReloading(bool f) -{ - stateReloading_ = f; -} - -bool GDBCommand::stateReloading() const -{ - return stateReloading_; -} - - -} diff --git a/kdevelop/debuggers/gdb/gdbcommand.h b/kdevelop/debuggers/gdb/gdbcommand.h deleted file mode 100644 index 4a6a68b7..00000000 --- a/kdevelop/debuggers/gdb/gdbcommand.h +++ /dev/null @@ -1,345 +0,0 @@ -/*************************************************************************** - begin : Sun Aug 8 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _GDBCOMMAND_H_ -#define _GDBCOMMAND_H_ - -#include -#include -#include - -#include "mi/gdbmi.h" -#include - -namespace GDBDebugger -{ - - -class VarItem; -class ValueCallback; - -//base class for handlers -class GDBCommandHandler -{ -public: - virtual ~GDBCommandHandler() {} - virtual void handle(const GDBMI::ResultRecord&) = 0; - virtual bool handlesError() { return false; } - - /** - * If the handler object should be deleted after the handle() call. - */ - virtual bool autoDelete() { return true; } -}; - -/** - * @author John Birch - */ - -class GDBCommand -{ -public: - GDBCommand(GDBMI::CommandType type, const QString& arguments = QString()); - GDBCommand(GDBMI::CommandType type, int index); - - template - GDBCommand(GDBMI::CommandType type, const QString& arguments, - Handler* handler_this, - void (Handler::* handler_method)(const GDBMI::ResultRecord&), - bool handlesError = false); - - template - GDBCommand(GDBMI::CommandType type, int index, - Handler* handler_this, - void (Handler::* handler_method)(const GDBMI::ResultRecord&), - bool handlesError = false); - - GDBCommand(GDBMI::CommandType type, const QString& arguments, GDBCommandHandler* handler); - - GDBMI::CommandType type() const; - QString gdbCommand() const; - - /** - * Returns the thread that needs to be currently selected when this command is executed, - * or -1 if there is no requirement. - */ - int thread() const; - - /** - * Set the thread required to be currently selected when the command is executed. - */ - void setThread(int thread); - - /** - * Returns the frame that needs to be currently selected when this command is executed, - * or -1 if there is no requirement. - */ - int frame() const; - - /** - * Set the frame required to be currently selected when the command is executed. - */ - void setFrame(int frame); - - /** - * Sets the handler for results. - */ - template - void setHandler(Handler* handler_this, void (Handler::* handler_method)(const GDBMI::ResultRecord&), bool handlesError = false); - - /* The command that should be sent to gdb. - This method is virtual so the command can compute this - dynamically, possibly using results of the previous - commands. - If the empty string is returned, nothing is sent. */ - virtual QString cmdToSend(); - - /* Returns the initial string that was specified in - ctor invocation. The actual command will be - determined by cmdToSend above and the return - value of this method is only used in various - diagnostic messages emitted before actually - sending the command. */ - QString initialString() const; - - /* Returns true if this is command entered by the user - and so should be always shown in the gdb output window. */ - virtual bool isUserCommand() const; - - // If there's a handler for this command, invokes it and returns true. - // Otherwise, returns false. - virtual bool invokeHandler(const GDBMI::ResultRecord& r); - - // Returns 'true' if 'invokeHandler' should be invoked even - // on MI errors. - bool handlesError() const; - - virtual ~GDBCommand(); - - // Called by gdbcontroller for each new output string - // gdb emits for this command. In MI mode, this includes - // all "stream" messages, but does not include MI responses. - void newOutput(const QString&); - - const QStringList& allStreamOutput() const; - - // True if this command run then target for - // unspecified period of time -- that is either 'run' or - // 'continue'. - bool isRun() const; - - void setRun(bool run); - - QString command() const; - - void setStateReloading(bool f); - - bool stateReloading() const; - -private: - GDBMI::CommandType type_; - QString command_; - QWeakPointer handler_this; - typedef void (QObject::* handler_t)(const GDBMI::ResultRecord&); - handler_t handler_method; - GDBCommandHandler *commandHandler_; - QStringList lines; - bool run; - bool stateReloading_; - -protected: // FIXME: should be private, after I kill the first ctor - // that is obsolete and no longer necessary. - bool handlesError_; - -private: - int m_thread; - int m_frame; -}; - -class UserCommand : public GDBCommand -{ -public: - UserCommand(GDBMI::CommandType type, const QString& s); - - bool isUserCommand() const; -}; - -/** This is a class for raw CLI commands. Instead of invoking - user provided hook with MI response, it invokes the a hook - with lists of strings. -*/ -class CliCommand : public GDBCommand -{ -public: - template - CliCommand(GDBMI::CommandType type, const QString& command, - Handler* handler_this, - void (Handler::* handler_method)(const QStringList&), - bool handlesError = false); - - - -public: // GDBCommand overrides - bool invokeHandler(const GDBMI::ResultRecord& r); - -private: - QWeakPointer cli_handler_this; - typedef void (QObject::* cli_handler_t)(const QStringList&); - cli_handler_t cli_handler_method; -}; - -/** Command that does nothing and can be just used to invoke - a user provided handler when all preceeding commands are - executed. -*/ -class SentinelCommand : public GDBCommand -{ -public: - typedef void (QObject::*handler_method_t)(); - - template - SentinelCommand(Handler* handler_this, - void (Handler::* handler_method)()) - : GDBCommand(GDBMI::NonMI, ""), - handler_this(handler_this), - handler_method(static_cast(handler_method)) - {} - - using GDBCommand::invokeHandler; - void invokeHandler() - { - (handler_this.data()->*handler_method)(); - } - - QString cmdToSend() - { - return ""; - } - -private: - QWeakPointer handler_this; - handler_method_t handler_method; - -}; - -/* Command for which we don't want any reply. */ -class ResultlessCommand : public QObject, public GDBCommand -{ -public: - ResultlessCommand(GDBMI::CommandType type, const QString& command, bool handlesError = false) - : GDBCommand(type, command, this, &ResultlessCommand::handle, handlesError) - {} - -private: - void handle(const GDBMI::ResultRecord&) - {} -}; - -class ExpressionValueCommand : public QObject, public GDBCommand -{ -public: - typedef void (QObject::*handler_method_t)(const QString&); - - template - ExpressionValueCommand( - const QString& expression, - Handler* handler_this, - void (Handler::* handler_method)(const QString&)) - : GDBCommand(GDBMI::DataEvaluateExpression, expression, this, - &ExpressionValueCommand::handleResponse), - handler_this(handler_this), - handler_method(static_cast(handler_method)) - {} - - void handleResponse(const GDBMI::ResultRecord& r) - { - (handler_this.data()->*handler_method)(r["value"].literal()); - } - -private: - QWeakPointer handler_this; - handler_method_t handler_method; -}; - - -template -GDBCommand::GDBCommand( - GDBMI::CommandType type, - const QString& command, - Handler* handler_this, - void (Handler::* handler_method)(const GDBMI::ResultRecord&), - bool handlesError) -: type_(type), - command_(command), - handler_this(handler_this), - handler_method(static_cast(handler_method)), - commandHandler_(0), - run(false), - stateReloading_(false), - handlesError_(handlesError), - m_thread(-1), - m_frame(-1) -{ -} - -template -GDBCommand::GDBCommand( - GDBMI::CommandType type, - int index, - Handler* handler_this, - void (Handler::* handler_method)(const GDBMI::ResultRecord&), - bool handlesError) -: type_(type), - command_(QString::number(index)), - handler_this(handler_this), - handler_method(static_cast(handler_method)), - commandHandler_(0), - run(false), - stateReloading_(false), - handlesError_(handlesError), - m_thread(-1), - m_frame(-1) -{ -} - -template -CliCommand::CliCommand( - GDBMI::CommandType type, - const QString& command, - Handler* handler_this, - void (Handler::* handler_method)(const QStringList&), - bool handlesError) -: GDBCommand(type, command), - cli_handler_this(handler_this), - cli_handler_method(static_cast(handler_method)) -{ - handlesError_ = handlesError; -} - -template -void GDBCommand::setHandler(Handler* handler_this, void (Handler::* handler_method)(const GDBMI::ResultRecord&), bool handlesError) -{ - GDBCommand::handler_this = handler_this; - GDBCommand::handler_method = static_cast(handler_method); - handlesError_ = handlesError; -} - -} - - - - - -#endif diff --git a/kdevelop/debuggers/gdb/gdbcommandqueue.cpp b/kdevelop/debuggers/gdb/gdbcommandqueue.cpp deleted file mode 100644 index 801bc41e..00000000 --- a/kdevelop/debuggers/gdb/gdbcommandqueue.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// ************************************************************************* -// gdbcommandqueue.cpp -// ------------------- -// begin : Wed Dec 5, 2007 -// copyright : (C) 2007 by Hamish Rodda -// email : rodda@kde.org -// ************************************************************************** -// -// ************************************************************************** -// * * -// * 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 2 of the License, or * -// * (at your option) any later version. * -// * * -// ************************************************************************** - -#include "gdbcommandqueue.h" - -#include "mi/gdbmi.h" -#include "gdbcommand.h" - -using namespace GDBDebugger; -using namespace GDBMI; - -CommandQueue::CommandQueue() -{ -} - -CommandQueue::~CommandQueue() -{ - qDeleteAll(m_commandList); -} - -void GDBDebugger::CommandQueue::enqueue(GDBCommand * command, QueuePosition insertPosition) -{ - switch (insertPosition) { - case QueueAtFront: - m_commandList.prepend(command); - break; - case QueueAtEnd: - m_commandList.append(command); - break; - - case QueueWhileInterrupted: { - int i; - for (i = 0; i < m_commandList.count(); ++i) - if (m_commandList.at(i)->isRun()) - break; - - m_commandList.insert(i, command); - } - } - - rationalizeQueue(command); -} - -void CommandQueue::rationalizeQueue(GDBCommand * command) -{ - if (command->type() >= ExecAbort && command->type() <= ExecUntil) - // Changing execution location, abort any variable updates - removeVariableUpdates(); -} - -void GDBDebugger::CommandQueue::removeVariableUpdates() -{ - QMutableListIterator it = m_commandList; - - while (it.hasNext()) { - CommandType type = it.next()->type(); - if ((type >= VarEvaluateExpression && type <= VarListChildren) || type == VarUpdate) - it.remove(); - } -} - -void GDBDebugger::CommandQueue::clear() -{ - qDeleteAll(m_commandList); - m_commandList.clear(); -} - -int GDBDebugger::CommandQueue::count() const -{ - return m_commandList.count(); -} - -bool GDBDebugger::CommandQueue::isEmpty() const -{ - return m_commandList.isEmpty(); -} - -GDBCommand * GDBDebugger::CommandQueue::nextCommand() -{ - if (!m_commandList.isEmpty()) - return m_commandList.takeAt(0); - - return 0; -} - diff --git a/kdevelop/debuggers/gdb/gdbcommandqueue.h b/kdevelop/debuggers/gdb/gdbcommandqueue.h deleted file mode 100644 index 7d82f45a..00000000 --- a/kdevelop/debuggers/gdb/gdbcommandqueue.h +++ /dev/null @@ -1,56 +0,0 @@ -// ************************************************************************* -// gdbcommandqueue.cpp -// ------------------- -// begin : Wed Dec 5, 2007 -// copyright : (C) 2007 by Hamish Rodda -// email : rodda@kde.org -// ************************************************************************** -// -// ************************************************************************** -// * * -// * 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 2 of the License, or * -// * (at your option) any later version. * -// * * -// ************************************************************************** - -#ifndef GDBCOMMANDQUEUE_H -#define GDBCOMMANDQUEUE_H - -#include - -#include "gdbglobal.h" - -namespace GDBDebugger -{ - -class GDBCommand; - -class CommandQueue -{ -public: - CommandQueue(); - ~CommandQueue(); - - void enqueue(GDBCommand* command, QueuePosition insertPosition); - - bool isEmpty() const; - int count() const; - void clear(); - - /** - * Retrieve and remove the next command from the list. - */ - GDBCommand* nextCommand(); - -private: - void rationalizeQueue(GDBCommand* command); - void removeVariableUpdates(); - - QList m_commandList; -}; - -} - -#endif // GDBCOMMANDQUEUE_H diff --git a/kdevelop/debuggers/gdb/gdbframestackmodel.cpp b/kdevelop/debuggers/gdb/gdbframestackmodel.cpp deleted file mode 100644 index e9e1fce3..00000000 --- a/kdevelop/debuggers/gdb/gdbframestackmodel.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * GDB-specific implementation of thread and frame model. - * - * Copyright 2009 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "gdbframestackmodel.h" -#include "gdbcommand.h" - -using namespace KDevelop; - -QString getFunctionOrAddress(const GDBMI::Value &frame) -{ - if (frame.hasField("func")) - return frame["func"].literal(); - else - return frame["addr"].literal(); -} - -QPair getSource(const GDBMI::Value &frame) -{ - QPair ret(QString(), -1); - if (frame.hasField("fullname")) - ret=qMakePair(frame["fullname"].literal(), frame["line"].toInt()-1); - else if (frame.hasField("file")) - ret=qMakePair(frame["file"].literal(), frame["line"].toInt()-1); - else if (frame.hasField("from")) - ret.first=frame["from"].literal(); - - return ret; -} - -void GdbFrameStackModel::fetchThreads() -{ - session()->addCommand( - new GDBCommand(GDBMI::ThreadInfo, "", - this, - &GdbFrameStackModel::handleThreadInfo)); -} - -void GdbFrameStackModel::handleThreadInfo(const GDBMI::ResultRecord& r) -{ - const GDBMI::Value& threads = r["threads"]; - - // Traverse GDB threads in backward order -- since GDB - // reports them in backward order. We want UI to - // show thread IDs in the natural order. - // FIXME: make the code independent of whatever craziness - // gdb might have tomorrow. - - QList threadsList; - int gidx = threads.size()-1; - for (; gidx >= 0; --gidx) { - KDevelop::FrameStackModel::ThreadItem i; - i.nr = threads[gidx]["id"].toInt(); - i.name = getFunctionOrAddress(threads[gidx]["frame"]); - threadsList << i; - } - setThreads(threadsList); - if (r.hasField("current-thread-id")) - setCurrentThread(r["current-thread-id"].toInt()); -} - - -struct FrameListHandler : public GDBCommandHandler -{ - FrameListHandler(GdbFrameStackModel* frames, int thread, int to) - : m_frames(frames), m_thread(thread) , m_to(to) {} - - virtual void handle(const GDBMI::ResultRecord &r) - { - const GDBMI::Value& stack = r["stack"]; - int first = stack[0]["level"].toInt(); - QList frames; - for (int i = 0; i< stack.size(); ++i) { - const GDBMI::Value& frame = stack[i]; - KDevelop::FrameStackModel::FrameItem f; - f.nr = frame["level"].toInt(); - f.name = getFunctionOrAddress(frame); - QPair loc = getSource(frame); - f.file = loc.first; - f.line = loc.second; - frames << f; - } - bool hasMore = false; - if (!frames.isEmpty()) { - if (frames.last().nr == m_to+1) { - frames.takeLast(); - hasMore = true; - } - } - if (first == 0) { - m_frames->setFrames(m_thread, frames); - } else { - m_frames->insertFrames(m_thread, frames); - } - m_frames->setHasMoreFrames(m_thread, hasMore); - } -private: - GdbFrameStackModel* m_frames; - int m_thread; - int m_to; -}; - -void GdbFrameStackModel::fetchFrames(int threadNumber, int from, int to) -{ - //to+1 so we know if there are more - QString arg = QString("%1 %2").arg(from).arg(to+1); - GDBCommand *c = new GDBCommand(GDBMI::StackListFrames, arg, - new FrameListHandler(this, threadNumber, to)); - c->setThread(threadNumber); - session()->addCommand(c); -} diff --git a/kdevelop/debuggers/gdb/gdbframestackmodel.h b/kdevelop/debuggers/gdb/gdbframestackmodel.h deleted file mode 100644 index d6f2db42..00000000 --- a/kdevelop/debuggers/gdb/gdbframestackmodel.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * GDB-specific implementation of thread and frame model. - * - * Copyright 2009 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef KDEVELOP_GDB_FRAMESTACKMODEL_H -#define KDEVELOP_GDB_FRAMESTACKMODEL_H - -#include - -#include "debugsession.h" -using namespace GDBDebugger; - -namespace GDBMI { struct ResultRecord; } - -namespace KDevelop { - - class GdbFrameStackModel : public FrameStackModel - { - public: - GdbFrameStackModel(DebugSession* session) : FrameStackModel(session) {} - - public: - DebugSession* session() { return static_cast(FrameStackModel::session()); } - - protected: // FrameStackModel overrides - void fetchThreads(); - void fetchFrames(int threadNumber, int from, int to); - - private: - void handleThreadInfo(const GDBMI::ResultRecord& r); - }; -} - -#endif diff --git a/kdevelop/debuggers/gdb/gdbglobal.h b/kdevelop/debuggers/gdb/gdbglobal.h deleted file mode 100644 index 1a661e78..00000000 --- a/kdevelop/debuggers/gdb/gdbglobal.h +++ /dev/null @@ -1,61 +0,0 @@ -/*************************************************************************** - gdbglobal.h - ------------------- - begin : Sun Aug 8 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _GDBGLOBAL_H_ -#define _GDBGLOBAL_H_ - -#include - -namespace GDBDebugger -{ - -enum DBGStateFlag -{ - s_none = 0, - s_dbgNotStarted = 1, - s_appNotStarted = 2, - s_programExited = 16, - s_attached = 512, - s_core = 1024, - s_waitTimer = 2048, - // Set when 'slotStopDebugger' started executing, to avoid - // entering that function several times. - s_shuttingDown = 4096, - s_explicitBreakInto = (s_shuttingDown << 1), - s_dbgBusy = (s_explicitBreakInto << 1), - s_appRunning = (s_dbgBusy << 1), - s_lastDbgState = (s_appRunning << 1) - -}; - -Q_DECLARE_FLAGS(DBGStateFlags, DBGStateFlag) -Q_DECLARE_OPERATORS_FOR_FLAGS(DBGStateFlags) - -enum QueuePosition { - QueueAtEnd, - QueueAtFront, - QueueWhileInterrupted -}; - - -enum DataType { typeUnknown, typeValue, typePointer, typeReference, - typeStruct, typeArray, typeQString, typeWhitespace, - typeName }; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/gdblaunchconfig.cpp b/kdevelop/debuggers/gdb/gdblaunchconfig.cpp deleted file mode 100644 index f4ab1a32..00000000 --- a/kdevelop/debuggers/gdb/gdblaunchconfig.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* -* GDB Debugger Support -* -* Copyright 2006 Vladimir Prus -* Copyright 2007 Hamish Rodda -* Copyright 2009 Andreas Pakulat -* -* 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 2 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, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - - -#include "gdblaunchconfig.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "debugsession.h" -#include "debuggerplugin.h" - -#include "ui_debuggerconfigwidget.h" -#include -#include -#include "debugjob.h" - -using namespace KDevelop; - -GdbConfigPage::GdbConfigPage( QWidget* parent ) - : LaunchConfigurationPage(parent), ui( new Ui::DebuggerConfigWidget ) -{ - ui->setupUi( this ); - ui->kcfg_gdbPath->setMode(KFile::File|KFile::ExistingOnly|KFile::LocalOnly); - connect(ui->kcfg_asmDemangle, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(ui->kcfg_configGdbScript, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - //connect(ui->kcfg_dbgTerminal, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(ui->kcfg_debuggingShell, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - connect(ui->kcfg_displayStaticMembers, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(ui->kcfg_gdbPath, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - connect(ui->kcfg_runGdbScript, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - connect(ui->kcfg_runShellScript, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); - connect(ui->kcfg_startWith, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed())); - - //Setup data info for combobox - ui->kcfg_startWith->setItemData(0, "ApplicationOutput" ); - ui->kcfg_startWith->setItemData(1, "GdbConsole" ); - ui->kcfg_startWith->setItemData(2, "FrameStack" ); -} - -GdbConfigPage::~GdbConfigPage() -{ - delete ui; -} - -KIcon GdbConfigPage::icon() const -{ - return KIcon(); -} - -void GdbConfigPage::loadFromConfiguration( const KConfigGroup& cfg, KDevelop::IProject* ) -{ - bool block = blockSignals( true ); - ui->kcfg_gdbPath->setUrl( cfg.readEntry( GDBDebugger::gdbPathEntry, KUrl() ) ); - ui->kcfg_debuggingShell->setUrl( cfg.readEntry( GDBDebugger::debuggerShellEntry, KUrl() ) ); - ui->kcfg_configGdbScript->setUrl( cfg.readEntry( GDBDebugger::remoteGdbConfigEntry, KUrl() ) ); - ui->kcfg_runShellScript->setUrl( cfg.readEntry( GDBDebugger::remoteGdbShellEntry, KUrl() ) ); - ui->kcfg_runGdbScript->setUrl( cfg.readEntry( GDBDebugger::remoteGdbRunEntry, KUrl() ) ); - ui->kcfg_displayStaticMembers->setChecked( cfg.readEntry(GDBDebugger::staticMembersEntry, false) ); - ui->kcfg_asmDemangle->setChecked( cfg.readEntry( GDBDebugger::demangleNamesEntry, true) ); - ui->kcfg_startWith->setCurrentIndex( ui->kcfg_startWith->findData( cfg.readEntry( GDBDebugger::startWithEntry, "ApplicationOutput" ) ) ); - blockSignals( block ); -} - -void GdbConfigPage::saveToConfiguration( KConfigGroup cfg, KDevelop::IProject* ) const -{ - cfg.writeEntry(GDBDebugger::gdbPathEntry, ui->kcfg_gdbPath->url() ); - cfg.writeEntry(GDBDebugger::debuggerShellEntry, ui->kcfg_debuggingShell->url() ); - cfg.writeEntry(GDBDebugger::remoteGdbConfigEntry, ui->kcfg_configGdbScript->url() ); - cfg.writeEntry(GDBDebugger::remoteGdbShellEntry, ui->kcfg_runShellScript->url() ); - cfg.writeEntry(GDBDebugger::remoteGdbRunEntry, ui->kcfg_runGdbScript->url() ); - cfg.writeEntry(GDBDebugger::staticMembersEntry, ui->kcfg_displayStaticMembers->isChecked() ); - cfg.writeEntry(GDBDebugger::demangleNamesEntry, ui->kcfg_asmDemangle->isChecked() ); - cfg.writeEntry(GDBDebugger::startWithEntry, ui->kcfg_startWith->itemData( ui->kcfg_startWith->currentIndex() ).toString() ); -} - -QString GdbConfigPage::title() const -{ - return i18n( "GDB Configuration" ); -} - - -GdbLauncher::GdbLauncher( GDBDebugger::CppDebuggerPlugin* p, IExecutePlugin* execute ) - : m_plugin( p ) - , m_execute( execute ) -{ - factoryList << new GdbConfigPageFactory(); -} - -QList< KDevelop::LaunchConfigurationPageFactory* > GdbLauncher::configPages() const -{ - return factoryList; -} - -QString GdbLauncher::id() -{ - return "gdb"; -} - -QString GdbLauncher::name() const -{ - return i18n("GDB"); -} - -KJob* GdbLauncher::start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) -{ - Q_ASSERT(cfg); - if( !cfg ) - { - return 0; - } - if( launchMode == "debug" ) - { - QList l; - Q_ASSERT(m_execute); - QString err; - KJob* depjob = m_execute->dependecyJob(cfg); - if( depjob ) - { - l << depjob; - } - l << new GDBDebugger::DebugJob( m_plugin, cfg, m_execute ); - return new KDevelop::ExecuteCompositeJob( KDevelop::ICore::self()->runController(), l ); - } - kWarning() << "Unknown launch mode" << launchMode << "for config:" << cfg->name(); - return 0; -} - -QStringList GdbLauncher::supportedModes() const -{ - return QStringList() << "debug"; -} - -QString GdbLauncher::description() const -{ - return i18n("Executes a Native application in GDB"); -} - -KDevelop::LaunchConfigurationPage* GdbConfigPageFactory::createWidget( QWidget* parent ) -{ - return new GdbConfigPage( parent ); -} - - - -#include "moc_gdblaunchconfig.cpp" diff --git a/kdevelop/debuggers/gdb/gdblaunchconfig.h b/kdevelop/debuggers/gdb/gdblaunchconfig.h deleted file mode 100644 index e65ab347..00000000 --- a/kdevelop/debuggers/gdb/gdblaunchconfig.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -* GDB Debugger Support -* -* Copyright 2006 Vladimir Prus -* Copyright 2007 Hamish Rodda -* Copyright 2009 Andreas Pakulat -* -* 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 2 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, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -#ifndef GDBLAUNCHCONFIG -#define GDBLAUNCHCONFIG - -#include -#include -#include - -class IExecutePlugin; -namespace Ui -{ -class DebuggerConfigWidget; -} -namespace KDevelop -{ -class OutputModel; -class ILaunchConfiguration; -class IProject; -} - -namespace GDBDebugger -{ -class CppDebuggerPlugin; -class DebugSession; -} - -class GdbConfigPageFactory : public KDevelop::LaunchConfigurationPageFactory -{ -public: - virtual KDevelop::LaunchConfigurationPage* createWidget(QWidget* parent); -}; - -class GdbConfigPage : public KDevelop::LaunchConfigurationPage -{ -Q_OBJECT -public: - GdbConfigPage( QWidget* parent = 0 ); - virtual ~GdbConfigPage(); - virtual KIcon icon() const; - virtual void loadFromConfiguration(const KConfigGroup& cfg, KDevelop::IProject* = 0); - virtual void saveToConfiguration(KConfigGroup, KDevelop::IProject* = 0 ) const; - virtual QString title() const; -private: - Ui::DebuggerConfigWidget* ui; -}; - -class GdbLauncher : public KDevelop::ILauncher -{ -public: - GdbLauncher( GDBDebugger::CppDebuggerPlugin* plugin, IExecutePlugin* execute ); - virtual QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const; - virtual QString description() const; - virtual QString id(); - virtual QString name() const; - virtual KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg); - virtual QStringList supportedModes() const; -private: - QList factoryList; - GDBDebugger::CppDebuggerPlugin* m_plugin; - IExecutePlugin* m_execute; -}; - -#endif \ No newline at end of file diff --git a/kdevelop/debuggers/gdb/gdboutputwidget.cpp b/kdevelop/debuggers/gdb/gdboutputwidget.cpp deleted file mode 100644 index f3203039..00000000 --- a/kdevelop/debuggers/gdb/gdboutputwidget.cpp +++ /dev/null @@ -1,472 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 2003 John Birch - * Copyright 2006 Vladimir Prus - * Copyright 2007 Hamish Rodda - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "gdboutputwidget.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "gdbglobal.h" -#include "debuggerplugin.h" -#include "debugsession.h" - -namespace GDBDebugger -{ - -/***************************************************************************/ - -GDBOutputWidget::GDBOutputWidget(CppDebuggerPlugin* plugin, QWidget *parent) : - QWidget(parent), - m_userGDBCmdEditor(0), - m_Interrupt(0), - m_gdbView(0), - showInternalCommands_(false), - maxLines_(5000) -{ -// setWindowIcon(KIcon("inline_image")); - setWindowIcon(KIcon("debugger")); - setWindowTitle(i18n("GDB Output")); - setWhatsThis(i18n("GDB output

" - "Shows all gdb commands being executed. " - "You can also issue any other gdb command while debugging.

")); - - m_gdbView = new OutputTextEdit(this); - m_gdbView->setReadOnly(true); - - m_userGDBCmdEditor = new KHistoryComboBox (this); - - QLabel *label = new QLabel(i18n("&GDB cmd:"), this); - label->setBuddy(m_userGDBCmdEditor); - - m_Interrupt = new QToolButton( this ); - m_Interrupt->setIcon ( KIcon ( "media-playback-pause" ) ); - m_Interrupt->setToolTip( i18n ( "Pause execution of the app to enter gdb commands" ) ); - - QVBoxLayout *topLayout = new QVBoxLayout(this); - topLayout->addWidget(m_gdbView); - topLayout->setStretchFactor(m_gdbView, 1); - topLayout->setMargin(0); - - QBoxLayout *userGDBCmdEntry = new QHBoxLayout(); - userGDBCmdEntry->addWidget(label); - userGDBCmdEntry->addWidget(m_userGDBCmdEditor); - userGDBCmdEntry->setStretchFactor(m_userGDBCmdEditor, 1); - userGDBCmdEntry->addWidget(m_Interrupt); - topLayout->addLayout(userGDBCmdEntry); - - setLayout(topLayout); - - slotStateChanged(s_none, s_dbgNotStarted); - - connect( m_userGDBCmdEditor, SIGNAL(returnPressed()), SLOT(slotGDBCmd()) ); - connect( m_Interrupt, SIGNAL(clicked()), SIGNAL(breakInto())); - - updateTimer_.setSingleShot(true); - connect( &updateTimer_, SIGNAL(timeout()), - this, SLOT(flushPending())); - - connect(KDevelop::ICore::self()->debugController(), - SIGNAL(currentSessionChanged(KDevelop::IDebugSession*)), - SLOT(currentSessionChanged(KDevelop::IDebugSession*))); - - connect(plugin, SIGNAL(reset()), this, SLOT(clear())); - connect(plugin, SIGNAL(raiseGdbConsoleViews()), SIGNAL(requestRaise())); - - currentSessionChanged(KDevelop::ICore::self()->debugController()->currentSession()); - - connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), - this, SLOT(updateColors())); - updateColors(); - -} - -void GDBOutputWidget::updateColors() -{ - KColorScheme scheme(QPalette::Active); - gdbColor_ = scheme.foreground(KColorScheme::LinkText).color(); - errorColor_ = scheme.foreground(KColorScheme::NegativeText).color(); -} - -void GDBOutputWidget::currentSessionChanged(KDevelop::IDebugSession* s) -{ - DebugSession *session = qobject_cast(s); - if (!session) return; - connect( this, SIGNAL(userGDBCmd(QString)), - session, SLOT(slotUserGDBCmd(QString))); - connect( this, SIGNAL(breakInto()), - session, SLOT(interruptDebugger())); - - connect( session, SIGNAL(gdbInternalCommandStdout(QString)), - this, SLOT(slotInternalCommandStdout(QString)) ); - connect( session, SIGNAL(gdbUserCommandStdout(QString)), - this, SLOT(slotUserCommandStdout(QString)) ); - - connect( session, SIGNAL(gdbStateChanged(DBGStateFlags,DBGStateFlags)), - this, SLOT(slotStateChanged(DBGStateFlags,DBGStateFlags))); - - slotStateChanged(s_none, session->debuggerState()); -} - - -/***************************************************************************/ - -GDBOutputWidget::~GDBOutputWidget() -{ - delete m_gdbView; - delete m_userGDBCmdEditor; -} - -/***************************************************************************/ - -void GDBOutputWidget::clear() -{ - if (m_gdbView) - m_gdbView->clear(); - - userCommands_.clear(); - allCommands_.clear(); -} - -/***************************************************************************/ - -void GDBOutputWidget::slotInternalCommandStdout(const QString& line) -{ - newStdoutLine(line, true); -} - -void GDBOutputWidget::slotUserCommandStdout(const QString& line) -{ - kDebug(9012) << "User command stdout: " << line; - newStdoutLine(line, false); -} - -namespace { - QString colorify(QString text, const QColor& color) - { - // Make sure the newline is at the end of the newly-added - // string. This is so that we can always correctly remove - // newline inside 'flushPending'. - if (!text.endsWith('\n')) - text.append('\n'); - - if (text.endsWith('\n')) - { - text.remove(text.length()-1, 1); - } - text = "" + text + "
"; - return text; - } -} - - -void GDBOutputWidget::newStdoutLine(const QString& line, - bool internal) -{ - QString s = html_escape(line); - if (s.startsWith("(gdb)")) - { - s = colorify(s, gdbColor_); - } - else - s.replace('\n', "
"); - - allCommands_.append(s); - allCommandsRaw_.append(line); - trimList(allCommands_, maxLines_); - trimList(allCommandsRaw_, maxLines_); - - if (!internal) - { - userCommands_.append(s); - userCommandsRaw_.append(line); - trimList(userCommands_, maxLines_); - trimList(userCommandsRaw_, maxLines_); - } - - if (!internal || showInternalCommands_) - showLine(s); -} - - -void GDBOutputWidget::showLine(const QString& line) -{ - pendingOutput_ += line; - - // To improve performance, we update the view after some delay. - if (!updateTimer_.isActive()) - { - updateTimer_.start(100); - } -} - -void GDBOutputWidget::trimList(QStringList& l, int max_size) -{ - int length = l.count(); - if (length > max_size) - { - for(int to_delete = length - max_size; to_delete; --to_delete) - { - l.erase(l.begin()); - } - } -} - -void GDBOutputWidget::setShowInternalCommands(bool show) -{ - if (show != showInternalCommands_) - { - showInternalCommands_ = show; - - // Set of strings to show changes, text edit still has old - // set. Refresh. - m_gdbView->clear(); - QStringList& newList = - showInternalCommands_ ? allCommands_ : userCommands_; - - QStringList::iterator i = newList.begin(), e = newList.end(); - for(; i != e; ++i) - { - // Note that color formatting is already applied to '*i'. - showLine(*i); - } - } -} - -/***************************************************************************/ - -void GDBOutputWidget::slotReceivedStderr(const char* line) -{ - QString colored = colorify(html_escape(line), errorColor_); - // Errors are shown inside user commands too. - allCommands_.append(colored); - trimList(allCommands_, maxLines_); - userCommands_.append(colored); - trimList(userCommands_, maxLines_); - - allCommandsRaw_.append(line); - trimList(allCommandsRaw_, maxLines_); - userCommandsRaw_.append(line); - trimList(userCommandsRaw_, maxLines_); - - showLine(colored); -} - -/***************************************************************************/ - -void GDBOutputWidget::slotGDBCmd() -{ - QString GDBCmd(m_userGDBCmdEditor->currentText()); - if (!GDBCmd.isEmpty()) - { - m_userGDBCmdEditor->addToHistory(GDBCmd); - m_userGDBCmdEditor->clearEditText(); - emit userGDBCmd(GDBCmd); - } -} - -void GDBOutputWidget::flushPending() -{ - m_gdbView->setUpdatesEnabled(false); - - // QTextEdit adds newline after paragraph automatically. - // So, remove trailing newline to avoid double newlines. - if (pendingOutput_.endsWith('\n')) - pendingOutput_.remove(pendingOutput_.length()-1, 1); - Q_ASSERT(!pendingOutput_.endsWith('\n')); - - QTextDocument *document = m_gdbView->document(); - QTextCursor cursor(document); - cursor.movePosition(QTextCursor::End); - cursor.insertHtml(pendingOutput_); - pendingOutput_ = ""; - - m_gdbView->verticalScrollBar()->setValue(m_gdbView->verticalScrollBar()->maximum()); - m_gdbView->setUpdatesEnabled(true); - m_gdbView->update(); - if (m_cmdEditorHadFocus) { - m_userGDBCmdEditor->setFocus(); - } -} - -/***************************************************************************/ - -void GDBOutputWidget::slotStateChanged(DBGStateFlags oldStatus, DBGStateFlags newStatus) -{ - Q_UNUSED(oldStatus) - if (newStatus & s_dbgNotStarted) - { - m_Interrupt->setEnabled(false); - m_userGDBCmdEditor->setEnabled(false); - return; - } - else - { - m_Interrupt->setEnabled(true); - } - - if (newStatus & s_dbgBusy) - { - if (m_userGDBCmdEditor->isEnabled()) { - m_cmdEditorHadFocus = m_userGDBCmdEditor->hasFocus(); - } - m_userGDBCmdEditor->setEnabled(false); - } - else - { - m_userGDBCmdEditor->setEnabled(true); - } -} - -/***************************************************************************/ - -void GDBOutputWidget::focusInEvent(QFocusEvent */*e*/) -{ - m_gdbView->verticalScrollBar()->setValue(m_gdbView->verticalScrollBar()->maximum()); - m_userGDBCmdEditor->setFocus(); -} - -QString GDBOutputWidget::html_escape(const QString& s) -{ - QString r(s); - r.replace('<', "<"); - r.replace('>', ">"); - return r; -} - -void GDBOutputWidget::savePartialProjectSession() -{ - KConfigGroup config(KGlobal::config(), "GDB Debugger"); - - config.writeEntry("showInternalCommands", showInternalCommands_); -} - -void GDBOutputWidget::restorePartialProjectSession() -{ - KConfigGroup config(KGlobal::config(), "GDB Debugger"); - - showInternalCommands_ = config.readEntry("showInternalCommands", false); -} - - -void GDBOutputWidget::contextMenuEvent(QContextMenuEvent * e) -{ - QScopedPointer popup(new QMenu(this)); - - QAction* action = popup->addAction(i18n("Show Internal Commands"), - this, - SLOT(toggleShowInternalCommands())); - - action->setCheckable(true); - action->setChecked(showInternalCommands_); - action->setWhatsThis(i18n( - "Controls if commands issued internally by KDevelop " - "will be shown or not.
" - "This option will affect only future commands, it will not " - "add or remove already issued commands from the view.")); - - popup->addAction(i18n("Copy All"), - this, - SLOT(copyAll())); - - popup->exec(e->globalPos()); -} - -void GDBOutputWidget::copyAll() -{ - /* See comments for allCommandRaw_ for explanations of - this complex logic, as opposed to calling text(). */ - QStringList& raw = showInternalCommands_ ? - allCommandsRaw_ : userCommandsRaw_; - QString text; - for (int i = 0; i < raw.size(); ++i) - text += raw[i]; - - // Make sure the text is pastable both with Ctrl-C and with - // middle click. - QApplication::clipboard()->setText(text, QClipboard::Clipboard); - QApplication::clipboard()->setText(text, QClipboard::Selection); -} - -void GDBOutputWidget::toggleShowInternalCommands() -{ - setShowInternalCommands(!showInternalCommands_); -} - - -OutputTextEdit::OutputTextEdit(GDBOutputWidget * parent) - : QTextEdit(parent) -{ -} - -void OutputTextEdit::contextMenuEvent(QContextMenuEvent * event) -{ - QMenu* popup = createStandardContextMenu(); - - QAction* action = popup->addAction(i18n("Show Internal Commands"), - parent(), - SLOT(toggleShowInternalCommands())); - - action->setCheckable(true); - action->setChecked(static_cast(parent())->showInternalCommands()); - action->setWhatsThis(i18n( - "Controls if commands issued internally by KDevelop " - "will be shown or not.
" - "This option will affect only future commands, it will not " - "add or remove already issued commands from the view.")); - - popup->exec(event->globalPos()); -} - -bool GDBOutputWidget::showInternalCommands() const -{ - return showInternalCommands_; -} - -/***************************************************************************/ -/***************************************************************************/ -/***************************************************************************/ -} - - -#include "moc_gdboutputwidget.cpp" - diff --git a/kdevelop/debuggers/gdb/gdboutputwidget.h b/kdevelop/debuggers/gdb/gdboutputwidget.h deleted file mode 100644 index bcc85d38..00000000 --- a/kdevelop/debuggers/gdb/gdboutputwidget.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * GDB Debugger Support - * - * Copyright 2003 John Birch - * Copyright 2007 Hamish Rodda - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _GDBOUTPUTWIDGET_H_ -#define _GDBOUTPUTWIDGET_H_ - -#include -#include -#include -#include -#include - -#include "gdbglobal.h" - -namespace KDevelop { -class IDebugSession; -} - -class KHistoryComboBox; -class QTextEdit; -class QToolButton; - -namespace GDBDebugger -{ - -class GDBController; -class CppDebuggerPlugin; - -class GDBOutputWidget : public QWidget -{ - Q_OBJECT - -public: - GDBOutputWidget(CppDebuggerPlugin* plugin, QWidget *parent=0 ); - ~GDBOutputWidget(); - - void savePartialProjectSession(); - void restorePartialProjectSession(); - - bool showInternalCommands() const; - -public Q_SLOTS: - void clear(); - - void slotInternalCommandStdout(const QString& line); - void slotUserCommandStdout(const QString& line); - void slotReceivedStderr(const char* line); - void slotStateChanged(DBGStateFlags oldStatus, DBGStateFlags newStatus); - - void slotGDBCmd(); - - void flushPending(); - - void copyAll(); - void toggleShowInternalCommands(); - -private Q_SLOTS: - void currentSessionChanged(KDevelop::IDebugSession *session); - void updateColors(); - -protected: - virtual void focusInEvent(QFocusEvent *e); - virtual void contextMenuEvent(QContextMenuEvent* e); - -Q_SIGNALS: - void requestRaise(); - void userGDBCmd(const QString &cmd); - void breakInto(); - -private: - - QString html_escape(const QString& s); - - void newStdoutLine(const QString& line, bool internal); - - /** Arranges for 'line' to be shown to the user. - Adds 'line' to pendingOutput_ and makes sure - updateTimer_ is running. */ - void showLine(const QString& line); - - /** Makes 'l' no longer than 'max_size' by - removing excessive elements from the top. - */ - void trimList(QStringList& l, int max_size); - - GDBController* m_controller; - KHistoryComboBox* m_userGDBCmdEditor; - QToolButton* m_Interrupt; - QTextEdit* m_gdbView; - - bool m_cmdEditorHadFocus; - - void setShowInternalCommands(bool); - friend class OutputText; - - /** The output from user commands only and from - all commands. We keep it here so that if we switch - "Show internal commands" on, we can show previous - internal commands. - */ - QStringList userCommands_, allCommands_; - /** Same output, without any fancy formatting. Keeping it - here because I can't find any way to extract raw text, - without formatting, out of QTextEdit except for - selecting everything and calling 'copy()'. The latter - approach is just ugly. */ - QStringList userCommandsRaw_, allCommandsRaw_; - - - /** For performance reasons, we don't immediately add new text - to QTExtEdit. Instead we add it to pendingOutput_ and - flush it on timer. - */ - QString pendingOutput_; - QTimer updateTimer_; - - bool showInternalCommands_; - - int maxLines_; - - QColor gdbColor_; - QColor errorColor_; -}; - -class OutputTextEdit : public QTextEdit -{ - Q_OBJECT - -public: - OutputTextEdit(GDBOutputWidget* parent); - -protected: - virtual void contextMenuEvent(QContextMenuEvent* event); -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/gdbparser.cpp b/kdevelop/debuggers/gdb/gdbparser.cpp deleted file mode 100644 index 4d371cbc..00000000 --- a/kdevelop/debuggers/gdb/gdbparser.cpp +++ /dev/null @@ -1,432 +0,0 @@ -// ************************************************************************** -// begin : Tue Aug 17 1999 -// copyright : (C) 1999 by John Birch -// email : jbb@kdevelop.org -// ************************************************************************** - -// ************************************************************************** -// * -// 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 2 of the License, or * -// (at your option) any later version. * -// * -// ************************************************************************** - -#include "gdbparser.h" -#include - -#include -#include - -#include -#include - -namespace GDBDebugger -{ - -// ************************************************************************** -// ************************************************************************** -// ************************************************************************** - -GDBParser *GDBParser::GDBParser_ = 0; - -GDBParser *GDBParser::getGDBParser() -{ - if (!GDBParser_) - GDBParser_ = new GDBParser(); - - return GDBParser_; -} - -// ************************************************************************** - -void GDBParser::destroy() -{ - delete GDBParser_; - GDBParser_ = 0; -} - -// ************************************************************************** - -GDBParser::GDBParser() -{ -} - -// ************************************************************************** - -GDBParser::~GDBParser() -{ -} - - -// ************************************************************************** - -QString GDBParser::getName(const char **buf) -{ - const char *start = skipNextTokenStart(*buf); - if (*start) { - *buf = skipTokenValue(start); - return QByteArray(start, *buf - start + 1); - } else - *buf = start; - - return QString(); -} - -// ************************************************************************** - -QString GDBParser::getValue(const char **buf) -{ - const char *start = skipNextTokenStart(*buf); - *buf = skipTokenValue(start); - - QString value(QByteArray(start, *buf - start + 1).data()); - return value; -} - -QString GDBParser::undecorateValue(DataType type, const QString& s) -{ - QByteArray l8 = s.toLocal8Bit(); - const char* start = l8; - const char* end = start + s.length(); - - if (*start == '{') - { - // Gdb uses '{' in two cases: - // - composites (arrays and structures) - // - pointers to functions. In this case type is - // enclosed in "{}". Not sure why it's so, as - // when printing pointer, type is in parenthesis. - if (type == typePointer) - { - // Looks like type in braces at the beginning. Strip it. - start = skipDelim(start, '{', '}'); - } - else - { - // Looks like composite, strip the braces and return. - return QByteArray(start+1, end - start - 2); - } - } - else if (*start == '(') - { - // Strip the type of the pointer from the value. - // - // When printing values of pointers, gdb prints the pointer - // type as well. This is not necessary for kdevelop -- after - // all, there's separate column with value type. But that behaviour - // is not configurable. The only way to change it is to explicitly - // pass the 'x' format specifier to the 'print' command. - // - // We probably can achieve that by sending an 'print in hex' request - // as soon as we know the type of variable, but that would be complex - // and probably conflict with 'toggle hex/decimal' command. - // So, address this problem as close to debugger as possible. - - // We can't find the first ')', because type can contain '(' and ')' - // characters if its function pointer. So count opening and closing - // parentheses. - - start = skipDelim(start, '(', ')'); - } - - QString value(QByteArray(start, end - start + 1).data()); - - value = value.trimmed(); - - if (value[0] == '@') - { - // It's a reference, we need to show just the value. - if (int i = value.indexOf(":")) - { - value = value.mid(i+2); - } - else - { - // Just reference, no value at all, remove all - value = ""; - } - } - - if (value.indexOf("Cannot access memory") == 0) - value = "(inaccessible)"; - - return value.trimmed(); -} - -QString GDBParser::undecorateValue(const QString& s) -{ - DataType dataType = determineType(s.toLocal8Bit()); - QString r = undecorateValue(dataType, s.toLocal8Bit()); - return r; -} - -// Given a value that starts with 0xNNNNNN determines if -// it looks more like pointer, or a string value. -DataType pointerOrValue(const char *buf) -{ - while (*buf) { - if (!isspace(*buf)) - buf++; - else if (*(buf+1) == '\"') - return typeValue; - else - break; - } - - return typePointer; -} - - -DataType GDBParser::determineType(const char *buf) const -{ - if (!buf || !*(buf= skipNextTokenStart(buf))) - return typeUnknown; - - // A reference, probably from a parameter value. - if (*buf == '@') - return typeReference; - - // Structures and arrays - (but which one is which?) - // {void (void)} 0x804a944 <__builtin_new+41> - this is a fn pointer - // (void (*)(void)) 0x804a944 - so is this - ugly!!! - if (*buf == '{') { - if (strncmp(buf, "{{", 2) == 0) - return typeArray; - - if (strncmp(buf, "{}", 18) == 0) - return typeValue; - - buf++; - while (*buf) { - switch (*buf) { - case '=': - return typeStruct; - case '"': - buf = skipString(buf); - break; - case '\'': - buf = skipQuotes(buf, '\''); - break; - case ',': - if (*(buf-1) == '}') - Q_ASSERT(false); - return typeArray; - case '}': - if (*(buf+1) == ',' || *(buf+1) == '\n' || !*(buf+1)) - return typeArray; // Hmm a single element array?? - if (strncmp(buf+1, " 0x", 3) == 0) - return typePointer; // What about references? - return typeUnknown; // very odd? - case '(': - buf = skipDelim(buf, '(', ')'); - break; - case '<': - buf = skipDelim(buf, '<', '>'); - // gdb may produce this output: - // $1 = 0x804ddf3 ' ' , "TESTSTRING" - // after having finished with the "repeats"-block we need - // to check if the string continues - if ( buf[0] == ',' && (buf[2] == '\"' || buf[2] == '\'') ) { - buf++; //set the buffer behind the comma to indicate that the string continues - } - break; - default: - buf++; - break; - } - } - return typeUnknown; - } - - // some sort of address. We need to sort out if we have - // a 0x888888 "this is a char*" type which we'll term a value - // or whether we just have an address - if (strncmp(buf, "0x", 2) == 0) { - return pointerOrValue(buf); - } - - // Pointers and references - references are a bit odd - // and cause GDB to fail to produce all the local data - // if they haven't been initialised. but that's not our problem!! - // (void (*)(void)) 0x804a944 - this is a fn pointer - if (*buf == '(') { - buf = skipDelim(buf, '(', ')'); - // This 'if' handles values like this: - // (int (&)[3]) @0xbffff684: {5, 6, 7} - // which is a reference to array. - if (buf[1] == '@') - return typeReference; - // This 'if' handles values like this: - // (int (*)[3]) 0xbffff810 - if (strncmp(buf, " 0x", 3) == 0) - { - ++buf; - return pointerOrValue(buf); - } - - switch (*(buf-2)) { - case '*': - return typePointer; - case '&': - return typeReference; - default: - switch (*(buf-8)) { - case '*': - return typePointer; - case '&': - return typeReference; - } - return typeUnknown; - } - } - - buf = skipTokenValue(buf); - if ((strncmp(buf, " = ", 3) == 0) || (*buf == '=')) - return typeName; - - return typeValue; -} - -// ************************************************************************** - -const char *GDBParser::skipString(const char *buf) const -{ - if (buf && *buf == '\"') { - buf = skipQuotes(buf, *buf); - while (*buf) { - if ((strncmp(buf, ", \"", 3) == 0) || - (strncmp(buf, ", '", 3) == 0)) - buf = skipQuotes(buf+2, *(buf+2)); - else if (strncmp(buf, " <", 2) == 0) // take care of '); - else - break; - } - - // If the string is long then it's chopped and has ... after it. - while (*buf && *buf == '.') - buf++; - } - - return buf; -} - -// *************************************************************************** - -const char *GDBParser::skipQuotes(const char *buf, char quotes) const -{ - if (buf && *buf == quotes) { - buf++; - - while (*buf) { - if (*buf == '\\') - buf++; // skips \" or \' problems - else if (*buf == quotes) - return buf+1; - - buf++; - } - } - - return buf; -} - -// ************************************************************************** - -const char *GDBParser::skipDelim(const char *buf, char open, char close) const -{ - if (buf && *buf == open) { - buf++; - - while (*buf) { - if (*buf == open) - buf = skipDelim(buf, open, close); - else if (*buf == close) - return buf+1; - else if (*buf == '\"') - buf = skipString(buf); - else if (*buf == '\'') - buf = skipQuotes(buf, *buf); - else if (*buf) - buf++; - } - } - return buf; -} - -// ************************************************************************** - -const char *GDBParser::skipTokenValue(const char *buf) const -{ - if (buf) { - while (true) { - buf = skipTokenEnd(buf); - - const char *end = buf; - while (*end && isspace(*end) && *end != '\n') - end++; - - if (*end == 0 || *end == ',' || *end == '\n' || *end == '=' || *end == '}') - break; - - if (buf == end) - break; - - buf = end; - } - } - - return buf; -} - -// ************************************************************************** - -const char *GDBParser::skipTokenEnd(const char *buf) const -{ - if (buf) { - switch (*buf) { - case '"': - return skipString(buf); - case '\'': - return skipQuotes(buf, *buf); - case '{': - return skipDelim(buf, '{', '}'); - case '<': - buf = skipDelim(buf, '<', '>'); - // gdb may produce this output: - // $1 = 0x804ddf3 ' ' , "TESTSTRING" - // after having finished with the "repeats"-block we need - // to check if the string continues - if ( buf[0] == ',' && (buf[2] == '\"' || buf[2] == '\'') ) { - buf++; //set the buffer behind the comma to indicate that the string continues - } - return buf; - case '(': - return skipDelim(buf, '(', ')'); - } - - while (*buf && !isspace(*buf) && *buf != ',' && *buf != '}' && *buf != '=') - buf++; - } - - return buf; -} - -// ************************************************************************** - -const char *GDBParser::skipNextTokenStart(const char *buf) const -{ - if (buf) - while (*buf && (isspace(*buf) || *buf == ',' || *buf == '}' || *buf == '=')) - buf++; - - return buf; -} - -// ************************************************************************** -// ************************************************************************** -// ************************************************************************** - -} diff --git a/kdevelop/debuggers/gdb/gdbparser.h b/kdevelop/debuggers/gdb/gdbparser.h deleted file mode 100644 index a5cb2b85..00000000 --- a/kdevelop/debuggers/gdb/gdbparser.h +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** - begin : Tue Aug 17 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _GDBPARSER_H_ -#define _GDBPARSER_H_ - -#include "gdbglobal.h" - -namespace GDBDebugger -{ - -class GDBParser -{ -public: - DataType determineType(const char *buf) const; - QString undecorateValue(const QString& s); - - const char *skipString(const char *buf) const; - const char *skipQuotes(const char *buf, char quote) const; - const char *skipDelim(const char *buf, char open, char close) const; - - static GDBParser *getGDBParser(); - static void destroy(); - -private: - const char *skipTokenEnd(const char *buf) const; - const char *skipTokenValue(const char *buf) const; - const char *skipNextTokenStart(const char *buf) const; - - QString getName(const char **buf); - /** Assuming 'buf' points to a value, return a pointer - to the position right after the value. - */ - QString getValue(const char **buf); - QString undecorateValue(DataType type, const QString& s); - -protected: - GDBParser(); - ~GDBParser(); - static GDBParser *GDBParser_; -}; - -} - -#endif diff --git a/kdevelop/debuggers/gdb/gdbvariable.cpp b/kdevelop/debuggers/gdb/gdbvariable.cpp deleted file mode 100644 index 3f7867e9..00000000 --- a/kdevelop/debuggers/gdb/gdbvariable.cpp +++ /dev/null @@ -1,383 +0,0 @@ -/* - * GDB-specific Variable - * - * Copyright 2009 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "gdbvariable.h" -#include "gdbcommand.h" -#include "debugsession.h" - -#include -#include - -using namespace KDevelop; -using namespace GDBDebugger; - -QMap GdbVariable::allVariables_; - -static bool hasStartedSession() -{ - if (!ICore::self()->debugController()) return false; //happens on shutdown - - IDebugSession *session = ICore::self()->debugController()->currentSession(); - if (!session) - return false; - - IDebugSession::DebuggerState s = session->state(); - return s != IDebugSession::NotStartedState - && s != IDebugSession::EndedState; -} - -GdbVariable::GdbVariable(TreeModel* model, TreeItem* parent, - const QString& expression, const QString& display) -: Variable(model, parent, expression, display) -{ -} - -GdbVariable::~GdbVariable() -{ - if (!varobj_.isEmpty()) - { - // Delete only top-level variable objects. - if (topLevel()) { - if (hasStartedSession()) { - IDebugSession* is = ICore::self()->debugController()->currentSession(); - DebugSession* s = static_cast(is); - s->addCommand(new GDBCommand(GDBMI::VarDelete, - QString("\"%1\"").arg(varobj_))); - } - } - allVariables_.remove(varobj_); - } -} - -GdbVariable* GdbVariable::findByVarobjName(const QString& varobjName) -{ - if (allVariables_.count(varobjName) == 0) - return 0; - return allVariables_[varobjName]; -} - -void GdbVariable::setVarobj(const QString& v) -{ - if (!varobj_.isEmpty()) { - // this should not happen - // but apperently it does when attachMaybe is called a second time before - // the first -var-create call returned - allVariables_.remove(varobj_); - } - varobj_ = v; - allVariables_[varobj_] = this; -} - - -static int nextId = 0; - -class CreateVarobjHandler : public GDBCommandHandler -{ -public: - CreateVarobjHandler(GdbVariable *variable, QObject *callback, const char *callbackMethod) - : m_variable(variable), m_callback(callback), m_callbackMethod(callbackMethod) - {} - - virtual void handle(const GDBMI::ResultRecord &r) - { - if (!m_variable) return; - bool hasValue = false; - GdbVariable* variable = m_variable.data(); - variable->deleteChildren(); - variable->setInScope(true); - if (r.reason == "error") { - variable->setShowError(true); - } else { - variable->setVarobj(r["name"].literal()); - - bool hasMore = false; - if (r.hasField("has_more") && r["has_more"].toInt()) - // GDB swears there are more children. Trust it - hasMore = true; - else - // There are no more children in addition to what - // numchild reports. But, in KDevelop, the variable - // is not yet expanded, and those numchild are not - // fetched yet. So, if numchild != 0, hasMore should - // be true. - hasMore = r["numchild"].toInt() != 0; - - variable->setHasMore(hasMore); - - variable->setType(r["type"].literal()); - variable->setValue(r["value"].literal()); - hasValue = !r["value"].literal().isEmpty(); - if (variable->isExpanded() && r["numchild"].toInt()) { - variable->fetchMoreChildren(); - } - - if (variable->format() != KDevelop::Variable::Natural) { - //TODO doesn't work for children as they are not yet loaded - variable->formatChanged(); - } - } - - if (m_callback && m_callbackMethod) { - QMetaObject::invokeMethod(m_callback, m_callbackMethod, Q_ARG(bool, hasValue)); - } - } - virtual bool handlesError() { return true; } - -private: - QWeakPointer m_variable; - QObject *m_callback; - const char *m_callbackMethod; -}; - -void GdbVariable::attachMaybe(QObject *callback, const char *callbackMethod) -{ - if (!varobj_.isEmpty()) - return; - - if (hasStartedSession()) { - IDebugSession* is = ICore::self()->debugController()->currentSession(); - DebugSession* s = static_cast(is); - s->addCommand( - new GDBCommand( - GDBMI::VarCreate, - QString("var%1 @ %2").arg(nextId++).arg(enquotedExpression()), - new CreateVarobjHandler(this, callback, callbackMethod))); - } -} - -void GdbVariable::markAllDead() -{ - QMap::iterator i, e; - for (i = allVariables_.begin(), e = allVariables_.end(); i != e; ++i) - { - i.value()->varobj_.clear(); - } - allVariables_.clear(); -} - -class FetchMoreChildrenHandler : public GDBCommandHandler -{ -public: - FetchMoreChildrenHandler(GdbVariable *variable, DebugSession *session) - : m_variable(variable), m_session(session), m_activeCommands(1) - {} - - virtual void handle(const GDBMI::ResultRecord &r) - { - if (!m_variable) return; - --m_activeCommands; - - GdbVariable* variable = m_variable.data(); - - if (r.hasField("children")) - { - const GDBMI::Value& children = r["children"]; - for (int i = 0; i < children.size(); ++i) { - const GDBMI::Value& child = children[i]; - const QString& exp = child["exp"].literal(); - if (exp == "public" || exp == "protected" || exp == "private") { - ++m_activeCommands; - m_session->addCommand( - new GDBCommand(GDBMI::VarListChildren, - QString("--all-values \"%1\"") - .arg(child["name"].literal()), - this/*use again as handler*/)); - } else { - KDevelop::Variable* xvar = m_session->variableController()-> - createVariable(variable->model(), variable, - child["exp"].literal()); - GdbVariable* var = static_cast(xvar); - var->setTopLevel(false); - var->setVarobj(child["name"].literal()); - bool hasMore = child["numchild"].toInt() != 0 || ( child.hasField("dynamic") && child["dynamic"].toInt()!=0 ); - var->setHasMoreInitial(hasMore); - variable->appendChild(var); - var->setType(child["type"].literal()); - var->setValue(child["value"].literal()); - } - } - } - - /* Note that we don't set hasMore to true if there are still active - commands. The reason is that we don't want the user to have - even theoretical ability to click on "..." item and confuse - us. */ - bool hasMore = false; - if (r.hasField("has_more")) - hasMore = r["has_more"].toInt(); - - variable->setHasMore(hasMore); - if (m_activeCommands == 0) { - variable->emitAllChildrenFetched(); - delete this; - } - } - virtual bool handlesError() { - // FIXME: handle error? - return false; - } - virtual bool autoDelete() { - // we delete ourselve - return false; - } - -private: - QWeakPointer m_variable; - DebugSession *m_session; - int m_activeCommands; -}; - -void GdbVariable::fetchMoreChildren() -{ - int c = childItems.size(); - // FIXME: should not even try this if app is not started. - // Probably need to disable open, or something - if (hasStartedSession()) { - IDebugSession* is = ICore::self()->debugController()->currentSession(); - DebugSession* s = static_cast(is); - s->addCommand( - new GDBCommand(GDBMI::VarListChildren, - QString("--all-values \"%1\" %2 %3").arg(varobj_) - .arg( c ).arg( c + fetchStep ), // fetch from .. to .. - new FetchMoreChildrenHandler(this, s))); - } -} - -void GdbVariable::handleUpdate(const GDBMI::Value& var) -{ - if (var.hasField("type_changed") - && var["type_changed"].literal() == "true") - { - deleteChildren(); - // FIXME: verify that this check is right. - setHasMore(var["new_num_children"].toInt() != 0); - fetchMoreChildren(); - } - - if (var.hasField("in_scope") && var["in_scope"].literal() == "false") - { - setInScope(false); - } - else - { - setInScope(true); - - if (var.hasField("new_num_children")) { - int nc = var["new_num_children"].toInt(); - Q_ASSERT(nc != -1); - setHasMore(false); - while (childCount() > nc) { - TreeItem *c = child(childCount()-1); - removeChild(childCount()-1); - delete c; - } - } - - // FIXME: the below code is essentially copy-paste from - // FetchMoreChildrenHandler. We need to introduce GDB-specific - // subclass of KDevelop::Variable that is capable of creating - // itself from MI output directly, and relay to that. - if (var.hasField("new_children")) - { - const GDBMI::Value& children = var["new_children"]; - for (int i = 0; i < children.size(); ++i) { - const GDBMI::Value& child = children[i]; - const QString& exp = child["exp"].literal(); - - IDebugSession* is = ICore::self()->debugController()->currentSession(); - DebugSession* s = static_cast(is); - KDevelop::Variable* xvar = s->variableController()-> - createVariable(model(), this, exp); - GdbVariable* var = static_cast(xvar); - var->setTopLevel(false); - var->setVarobj(child["name"].literal()); - bool hasMore = child["numchild"].toInt() != 0 || ( child.hasField("dynamic") && child["dynamic"].toInt()!=0 ); - var->setHasMoreInitial(hasMore); - appendChild(var); - var->setType(child["type"].literal()); - var->setValue(child["value"].literal()); - var->setChanged(true); - } - } - - if (var.hasField("type_changed") && var["type_changed"].literal() == "true") { - setType(var["new_type"].literal()); - } - setValue(var["value"].literal()); - setChanged(true); - setHasMore(var.hasField("has_more") && var["has_more"].toInt()); - } -} - -const QString& GdbVariable::varobj() const -{ - return varobj_; -} - -QString GdbVariable::enquotedExpression() const -{ - QString expr = expression(); - expr.replace('"', "\\\""); - expr = expr.prepend('"').append('"'); - return expr; -} - - -class SetFormatHandler : public GDBCommandHandler -{ -public: - SetFormatHandler(GdbVariable *var) - : m_variable(var) - {} - - virtual void handle(const GDBMI::ResultRecord &r) - { - if(r.hasField("value")) - m_variable.data()->setValue(r["value"].literal()); - } -private: - QWeakPointer m_variable; -}; - -void GdbVariable::formatChanged() -{ - if(childCount()) - { - foreach(TreeItem* item, childItems) { - Q_ASSERT(dynamic_cast(item)); - if( GdbVariable* var=dynamic_cast(item)) - var->setFormat(format()); - } - } - else - { - if (hasStartedSession()) { - IDebugSession* is = ICore::self()->debugController()->currentSession(); - DebugSession* s = static_cast(is); - s->addCommand( - new GDBCommand(GDBMI::VarSetFormat, - QString(" \"%1\" %2 ").arg(varobj_).arg(format2str(format())), - new SetFormatHandler(this) - ) - ); - } - } -} diff --git a/kdevelop/debuggers/gdb/gdbvariable.h b/kdevelop/debuggers/gdb/gdbvariable.h deleted file mode 100644 index 9a6fb119..00000000 --- a/kdevelop/debuggers/gdb/gdbvariable.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * GDB-specific Variable - * - * Copyright 2009 Vladimir Prus - * - * 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 2 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, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDBVARIABLE_H -#define GDBVARIABLE_H - -#include "mi/gdbmi.h" - -#include - -#include - - -class CreateVarobjHandler; -class FetchMoreChildrenHandler; - -namespace KDevelop -{ - class GdbVariable : public Variable - { - public: - GdbVariable(TreeModel* model, TreeItem* parent, - const QString& expression, - const QString& display = ""); - - ~GdbVariable(); - - /* FIXME: should eventually remove, so that existance of - varobjs is fully encapsulalated inside GdbVariable. */ - const QString& varobj() const; - void handleUpdate(const GDBMI::Value& var); - - static GdbVariable *findByVarobjName(const QString& varobjName); - - /* Called when GDB dies. Clears the association between varobj names - and Variable instances. */ - static void markAllDead(); - - virtual bool canSetFormat() const { return true; } - - private: // Variable overrides - void attachMaybe(QObject *callback, const char *callbackMethod); - void fetchMoreChildren(); - void formatChanged(); - - private: // Internal - friend class ::CreateVarobjHandler; - friend class ::FetchMoreChildrenHandler; - QString enquotedExpression() const; - void setVarobj(const QString& v); - QString varobj_; - - // How many children should be fetched in one - // increment. - static const int fetchStep = 5; - - /* Map from GDB varobj name to GdbVariable. - FIXME: eventually, should be per-session map. */ - static QMap allVariables_; - }; -} - -#endif diff --git a/kdevelop/debuggers/gdb/kdevgdb.desktop.cmake b/kdevelop/debuggers/gdb/kdevgdb.desktop.cmake deleted file mode 100644 index 9959e499..00000000 --- a/kdevelop/debuggers/gdb/kdevgdb.desktop.cmake +++ /dev/null @@ -1,131 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. -Comment[bs]=Ovaj dodatak pruža link za GDB, ispravljač grešaka izvornog nivoa za C, C++ i druge. -Comment[ca]=Aquest connector proveeix d'un frontal per GDB, un depurador a nivell de codi per C, C++ i més llenguatges. -Comment[ca@valencia]=Este connector proveeix d'un frontal per GDB, un depurador a nivell de codi per C, C++ i més llenguatges. -Comment[da]=Dette plugin sørger for en brugerflade til GDB, en fejlsøger til C, C++ og mere. -Comment[de]=Dieses Modul stellt eine Oberfläche für GDB zur Verfügung. GDB ist ein Debugger für C, C++ und weitere Sprachen. -Comment[el]=Αυτό το πρόσθετο προσφέρει ένα σύστημα περιβάλλοντος για το GDB, έναν διορθωτή επιπέδου πηγαίου κώδικα για τις C, C++ και άλλες γλώσσες. -Comment[en_GB]=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. -Comment[es]=Este complemento proporciona una interfaz para GDB, un depurador de código fuente para C, C++ y demás. -Comment[et]=See plugin pakub GDB kasutajaliidest. GDB on C, C++ ja veel mitme keele lähtekoodi tasandil tegutsev siluja. -Comment[fi]=Tämä liitännäinen tarjoaa GDB-käyttöliittymän, lähdekooditason virheenjäljittimen C-, C++-kielille ja paljon muuta -Comment[fr]=Ce module externe fournit une interface pour GDB, un débogueur au niveau des sources pour C, C++, etc. -Comment[ga]=Soláthraíonn an breiseán seo comhéadan ar GDB, dífhabhtóir foinse C, C++ agus a thuilleadh. -Comment[gl]=Este engadido fornece unha interface para GDB, un depurador a nivel do código fonte para C, C++ e outros. -Comment[hu]=Ez a bővítmény egy előtétprogramot szolgáltat a GDB-hez, egy forrásszintű hibakeresőt a C, C++ és további nyelvekhez. -Comment[it]=Questa estensione fornisce un'interfaccia per il GDB, un debugger a livello sorgente per C, C++ e altro. -Comment[ja]=このプラグインは、C, C++ などのソースレベルデバッガ GDB のフロントエンドを提供します。 -Comment[kk]=Бұл плагин GDB, яғни C, C++ , т.б. бастапқы кодымен істейтін жөндегішке интерфейсі. -Comment[lv]=Šis spraudnis nodrošina priekšpusi GDB, C, C++ un cita pirmkoda atkļūdotāja. -Comment[nb]=Dette programtillegget gir en brukerflate til GDB, et feilsøkingsprogram på kildenivå for C og C++ og mer. -Comment[nds]=Dit Moduul stellt en Böversiet för GDB praat, en Bornkode-Fehlersöker för C, C++ un anner Spraken. -Comment[nl]=Deze plugin levert een frontend voor GDB, een broncodedebugger voor C, C++ en meer. -Comment[pl]=Ta wtyczka udostępnia interfejs do GDB, debuggera dla C, C++ i innych języków. -Comment[pt]=Este 'plugin' oferece uma interface para o GDB, um depurador a nível do código-fonte para C, C++, entre outros. -Comment[pt_BR]=Este plugin oferece uma interface para o GDB, um depurador em nível de código-fonte para C, C++, entre outros. -Comment[ru]=Это расширение предоставляет интерфейс к GDB, отладчику исходного кода для C, C++ и других языков. -Comment[sk]=Tento modul poskytuje rozhranie pre GDB, debuger pre C, C++ a ďalšie. -Comment[sl]=Ta vstavek prinaša začelje za GDB, razhroščevalnik na ravni izvorne kode za C, C++ in več. -Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till GDB, en källkodsavlusare för C, C++ med mera. -Comment[tr]=Bu eklenti, C, C++ ve daha fazlası için bir kaynak-düzeyinde hata ayıklayıcı olan GDB için bir önucu sağlar. -Comment[ug]=بۇ قىستۇرما GDB نىڭ ئالدى ئۇچىنى تەمىنلەيدۇ. GDB بولسا C، C++ ۋە باشقا تىللارنى ئەسلى كود ھالىتىدە سازلاش ئېلىپ بارالايدىغان سازلىغۇچتۇر. -Comment[uk]=Цей додаток надає можливість користуватися клієнтським інтерфейсом GDB, зневадника вихідного коду на C, C++ тощо. -Comment[x-test]=xxThis plugin provides a frontend for GDB, a source-level debugger for C, C++ and more.xx -Comment[zh_CN]=此插件提供了 GDB 前端,GDB 是一个源码级的 C、C++ 等多语言的调试器。 -Comment[zh_TW]=這個外掛程式提供 GDB 的前端介面。 -Name=GDB Support -Name[bs]=GDB podrška -Name[ca]=Implementació de GDB -Name[ca@valencia]=Implementació de GDB -Name[cs]=Podpora GDB -Name[da]=GDB-understøttelse -Name[de]=Unterstützung für GDB -Name[el]=Υποστήριξη GDB -Name[en_GB]=GDB Support -Name[es]=Implementación de GDB -Name[et]=GDB toetus -Name[fi]=GDB-tuki -Name[fr]=Prise en charge de GDB -Name[ga]=Tacaíocht GDB -Name[gl]=Soporte de GDB -Name[hu]=GDB támogatás -Name[it]=Supporto GDB -Name[ja]=GDB サポート -Name[kk]=GDB қолдауы -Name[km]=គាំទ្រ GDB -Name[lv]=GDB atbalsts -Name[nb]=GDB-støtte -Name[nds]=GDB-Ünnerstütten -Name[nl]=Ondersteuning voor GDB -Name[pl]=Obsługa GDB -Name[pt]=Suporte a GDB -Name[pt_BR]=Suporte ao GDB -Name[ru]=Поддержка GDB -Name[sk]=Podpora GDB -Name[sl]=Podpora za GDB -Name[sv]=GDB stöd -Name[tr]=GDB Desteği -Name[ug]=GDB قوللىشى -Name[uk]=Підтримка GDB -Name[x-test]=xxGDB Supportxx -Name[zh_CN]=GDB 支持 -Name[zh_TW]=GDB 支援 -GenericName=Debugger Frontend -GenericName[bs]=Korisničko okruženje za ispravljač grešaka -GenericName[ca]=Frontal del depurador -GenericName[ca@valencia]=Frontal del depurador -GenericName[cs]=Rozhraní pro ladicí nástroj -GenericName[da]=Fejlsøgningsbrugerflade -GenericName[de]=Oberfläche für Debugger -GenericName[el]=Σύστημα περιβάλλοντος διορθωτή -GenericName[en_GB]=Debugger Frontend -GenericName[es]=Interfaz para el depurador -GenericName[et]=Siluja kasutajaliides -GenericName[eu]=Araztaile-interfazea -GenericName[fi]=Virheenjäljittimen käyttöliittymä -GenericName[fr]=Interface du débogueur -GenericName[ga]=Comhéadan Dífhabhtóra -GenericName[gl]=Interface para o depurador -GenericName[hi]=डिबगर फ्रन्टएण्ड -GenericName[hne]=डिबगर फ्रन्टएन्ड -GenericName[hu]=Grafikus felület nyomkövetéshez -GenericName[is]=Debugger Frontend -GenericName[it]=Interfaccia al debugger -GenericName[ja]=デバッガのフロントエンド -GenericName[kk]=Жөндегіш интерфейсі -GenericName[km]=ផ្នែក​ខាង​មុន​នៃ​កម្មវិធី​បំបាត់​កំហុស​​ -GenericName[ko]=디버거 프론트엔드 -GenericName[lv]=Atkļūdotāja priekšpuse -GenericName[nb]=Grensesnitt for feilsøker -GenericName[nds]=Fehlersöker-Böversiet -GenericName[nl]=Frontend voor debugger -GenericName[pl]=Interfejs do debuggera -GenericName[pt]=Interface do Depurador -GenericName[pt_BR]=Interface do depurador -GenericName[ro]=Interfață depanator -GenericName[ru]=Интегрированный отладчик -GenericName[sk]=Debuger rozhranie -GenericName[sl]=Začelje razhroščevalnika -GenericName[sv]=Gränssnitt till avlusare -GenericName[ta]=டிபக்கர் பிரான்டட் -GenericName[tg]=Интеграл ёфтани созгузор -GenericName[tr]=Hata Ayıklayıcı Önucu -GenericName[ug]=سازلىغۇچ ئالدى ئۇچى -GenericName[uk]=Клієнтська програма зневадника -GenericName[x-test]=xxDebugger Frontendxx -GenericName[zh_CN]=调试器前端 -GenericName[zh_TW]=除錯器前端介面 -Icon=debugger -X-KDE-Library=kdevgdb -X-KDevelop-Category=Global -X-KDevelop-Version=@KDEV_PLUGIN_VERSION@ -X-KDE-PluginInfo-Name=kdevgdb -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-Category=Debugging -ServiceTypes=KDevelop/Plugin -X-KDevelop-Interfaces=org.kdevelop.IStatus -X-KDevelop-IRequired=org.kdevelop.IExecutePlugin -X-KDevelop-Mode=GUI diff --git a/kdevelop/debuggers/gdb/kdevgdbui.rc b/kdevelop/debuggers/gdb/kdevgdbui.rc deleted file mode 100644 index 60260253..00000000 --- a/kdevelop/debuggers/gdb/kdevgdbui.rc +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Run - - - - - - - - - - - Debugger Toolbar - - - - - - diff --git a/kdevelop/debuggers/gdb/memviewdlg.cpp b/kdevelop/debuggers/gdb/memviewdlg.cpp deleted file mode 100644 index 237d93d3..00000000 --- a/kdevelop/debuggers/gdb/memviewdlg.cpp +++ /dev/null @@ -1,535 +0,0 @@ -/*************************************************************************** - begin : Tue Oct 5 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ************************************************************************** - * Copyright 2006 Vladimir Prus - *************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "memviewdlg.h" -#include "gdbcommand.h" -#include "gdbglobal.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include - -#include "debugsession.h" - -namespace GDBDebugger -{ - /** Container for controls that select memory range. - - The memory range selection is embedded into memory view widget, - it's not a standalone dialog. However, we want to have easy way - to hide/show all controls, so we group them in this class. - */ - class MemoryRangeSelector : public QWidget - { - public: - KLineEdit* startAddressLineEdit; - KLineEdit* amountLineEdit; - QPushButton* okButton; - QPushButton* cancelButton; - - MemoryRangeSelector(QWidget* parent) - : QWidget(parent) - { - QVBoxLayout* l = new QVBoxLayout(this); - - // Grid layout: labels + address field - QGridLayout* gl = new QGridLayout(this); - l->addLayout(gl); - - QLabel* l1 = new QLabel(i18n("Start"), this); - gl->addWidget(l1, 0, 1); - - startAddressLineEdit = new KLineEdit(this); - gl->addWidget(startAddressLineEdit, 0, 3); - - QLabel* l2 = new QLabel(i18n("Amount"), this); - gl->addWidget(l2, 2, 1); - - amountLineEdit = new KLineEdit(this); - gl->addWidget(amountLineEdit, 2, 3); - - l->addSpacing(2); - - QHBoxLayout* hb = new QHBoxLayout(this); - l->addLayout(hb); - hb->addStretch(); - - okButton = new QPushButton(i18n("OK"), this); - hb->addWidget(okButton); - - cancelButton = new QPushButton(i18n("Cancel"), this); - hb->addWidget(cancelButton); - - l->addSpacing(2); - setLayout(l); - - connect(startAddressLineEdit, SIGNAL(returnPressed()), - okButton, SLOT(animateClick())); - - connect(amountLineEdit, SIGNAL(returnPressed()), - okButton, SLOT(animateClick())); - } - }; - - - - MemoryView::MemoryView(QWidget* parent) - : QWidget(parent), - // New memory view can be created only when debugger is active, - // so don't set s_appNotStarted here. - khexedit2_widget(0), - amount_(0), data_(0), - debuggerState_(0) - { - setWindowTitle(i18n("Memory view")); - emit captionChanged(windowTitle()); - - initWidget(); - - if (isOk()) - slotEnableOrDisable(); - - connect(KDevelop::ICore::self()->debugController(), - SIGNAL(currentSessionChanged(KDevelop::IDebugSession*)), - SLOT(currentSessionChanged(KDevelop::IDebugSession*))); - } - - void MemoryView::currentSessionChanged(KDevelop::IDebugSession* s) - { - DebugSession *session = qobject_cast(s); - if (!session) return; - connect(session, - SIGNAL(gdbStateChanged(DBGStateFlags,DBGStateFlags)), - SLOT(slotStateChanged(DBGStateFlags,DBGStateFlags))); - } - - void MemoryView::slotStateChanged(DBGStateFlags oldState, DBGStateFlags newState) - { - Q_UNUSED(oldState); - debuggerStateChanged(newState); - } - - void MemoryView::initWidget() - { - QVBoxLayout *l = new QVBoxLayout(this); - - khexedit2_widget = KHE::createBytesEditWidget(this); - if (!khexedit2_widget) - { - QTextEdit* edit = new QTextEdit(this); - l->addWidget(edit); - - edit->setText( - "

Not Available

" - "

Could not open a KHexEdit2 interface. " - "Installing Okteta should provide the required components.

"); - return; - } - - KHE::BytesEditInterface *bytesEdit = KHE::bytesEditInterface(khexedit2_widget); - if (bytesEdit) - { - bytesEdit->setReadOnly(false); - bytesEdit->setOverwriteMode(true); - bytesEdit->setOverwriteOnly(true); - bytesEdit->setAutoDelete(false); - } - - KHE::ValueColumnInterface *valueColumn = KHE::valueColumnInterface(khexedit2_widget); - if (valueColumn) - { - valueColumn->setCoding(KHE::ValueColumnInterface::HexadecimalCoding); - valueColumn->setNoOfGroupedBytes(4); - valueColumn->setByteSpacingWidth(2); - valueColumn->setGroupSpacingWidth(12); - valueColumn->setResizeStyle(KHE::ValueColumnInterface::LockGrouping); - } - - KHE::CharColumnInterface *charColumn = KHE::charColumnInterface(khexedit2_widget); - if(charColumn) - { - charColumn->setShowUnprintable(false); - charColumn->setSubstituteChar('*'); - } - - rangeSelector_ = new MemoryRangeSelector(this); - l->addWidget(rangeSelector_); - - connect(rangeSelector_->okButton, SIGNAL(clicked()), - this, SLOT(slotChangeMemoryRange())); - - connect(rangeSelector_->cancelButton, SIGNAL(clicked()), - this, SLOT(slotHideRangeDialog())); - - connect(rangeSelector_->startAddressLineEdit, - SIGNAL(textChanged(QString)), - this, - SLOT(slotEnableOrDisable())); - - connect(rangeSelector_->amountLineEdit, - SIGNAL(textChanged(QString)), - this, - SLOT(slotEnableOrDisable())); - - l->addWidget(khexedit2_widget); - } - - void MemoryView::debuggerStateChanged(DBGStateFlags state) - { - if (isOk()) - { - debuggerState_ = state; - slotEnableOrDisable(); - } - } - - - void MemoryView::slotHideRangeDialog() - { - rangeSelector_->hide(); - } - - void MemoryView::slotChangeMemoryRange() - { - DebugSession *session = qobject_cast( - KDevelop::ICore::self()->debugController()->currentSession()); - if (!session) return; - - session->addCommand(new ExpressionValueCommand( - rangeSelector_->amountLineEdit->text(), - this, &MemoryView::sizeComputed)); - } - - void MemoryView::sizeComputed(const QString& size) - { - DebugSession *session = qobject_cast( - KDevelop::ICore::self()->debugController()->currentSession()); - if (!session) return; - - session->addCommand(new GDBCommand(GDBMI::DataReadMemory, - QString("%1 x 1 1 %2") - .arg(rangeSelector_->startAddressLineEdit->text()) - .arg(size), - this, - &MemoryView::memoryRead)); - } - - void MemoryView::memoryRead(const GDBMI::ResultRecord& r) - { - const GDBMI::Value& content = r["memory"][0]["data"]; - bool startStringConverted; - start_ = r["addr"].literal().toULongLong(&startStringConverted, 16); - amount_ = content.size(); - - startAsString_ = rangeSelector_->startAddressLineEdit->text(); - amountAsString_ = rangeSelector_->amountLineEdit->text(); - - setWindowTitle(i18np("%2 (1 byte)","%2 (%1 bytes)",amount_,startAsString_)); - emit captionChanged(windowTitle()); - - KHE::BytesEditInterface* bytesEditor = KHE::bytesEditInterface(khexedit2_widget); - bytesEditor->setData(this->data_, 0); - - delete[] this->data_; - this->data_ = new char[amount_]; - for(int i = 0; i < content.size(); ++i) - { - this->data_[i] = content[i].literal().toInt(0, 16); - } - - bytesEditor->setData(this->data_, amount_); - - slotHideRangeDialog(); - } - - - void MemoryView::memoryEdited(int start, int end) - { - DebugSession *session = qobject_cast( - KDevelop::ICore::self()->debugController()->currentSession()); - if (!session) return; - - for(int i = start; i <= end; ++i) - { - session->addCommand(new GDBCommand(GDBMI::GdbSet, - QString("*(char*)(%1 + %2) = %3") - .arg(start_) - .arg(i) - .arg(QString::number(data_[i])))); - } - } - - void MemoryView::contextMenuEvent(QContextMenuEvent *e) - { - if (!isOk()) - return; - - KHE::BytesEditInterface *bytesEdit = KHE::bytesEditInterface(khexedit2_widget); - KHE::ValueColumnInterface *valueColumn = KHE::valueColumnInterface(khexedit2_widget); - - QMenu menu; - - bool app_running = !(debuggerState_ & s_appNotStarted); - - QAction* reload = menu.addAction(i18n("&Reload")); - reload->setIcon(KIcon("view-refresh")); - reload->setEnabled(app_running && amount_ != 0); - - QActionGroup *formatGroup = NULL; - QActionGroup *groupingGroup = NULL; - if (valueColumn) - { - // make Format menu with action group - QMenu *formatMenu = new QMenu(i18n("&Format")); - formatGroup = new QActionGroup(formatMenu); - - QAction *binary = formatGroup->addAction(i18n("&Binary")); - binary->setData(KHE::ValueColumnInterface::BinaryCoding); - binary->setShortcut(Qt::Key_B); - formatMenu->addAction(binary); - - QAction *octal = formatGroup->addAction(i18n("&Octal")); - octal->setData(KHE::ValueColumnInterface::OctalCoding); - octal->setShortcut(Qt::Key_O); - formatMenu->addAction(octal); - - QAction *decimal = formatGroup->addAction(i18n("&Decimal")); - decimal->setData(KHE::ValueColumnInterface::DecimalCoding); - decimal->setShortcut(Qt::Key_D); - formatMenu->addAction(decimal); - - QAction *hex = formatGroup->addAction(i18n("&Hexadecimal")); - hex->setData(KHE::ValueColumnInterface::HexadecimalCoding); - hex->setShortcut(Qt::Key_H); - formatMenu->addAction(hex); - - foreach(QAction* act, formatGroup->actions()) - { - act->setCheckable(true); - act->setChecked(act->data().toInt() == valueColumn->coding()); - act->setShortcutContext(Qt::WidgetWithChildrenShortcut); - } - - menu.addMenu(formatMenu); - - - // make Grouping menu with action group - QMenu *groupingMenu = new QMenu(i18n("&Grouping")); - groupingGroup = new QActionGroup(groupingMenu); - - QAction *group0 = groupingGroup->addAction(i18n("&0")); - group0->setData(0); - group0->setShortcut(Qt::Key_0); - groupingMenu->addAction(group0); - - QAction *group1 = groupingGroup->addAction(i18n("&1")); - group1->setData(1); - group1->setShortcut(Qt::Key_1); - groupingMenu->addAction(group1); - - QAction *group2 = groupingGroup->addAction(i18n("&2")); - group2->setData(2); - group2->setShortcut(Qt::Key_2); - groupingMenu->addAction(group2); - - QAction *group4 = groupingGroup->addAction(i18n("&4")); - group4->setData(4); - group4->setShortcut(Qt::Key_4); - groupingMenu->addAction(group4); - - QAction *group8 = groupingGroup->addAction(i18n("&8")); - group8->setData(8); - group8->setShortcut(Qt::Key_8); - groupingMenu->addAction(group8); - - QAction *group16 = groupingGroup->addAction(i18n("1&6")); - group16->setData(16); - group16->setShortcut(Qt::Key_6); - groupingMenu->addAction(group16); - - foreach(QAction* act, groupingGroup->actions()) - { - act->setCheckable(true); - act->setChecked(act->data().toInt() == valueColumn->noOfGroupedBytes()); - act->setShortcutContext(Qt::WidgetWithChildrenShortcut); - } - - menu.addMenu(groupingMenu); - } - - QAction* write = menu.addAction(i18n("Write changes")); - write->setIcon(KIcon("document-save")); - write->setEnabled(app_running && bytesEdit && bytesEdit->isModified()); - - QAction* range = menu.addAction(i18n("Change memory range")); - range->setEnabled(app_running && !rangeSelector_->isVisible()); - range->setIcon(KIcon("document-edit")); - - QAction* close = menu.addAction(i18n("Close this view")); - close->setIcon(KIcon("window-close")); - - - QAction* result = menu.exec(e->globalPos()); - - - if (result == reload) - { - // We use numeric start_ and amount_ stored in this, - // not textual startAsString_ and amountAsString_, - // because program position might have changes and expressions - // are no longer valid. - DebugSession *session = qobject_cast( - KDevelop::ICore::self()->debugController()->currentSession()); - if (session) { - session->addCommand(new GDBCommand(GDBMI::DataReadMemory, - QString("%1 x 1 1 %2").arg(start_).arg(amount_), - this, - &MemoryView::memoryRead)); - } - } - - if (result && formatGroup && formatGroup == result->actionGroup()) - valueColumn->setCoding((KHE::ValueColumnInterface::KCoding)result->data().toInt()); - - if (result && groupingGroup && groupingGroup == result->actionGroup()) - valueColumn->setNoOfGroupedBytes(result->data().toInt()); - - if (result == write) - { - memoryEdited(0, amount_); - bytesEdit->setModified(false); - } - - if (result == range) - { - rangeSelector_->startAddressLineEdit->setText(startAsString_); - rangeSelector_->amountLineEdit->setText(amountAsString_); - - rangeSelector_->show(); - rangeSelector_->startAddressLineEdit->setFocus(); - } - - if (result == close) - delete this; - } - - bool MemoryView::isOk() const - { - return khexedit2_widget; - } - - void MemoryView::slotEnableOrDisable() - { - bool app_started = !(debuggerState_ & s_appNotStarted); - - bool enabled_ = app_started && - !rangeSelector_->startAddressLineEdit->text().isEmpty() && - !rangeSelector_->amountLineEdit->text().isEmpty(); - - rangeSelector_->okButton->setEnabled(enabled_); - } - - - MemoryViewerWidget::MemoryViewerWidget(CppDebuggerPlugin* /*plugin*/, QWidget* parent) - : QWidget(parent) - { - setWindowIcon(KIcon("debugger")); - setWindowTitle(i18n("Memory viewer")); - - KAction* newMemoryViewerAction = new KAction(this); - newMemoryViewerAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); - newMemoryViewerAction->setText(i18n("New memory viewer")); - newMemoryViewerAction->setToolTip(i18nc("@info:tooltip", "Open a new memory viewer.")); - newMemoryViewerAction->setIcon(KIcon("window-new")); - connect(newMemoryViewerAction, SIGNAL(triggered(bool)), this, SLOT(slotAddMemoryView())); - addAction(newMemoryViewerAction); - - QVBoxLayout *l = new QVBoxLayout(this); - - toolBox_ = new QToolBox(this); - l->addWidget(toolBox_); - - // Start with one empty memory view. - slotAddMemoryView(); - } - - void MemoryViewerWidget::slotAddMemoryView() - { - MemoryView* widget = new MemoryView(this); - toolBox_->addItem(widget, widget->windowTitle()); - toolBox_->setCurrentIndex(toolBox_->indexOf(widget)); - memoryViews_.push_back(widget); - - connect(widget, SIGNAL(captionChanged(QString)), - this, SLOT(slotChildCaptionChanged(QString))); - - connect(widget, SIGNAL(destroyed(QObject*)), - this, SLOT(slotChildDestroyed(QObject*))); - } - - void MemoryViewerWidget::slotChildCaptionChanged(const QString& caption) - { - const QWidget* s = static_cast(sender()); - QWidget* ncs = const_cast(s); - QString cap = caption; - // Prevent intepreting '&' as accelerator specifier. - cap.replace('&', "&&"); - toolBox_->setItemText(toolBox_->indexOf(ncs), cap); - } - - void MemoryViewerWidget::slotChildDestroyed(QObject* child) - { - QList::iterator i, e; - for(i = memoryViews_.begin(), e = memoryViews_.end(); i != e; ++i) - { - if (*i == child) - { - memoryViews_.erase(i); - break; - } - } - } - -} - -#include "moc_memviewdlg.cpp" diff --git a/kdevelop/debuggers/gdb/memviewdlg.h b/kdevelop/debuggers/gdb/memviewdlg.h deleted file mode 100644 index db048327..00000000 --- a/kdevelop/debuggers/gdb/memviewdlg.h +++ /dev/null @@ -1,120 +0,0 @@ -/*************************************************************************** - begin : Tue Oct 5 1999 - copyright : (C) 1999 by John Birch - email : jbb@kdevelop.org - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _MEMVIEW_H_ -#define _MEMVIEW_H_ - -#include "mi/gdbmi.h" - -#include - -#include - -#include "gdbglobal.h" - -namespace KDevelop { -class IDebugSession; -} - -class KLineEdit; -class QToolBox; - -namespace GDBDebugger -{ - class CppDebuggerPlugin; - class MemoryView; - class GDBController; - - class MemoryViewerWidget : public QWidget - { - Q_OBJECT - public: - MemoryViewerWidget(CppDebuggerPlugin* plugin, QWidget* parent = 0); - - public Q_SLOTS: - /** Adds a new memory view. */ - void slotAddMemoryView(); - - Q_SIGNALS: - void requestRaise(); - - - private Q_SLOTS: - void slotChildCaptionChanged(const QString& caption); - void slotChildDestroyed(QObject* child); - - private: // Data - QToolBox* toolBox_; - QList memoryViews_; - }; - - class MemoryView : public QWidget - { - Q_OBJECT - public: - MemoryView(QWidget* parent); - - void debuggerStateChanged(DBGStateFlags state); - - Q_SIGNALS: - void captionChanged(const QString& caption); - - private: // Callbacks - void sizeComputed(const QString& value); - - void memoryRead(const GDBMI::ResultRecord& r); - - private Q_SLOTS: - void memoryEdited(int start, int end); - /** Informs the view about changes in debugger state. - * Allows view to disable itself when debugger is not running. */ - void slotStateChanged(DBGStateFlags oldState, DBGStateFlags newState); - - private: - // Returns true is we successfully created the hexeditor, and so - // can work. - bool isOk() const; - - - - private Q_SLOTS: - /** Invoked when user has changed memory range. - Gets memory for the new range. */ - void slotChangeMemoryRange(); - void slotHideRangeDialog(); - void slotEnableOrDisable(); - - private: // QWidget overrides - void contextMenuEvent(QContextMenuEvent* e); - - private: - void initWidget(); - - private: - class MemoryRangeSelector* rangeSelector_; - QWidget* khexedit2_widget; - - uint amount_; - quintptr start_; - QString startAsString_, amountAsString_; - char* data_; - - int debuggerState_; - private slots: - void currentSessionChanged(KDevelop::IDebugSession* session); - }; -} - -#endif diff --git a/kdevelop/debuggers/gdb/mi/Makefile.am b/kdevelop/debuggers/gdb/mi/Makefile.am deleted file mode 100644 index 07fe25d3..00000000 --- a/kdevelop/debuggers/gdb/mi/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -# We need exceptions since they are used to report all MI access errors. -KDE_CXXFLAGS = $(USE_EXCEPTIONS) - -METASOURCES = AUTO -INCLUDES = $(all_includes) - -lib_LTLIBRARIES = libgdbmi_parser.la -libgdbmi_parser_la_LDFLAGS = $(all_libraries) -libgdbmi_parser_la_SOURCES = gdbmi.cpp miparser.cpp milexer.cpp - diff --git a/kdevelop/debuggers/gdb/mi/gdbmi.cpp b/kdevelop/debuggers/gdb/mi/gdbmi.cpp deleted file mode 100644 index c1d820e7..00000000 --- a/kdevelop/debuggers/gdb/mi/gdbmi.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * Copyright (C) 2005-2006 by Vladimir Prus * - * ghost@cs.msu.su * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#include "gdbmi.h" - -using namespace GDBMI; - - -type_error::type_error() -: std::logic_error("MI type error") -{} - -QString Value::literal() const -{ - throw type_error(); -} - -int Value::toInt(int /*base*/) const -{ - throw type_error(); -} - -bool Value::hasField(const QString&) const -{ - throw type_error(); -} - -const Value& Value::operator[](const QString&) const -{ - throw type_error(); -} - -bool Value::empty() const -{ - throw type_error(); -} - -int Value::size() const -{ - throw type_error(); -} - - -const Value& Value::operator[](int) const -{ - throw type_error(); -} - -QString StringLiteralValue::literal() const -{ - return literal_; -} - -int StringLiteralValue::toInt(int base) const -{ - bool ok; - int result = literal_.toInt(&ok, base); - if (!ok) - throw type_error(); - return result; -} - -TupleValue::~TupleValue() -{ - qDeleteAll(results); -} - -bool TupleValue::hasField(const QString& variable) const -{ - return results_by_name.contains(variable); -} - -const Value& TupleValue::operator[](const QString& variable) const -{ - Result* result = results_by_name.value(variable); - if (!result) - throw type_error(); - return *result->value; -} - -ListValue::~ListValue() -{ - qDeleteAll(results); -} - -bool ListValue::empty() const -{ - return results.isEmpty(); -} - -int ListValue::size() const -{ - return results.size(); -} - -const Value& ListValue::operator[](int index) const -{ - if (index < results.size()) - { - return *results[index]->value; - } - else - throw type_error(); -} - - - - diff --git a/kdevelop/debuggers/gdb/mi/gdbmi.h b/kdevelop/debuggers/gdb/mi/gdbmi.h deleted file mode 100644 index d5e92b8f..00000000 --- a/kdevelop/debuggers/gdb/mi/gdbmi.h +++ /dev/null @@ -1,382 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * Copyright (C) 2005-2006 by Vladimir Prus * - * ghost@cs.msu.su * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef GDBMI_H -#define GDBMI_H - -#include -#include - -#include - -/** -@author Roberto Raggi -@author Vladimir Prus -*/ -namespace GDBMI -{ - enum CommandType { - NonMI, - - BreakAfter, - BreakCatch, - BreakCommands, - BreakCondition, - BreakDelete, - BreakDisable, - BreakEnable, - BreakInfo, - BreakInsert, - BreakList, - BreakWatch, - - DataDisassemble, - DataEvaluateExpression, - DataListChangedRegisters, - DataListRegisterNames, - DataListRegisterValues, - DataReadMemory, - DataWriteMemory, - DataWriteRegisterVariables, - - EnablePrettyPrinting, - EnableTimings, - - EnvironmentCd, - EnvironmentDirectory, - EnvironmentPath, - EnvironmentPwd, - - ExecAbort, - ExecArguments, - ExecContinue, - ExecFinish, - ExecInterrupt, - ExecNext, - ExecNextInstruction, - ExecReturn, - ExecRun, - ExecShowArguments, - ExecSignal, - ExecStep, - ExecStepInstruction, - ExecUntil, - - FileClear, - FileExecAndSymbols, - FileExecFile, - FileListExecSections, - FileListExecSourceFile, - FileListExecSourceFiles, - FileListSharedLibraries, - FileListSymbolFiles, - FileSymbolFile, - - GdbComplete, - GdbExit, - GdbSet, - GdbShow, - GdbSource, - GdbVersion, - - InferiorTtySet, - InferiorTtyShow, - - InterpreterExec, - - ListFeatures, - - OverlayAuto, - OverlayListMappingState, - OverlayListOverlays, - OverlayMap, - OverlayOff, - OverlayOn, - OverlayUnmap, - - SignalHandle, - SignalListHandleActions, - SignalListSignalTypes, - - StackInfoDepth, - StackInfoFrame, - StackListArguments, - StackListExceptionHandlers, - StackListFrames, - StackListLocals, - StackSelectFrame, - - SymbolInfoAddress, - SymbolInfoFile, - SymbolInfoFunction, - SymbolInfoLine, - SymbolInfoSymbol, - SymbolListFunctions, - SymbolListLines, - SymbolListTypes, - SymbolListVariables, - SymbolLocate, - SymbolType, - - TargetAttach, - TargetCompareSections, - TargetDetach, - TargetDisconnect, - TargetDownload, - TargetExecStatus, - TargetListAvailableTargets, - TargetListCurrentTargets, - TargetListParameters, - TargetSelect, - - ThreadInfo, - ThreadListAllThreads, - ThreadListIds, - ThreadSelect, - - TraceActions, - TraceDelete, - TraceDisable, - TraceDump, - TraceEnable, - TraceExists, - TraceFind, - TraceFrameNumber, - TraceInfo, - TraceInsert, - TraceList, - TracePassCount, - TraceSave, - TraceStart, - TraceStop, - - VarAssign, - VarCreate, - VarDelete, - VarEvaluateExpression, - VarInfoPathExpression, - VarInfoExpression, - VarInfoNumChildren, - VarInfoType, - VarListChildren, - VarSetFormat, - VarSetFrozen, - VarShowAttributes, - VarShowFormat, - VarUpdate - }; - - /** Exception that is thrown when we're trying to invoke an - operation that is not supported by specific MI value. For - example, trying to index a string literal. - - Such errors are conceptually the same as assert, but in GUI - we can't use regular assert, and Q_ASSERT, which only prints - a message, is not suitable either. We need to break processing, - and the higher-level code can report "Internal parsing error", - or something. - - Being glorified assert, this exception does not cary any - useful information. - */ - class type_error : public std::logic_error - { - public: - type_error(); - }; - - /** Base class for all MI values. - MI values are of three kinds: - - String literals - - Lists (indexed by integer) - - Tuple (set of named values, indexed by name) - - The structure of response to a specific gdb command is fixed. - While any tuples in response may omit certain named fields, the - kind of each item never changes. That is, response to specific - command can't contains sometimes string and sometimes tuple in - specific position. - - Because of that static structure, it's almost never needed to query - dynamic type of a MI value. Most often we know it's say, tuple, and - can subscripts it. - - So, the Value class has methods for accessing all kinds of values. - Attempting to call a method that is not applicable to specific value - will result in exception. The client code will almost never need to - cast from 'Value' to its derived classes. - - Note also that all methods in this class are const and return - const Value&. That's by design -- there's no need to modify gdb - responses in GUI. - */ - struct Value - { - Value() - : kind(StringLiteral) - {} - private: // Copy disabled to prevent slicing. - Value(const Value&); - Value& operator=(const Value&); - - public: - - virtual ~Value() {} - - enum { StringLiteral, Tuple, List } kind; - - /** If this value is a string literals, returns the string value. - Othewise, throws type_error. - */ - virtual QString literal() const; - - //NOTE: Wouldn't it be better to use literal().toInt and get rid of that? - /** If the value is a string literal, converts it to int and - returns. If conversion fails, or the value cannot be - converted to int, throws type_error. - */ - virtual int toInt(int base = 10) const; - - /** If this value is a tuple, returns true if the tuple - has a field named 'variable'. Otherwise, - throws type_error. - */ - virtual bool hasField(const QString& variable) const; - - /** If this value is a tuple, and contains named field 'variable', - returns it. Otherwise, throws 'type_error'. - This method is virtual, and derived in base class, so that - we can save on casting, when we know for sure that instance - is TupleValue, or ListValue. - */ - virtual const Value& operator[](const QString& variable) const; - - /** If this value is a list, returns true if the list is empty. - If this value is not a list, throws 'type_error'. - */ - virtual bool empty() const; - - /** If this value is a list, returns it's size. - Otherwise, throws 'type_error'. - */ - virtual int size() const; - - /** If this value is a list, returns the element at - 'index'. Otherwise, throws 'type_error'. - */ - virtual const Value& operator[](int index) const; - }; - - /** @internal - Internal class to represent name-value pair in tuples. - */ - struct Result - { - Result() : value(0) {} - ~Result() { delete value; value = 0; } - - QString variable; - Value *value; - }; - - struct StringLiteralValue : public Value - { - StringLiteralValue(const QString &lit) - : literal_(lit) { Value::kind = StringLiteral; } - - public: // Value overrides - - QString literal() const; - int toInt(int base) const; - - private: - QString literal_; - }; - - struct TupleValue : public Value - { - TupleValue() { Value::kind = Tuple; } - ~TupleValue(); - - bool hasField(const QString&) const; - - using Value::operator[]; - const Value& operator[](const QString& variable) const; - - QList results; - QMap results_by_name; - }; - - struct ListValue : public Value - { - ListValue() { Value::kind = List; } - ~ListValue(); - - bool empty() const; - - int size() const; - - using Value::operator[]; - const Value& operator[](int index) const; - - QList results; - - }; - - struct Record - { - virtual ~Record() {} - virtual QString toString() const { Q_ASSERT( 0 ); return QString::null; } - - enum { Prompt, Stream, Result } kind; - }; - - struct ResultRecord : public Record, public TupleValue - { - ResultRecord() - : subkind(CommandResult) - { - Record::kind = Result; - } - - enum { CommandResult, ExecNotification, StatusNotification, GeneralNotification } subkind; - - QString reason; - }; - - struct PromptRecord : public Record - { - inline PromptRecord() { Record::kind = Prompt; } - - virtual QString toString() const - { return "(prompt)\n"; } - }; - - struct StreamRecord : public Record - { - inline StreamRecord() : reason(0) { Record::kind = Stream; } - - char reason; - QString message; - }; -} - -#endif diff --git a/kdevelop/debuggers/gdb/mi/milexer.cpp b/kdevelop/debuggers/gdb/mi/milexer.cpp deleted file mode 100644 index 9768060d..00000000 --- a/kdevelop/debuggers/gdb/mi/milexer.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include "milexer.h" -#include "tokens.h" -#include -#include - -bool MILexer::s_initialized = false; -scan_fun_ptr MILexer::s_scan_table[]; - - -MILexer::MILexer() -: m_ptr(0) -, m_length(0) -, m_line(0) -, m_tokensCount(0) -, m_cursor(0) -{ - if (!s_initialized) - setupScanTable(); -} - -MILexer::~MILexer() -{ -} - -void MILexer::setupScanTable() -{ - s_initialized = true; - - for (int i=0; i<128; ++i) { - switch (i) { - case '\n': - s_scan_table[i] = &MILexer::scanNewline; - break; - - case '"': - s_scan_table[i] = &MILexer::scanStringLiteral; - break; - - default: - if (isspace(i)) - s_scan_table[i] = &MILexer::scanWhiteSpaces; - else if (isalpha(i) || i == '_') - s_scan_table[i] = &MILexer::scanIdentifier; - else if (isdigit(i)) - s_scan_table[i] = &MILexer::scanNumberLiteral; - else - s_scan_table[i] = &MILexer::scanChar; - } - } - - s_scan_table[128] = &MILexer::scanUnicodeChar; -} - -/* - - m_firstToken = m_tokens.data(); - m_currentToken = 0; - - m_firstToken = m_tokens.data(); - m_currentToken = m_firstToken; - */ - -TokenStream *MILexer::tokenize(const FileSymbol *fileSymbol) -{ - m_tokensCount = 0; - m_tokens.resize(64); - - m_contents = fileSymbol->contents; - m_length = m_contents.length(); - m_ptr = 0; - - m_lines.resize(8); - m_line = 0; - - m_lines[m_line++] = 0; - - m_cursor = 0; - - // tokenize - int pos, len; - - for (;;) { - if (m_tokensCount == (int)m_tokens.size()) - m_tokens.resize(m_tokensCount * 2); - - Token &tk = m_tokens[m_tokensCount++]; - tk.kind = nextToken(pos, len); - tk.position = pos; - tk.length = len; - - if (tk.kind == 0) - break; - } - - TokenStream *tokenStream = new TokenStream; - tokenStream->m_contents = m_contents; - - tokenStream->m_lines = m_lines; - tokenStream->m_line = m_line; - - tokenStream->m_tokens = m_tokens; - tokenStream->m_tokensCount = m_tokensCount; - - tokenStream->m_firstToken = tokenStream->m_tokens.data(); - tokenStream->m_currentToken = tokenStream->m_firstToken; - - tokenStream->m_cursor = m_cursor; - - return tokenStream; -} - -int MILexer::nextToken(int &pos, int &len) -{ - int start = 0; - int kind = 0; - char ch = 0; - - while (m_ptr < m_length) { - start = m_ptr; - - ch = m_contents[m_ptr]; - Q_ASSERT(ch >= 0); - (this->*s_scan_table[static_cast(ch)])(&kind); - - switch (kind) { - case Token_whitespaces: - case '\n': - break; - - default: - pos = start; - len = m_ptr - start; - return kind; - } - } - - return 0; -} - -void MILexer::scanChar(int *kind) -{ - *kind = m_contents[m_ptr++]; -} - -void MILexer::scanWhiteSpaces(int *kind) -{ - *kind = Token_whitespaces; - - char ch; - while (m_ptr < m_length) { - ch = m_contents[m_ptr]; - if (!(isspace(ch) && ch != '\n')) - break; - - ++m_ptr; - } -} - -void MILexer::scanNewline(int *kind) -{ - if (m_line == (int)m_lines.size()) - m_lines.resize(m_lines.size() * 2); - - if (m_lines.at(m_line) < m_ptr) - m_lines[m_line++] = m_ptr; - - *kind = m_contents[m_ptr++]; -} - -void MILexer::scanUnicodeChar(int *kind) -{ - *kind = m_contents[m_ptr++]; -} - -void MILexer::scanStringLiteral(int *kind) -{ - ++m_ptr; - while (char c = m_contents[m_ptr]) { - switch (c) { - case '\n': - // ### error - *kind = Token_string_literal; - return; - case '\\': - { - char next = m_contents.at(m_ptr+1); - if (next == '"' || next == '\\') - m_ptr += 2; - else - ++m_ptr; - } - break; - case '"': - ++m_ptr; - *kind = Token_string_literal; - return; - default: - ++m_ptr; - break; - } - } - - // ### error - *kind = Token_string_literal; -} - -void MILexer::scanIdentifier(int *kind) -{ - char ch; - while (m_ptr < m_length) { - ch = m_contents[m_ptr]; - if (!(isalnum(ch) || ch == '-' || ch == '_')) - break; - - ++m_ptr; - } - - *kind = Token_identifier; -} - -void MILexer::scanNumberLiteral(int *kind) -{ - char ch; - while (m_ptr < m_length) { - ch = m_contents[m_ptr]; - if (!(isalnum(ch) || ch == '.')) - break; - - ++m_ptr; - } - - // ### finish to implement me!! - *kind = Token_number_literal; -} - -void TokenStream::positionAt(int position, int *line, int *column) const -{ - if (!(line && column && !m_lines.isEmpty())) - return; - - int first = 0; - int len = m_line; - int half; - int middle; - - while (len > 0) { - half = len >> 1; - middle = first; - - middle += half; - - if (m_lines[middle] < position) { - first = middle; - ++first; - len = len - half - 1; - } - else - len = half; - } - - *line = qMax(first - 1, 0); - *column = position - m_lines.at(*line); - - Q_ASSERT( *column >= 0 ); -} - -QByteArray TokenStream::tokenText(int index) const -{ - Token *t = index < 0 ? m_currentToken : m_firstToken + index; - const char* data = m_contents; - return QByteArray(data + t->position, t->length); -} - diff --git a/kdevelop/debuggers/gdb/mi/milexer.h b/kdevelop/debuggers/gdb/mi/milexer.h deleted file mode 100644 index 35dc518d..00000000 --- a/kdevelop/debuggers/gdb/mi/milexer.h +++ /dev/null @@ -1,147 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef MILEXER_H -#define MILEXER_H - -#include -#include -#include - -class MILexer; -struct TokenStream; - -typedef void (MILexer::*scan_fun_ptr)(int *kind); - -struct Token -{ - int kind; - int position; - int length; -}; - -struct FileSymbol -{ - QByteArray contents; - TokenStream *tokenStream; - - inline FileSymbol() - : tokenStream(0) {} - - inline ~FileSymbol(); -}; - -struct TokenStream -{ - inline int lookAhead(int n = 0) const - { return (m_currentToken + n)->kind; } - - inline int currentToken() const - { return m_currentToken->kind; } - - inline QByteArray currentTokenText() const - { return tokenText(-1); } - - QByteArray tokenText(int index = 0) const; - - inline int lineOffset(int line) const - { return m_lines.at(line); } - - void positionAt(int position, int *line, int *column) const; - - inline void getTokenStartPosition(int index, int *line, int *column) const - { positionAt((m_firstToken + index)->position, line, column); } - - inline void getTokenEndPosition(int index, int *line, int *column) const - { - Token *tk = m_firstToken + index; - positionAt(tk->position + tk->length, line, column); - } - - inline void rewind(int index) - { m_currentToken = m_firstToken + index; } - - inline int cursor() const - { return m_currentToken - m_firstToken; } - - inline void nextToken() - { m_currentToken++; m_cursor++; } - -//private: - QByteArray m_contents; - - QVector m_lines; - int m_line; - - QVector m_tokens; - int m_tokensCount; - - Token *m_firstToken; - Token *m_currentToken; - - int m_cursor; -}; - -class MILexer -{ -public: - MILexer(); - ~MILexer(); - - TokenStream *tokenize(const FileSymbol *fileSymbol); - -private: - int nextToken(int &position, int &len); - - void scanChar(int *kind); - void scanUnicodeChar(int *kind); - void scanNewline(int *kind); - void scanWhiteSpaces(int *kind); - void scanStringLiteral(int *kind); - void scanNumberLiteral(int *kind); - void scanIdentifier(int *kind); - - void setupScanTable(); - -private: - static bool s_initialized; - static scan_fun_ptr s_scan_table[128 + 1]; - - QByteArray m_contents; - int m_ptr; - // Cached 'm_contents.length()' - int m_length; - - QVector m_lines; - int m_line; - - QVector m_tokens; - int m_tokensCount; - - int m_cursor; -}; - -inline FileSymbol::~FileSymbol() -{ - delete tokenStream; - tokenStream = 0; -} - - -#endif diff --git a/kdevelop/debuggers/gdb/mi/miparser.cpp b/kdevelop/debuggers/gdb/mi/miparser.cpp deleted file mode 100644 index 123c97ee..00000000 --- a/kdevelop/debuggers/gdb/mi/miparser.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * Copyright (C) 2005-2006 by Vladimir Prus * - * ghost@cs.msu.su * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#include "miparser.h" -#include "tokens.h" -#include - -using namespace GDBMI; - -#define MATCH(tok) \ - do { \ - if (m_lex->lookAhead(0) != (tok)) \ - return false; \ - } while (0) - -#define ADVANCE(tok) \ - do { \ - MATCH(tok); \ - m_lex->nextToken(); \ - } while (0) - -MIParser::MIParser() - : m_lex(0) -{ -} - -MIParser::~MIParser() -{ -} - -Record *MIParser::parse(FileSymbol *file) -{ - m_lex = 0; - - Record *record = 0; - - TokenStream *tokenStream = m_lexer.tokenize(file); - if (!tokenStream) - return 0; - - m_lex = file->tokenStream = tokenStream; - - switch (m_lex->lookAhead()) { - case '~': - case '@': - case '&': - parseStreamRecord(record); - break; - case '(': - parsePrompt(record); - break; - case '^': - parseResultRecord(record); - break; - case '*': - // Same as result, only differs in start - // marker. - parseResultRecord(record); - break; - case '=': - parseResultRecord(record); - break; - default: - break; - } - - return record; -} - -bool MIParser::parsePrompt(Record *&record) -{ - ADVANCE('('); - MATCH(Token_identifier); - if (m_lex->currentTokenText() != "gdb") - return false; - m_lex->nextToken(); - ADVANCE(')'); - - record = new PromptRecord; - return true; -} - -bool MIParser::parseStreamRecord(Record *&record) -{ - std::unique_ptr stream(new StreamRecord); - - switch (m_lex->lookAhead()) { - case '~': - case '@': - case '&': { - stream->reason = m_lex->lookAhead(); - m_lex->nextToken(); - MATCH(Token_string_literal); - stream->message = parseStringLiteral(); - record = stream.release(); - } - return true; - - default: - break; - } - - return false; -} - -bool MIParser::parseResultRecord(Record *&record) -{ - char c = m_lex->lookAhead(); - if (c != '^' && c != '*' && c != '=' && c != '+') - return false; - m_lex->nextToken(); - - MATCH(Token_identifier); - QString reason = m_lex->currentTokenText(); - m_lex->nextToken(); - - std::unique_ptr res(new ResultRecord); - res->reason = reason; - if (c == '^') - res->subkind = ResultRecord::CommandResult; - else if (c == '*') - res->subkind = ResultRecord::ExecNotification; - else if (c == '+') - res->subkind = ResultRecord::StatusNotification; - else { - Q_ASSERT(c == '='); - res->subkind = ResultRecord::GeneralNotification; - } - - if (m_lex->lookAhead() != ',') { - record = res.release(); - return true; - } - - m_lex->nextToken(); - - if (!parseCSV(*res)) - return false; - - record = res.release(); - return true; -} - -bool MIParser::parseResult(Result *&result) -{ - // be less strict about the format, see e.g.: - // https://bugs.kde.org/show_bug.cgi?id=304730 - // http://sourceware.org/bugzilla/show_bug.cgi?id=9659 - - std::unique_ptr res(new Result); - - if (m_lex->lookAhead() == Token_identifier) { - res->variable = m_lex->currentTokenText(); - m_lex->nextToken(); - - if (m_lex->lookAhead() != '=') { - result = res.release(); - return true; - } - - m_lex->nextToken(); - } - - Value *value = 0; - if (!parseValue(value)) - return false; - - res->value = value; - result = res.release(); - - return true; -} - -bool MIParser::parseValue(Value *&value) -{ - value = 0; - - switch (m_lex->lookAhead()) { - case Token_string_literal: { - value = new StringLiteralValue(parseStringLiteral()); - } - return true; - - case '{': - return parseTuple(value); - - case '[': - return parseList(value); - - default: - break; - } - - return false; -} - -bool MIParser::parseTuple(Value *&value) -{ - TupleValue* val; - - if (!parseCSV(&val, '{', '}')) - return false; - - value = val; - return true; -} - -bool MIParser::parseList(Value *&value) -{ - ADVANCE('['); - - std::unique_ptr lst(new ListValue); - - // Note: can't use parseCSV here because of nested - // "is this Value or Result" guessing. Too lazy to factor - // that out too using function pointers. - int tok = m_lex->lookAhead(); - while (tok && tok != ']') { - Result *result = 0; - Value *val = 0; - - if (tok == Token_identifier) - { - if (!parseResult(result)) - return false; - } - else if (!parseValue(val)) - return false; - - Q_ASSERT(result || val); - - if (!result) { - result = new Result; - result->value = val; - } - lst->results.append(result); - - if (m_lex->lookAhead() == ',') - m_lex->nextToken(); - - tok = m_lex->lookAhead(); - } - ADVANCE(']'); - - value = lst.release(); - - return true; -} - -bool MIParser::parseCSV(TupleValue** value, - char start, char end) -{ - std::unique_ptr tuple(new TupleValue); - - if (!parseCSV(*tuple, start, end)) - return false; - - *value = tuple.get(); - tuple.release(); - return true; -} - -bool MIParser::parseCSV(GDBMI::TupleValue& value, - char start, char end) -{ - if (start) - ADVANCE(start); - - int tok = m_lex->lookAhead(); - while (tok) { - if (end && tok == end) - break; - - Result *result; - if (!parseResult(result)) - return false; - - value.results.append(result); - value.results_by_name.insert(result->variable, result); - - if (m_lex->lookAhead() == ',') - m_lex->nextToken(); - - tok = m_lex->lookAhead(); - } - - if (end) - ADVANCE(end); - - return true; -} - - -QString MIParser::parseStringLiteral() -{ - QByteArray messageByteArray = m_lex->currentTokenText(); - QString message = QString::fromUtf8(messageByteArray.constData()); - - int length = message.length(); - QString message2; - message2.reserve(length); - // The [1,length-1] range removes quotes without extra - // call to 'mid' - int target_index = 0; - for(int i = 1, e = length-1; i != e; ++i) - { - int translated = -1; - if (message[i] == '\\') - { - if (i+1 < length) - { - // TODO: implement all the other escapes, maybe - if (message[i+1] == 'n') - { - translated = '\n'; - } - else if (message[i+1] == '\\') - { - translated = '\\'; - } - else if (message[i+1] == '"') - { - translated = '"'; - } - else if (message[i+1] == 't') - { - translated = '\t'; - } - - } - } - - if (translated != -1) - { - message2[target_index++] = translated; - ++i; - } - else - { - message2[target_index++] = message[i]; - } - } - - m_lex->nextToken(); - return message2; -} - diff --git a/kdevelop/debuggers/gdb/mi/miparser.h b/kdevelop/debuggers/gdb/mi/miparser.h deleted file mode 100644 index 7096af0e..00000000 --- a/kdevelop/debuggers/gdb/mi/miparser.h +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef MIPARSER_H -#define MIPARSER_H - -#include "milexer.h" -#include "gdbmi.h" - -#include - -/** -@author Roberto Raggi -*/ -class MIParser -{ -public: - MIParser(); - ~MIParser(); - - GDBMI::Record *parse(FileSymbol *file); - -protected: // rules - bool parseResultRecord(GDBMI::Record *&record); - bool parsePrompt(GDBMI::Record *&record); - bool parseStreamRecord(GDBMI::Record *&record); - - bool parseResult(GDBMI::Result *&result); - bool parseValue(GDBMI::Value *&value); - bool parseTuple(GDBMI::Value *&value); - bool parseList(GDBMI::Value *&value); - - /** Creates new TupleValue object, writes its address - into *value, parses a comma-separated set of values, - and adds each new value into (*value)->results. - If 'start' and 'end' are not zero, they specify - start and end delimiter of the list. - Parsing stops when we see 'end' character, or, if - 'end' is zero, at the end of input. - */ - bool parseCSV(GDBMI::TupleValue** value, - char start = 0, char end = 0); - - /** @overload - Same as above, but writes into existing tuple. - */ - bool parseCSV(GDBMI::TupleValue& value, - char start = 0, char end = 0); - - - /** Parses a string literal and returns it. Advances - the lexer past the literal. Processes C escape sequences - in the string. - @pre lex->lookAhead(0) == Token_string_literal - */ - QString parseStringLiteral(); - - - -private: - MILexer m_lexer; - TokenStream *m_lex; -}; - -#endif diff --git a/kdevelop/debuggers/gdb/mi/tokens.h b/kdevelop/debuggers/gdb/mi/tokens.h deleted file mode 100644 index c9ab283d..00000000 --- a/kdevelop/debuggers/gdb/mi/tokens.h +++ /dev/null @@ -1,34 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 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 Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifndef TOKENS_H -#define TOKENS_H - -enum Type -{ - Token_eof = 0, - Token_identifier = 1000, - Token_number_literal, - Token_string_literal, - Token_whitespaces -}; - -#endif - diff --git a/kdevelop/debuggers/gdb/printers/CMakeLists.txt b/kdevelop/debuggers/gdb/printers/CMakeLists.txt deleted file mode 100644 index 891ddd42..00000000 --- a/kdevelop/debuggers/gdb/printers/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -if(ENABLE_TESTING) - add_subdirectory(tests) -endif() - -configure_file( gdbinit ${CMAKE_CURRENT_BINARY_DIR}/gdbinit ) - -install( FILES helper.py qt4.py kde4.py - ${CMAKE_CURRENT_BINARY_DIR}/gdbinit - DESTINATION ${DATA_INSTALL_DIR}/kdevgdb/printers ) diff --git a/kdevelop/debuggers/gdb/printers/gdbinit b/kdevelop/debuggers/gdb/printers/gdbinit deleted file mode 100644 index c82ac979..00000000 --- a/kdevelop/debuggers/gdb/printers/gdbinit +++ /dev/null @@ -1,11 +0,0 @@ -python -import sys -sys.path.insert(0, '${DATA_INSTALL_DIR}/kdevgdb/printers') - -from qt4 import register_qt4_printers -register_qt4_printers (None) - -from kde4 import register_kde4_printers -register_kde4_printers (None) - -end diff --git a/kdevelop/debuggers/gdb/printers/helper.py b/kdevelop/debuggers/gdb/printers/helper.py deleted file mode 100644 index 3f40f8b2..00000000 --- a/kdevelop/debuggers/gdb/printers/helper.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -# Helper module for pretty-printers - -# Copyright (C) 2013 Kevin Funk - -# 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 2 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 . - -import sys - -# BEGIN: Utilities for wrapping differences of Python 2.x and Python 3 -# Inspired by http://pythonhosted.org/six/ - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 - -# create Python 2.x & 3.x compatible iterator base -if PY3: - Iterator = object -else: - class Iterator(object): - - def next(self): - return type(self).__next__(self) -if PY3: - unichr = chr -else: - unichr = unichr - -# END - -# BEGIN: Helper functions for pretty-printers - -def has_field(val, name): - """Check whether @p val (gdb.Value) has a field named @p name""" - try: - val[name] - return True - except Exception: - return False - -def default_iterator(val): - for field in val.type.fields(): - yield field.name, val[field.name] - -class FunctionLookup: - - def __init__(self, gdb, pretty_printers_dict): - self.gdb = gdb - self.pretty_printers_dict = pretty_printers_dict - - def __call__(self, val): - "Look-up and return a pretty-printer that can print val." - - # Get the type. - type = val.type; - - # If it points to a reference, get the reference. - if type.code == self.gdb.TYPE_CODE_REF: - type = type.target () - - # Get the unqualified type, stripped of typedefs. - type = type.unqualified ().strip_typedefs () - - # Get the type name. - typename = type.tag - if typename == None: - return None - - # Iterate over local dictionary of types to determine - # if a printer is registered for that type. Return an - # instantiation of the printer if found. - for function in self.pretty_printers_dict: - if function.search (typename): - return self.pretty_printers_dict[function](val) - - # Cannot find a pretty printer. Return None. - return None - -# END diff --git a/kdevelop/debuggers/gdb/printers/kde4.py b/kdevelop/debuggers/gdb/printers/kde4.py deleted file mode 100644 index c058a880..00000000 --- a/kdevelop/debuggers/gdb/printers/kde4.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -# Pretty-printers for KDE4. - -# Copyright (C) 2009 Milian Wolff -# Copyright (C) 2014 Kevin Funk - -# 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 2 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 . - -import gdb -import itertools -import re - -import qt4 - -from helper import * - -class KDevelop_Path: - def __init__(self, val): - self.val = val - - def to_string(self): - iterator = qt4.QVectorPrinter(self.val['m_data'], 'QVector').children() - pathSegments = [str(it[1]) for it in iterator] - return "(" + ", ".join(pathSegments) + ")" if pathSegments else None - -class KTextEditor_CursorPrinter: - "Pretty Printer for KTextEditor::Cursor" - - def __init__(self, val): - self.val = val - - def to_string(self): - return "[%d, %d]" % (self.val['m_line'], self.val['m_column']) - -class KTextEditor_RangePrinter: - "Pretty Printer for KTextEditor::Range" - - def __init__(self, val): - self.val = val - - def to_string(self): - return "[(%d, %d) -> (%d, %d)]" % (self.val['m_start']['m_line'], self.val['m_start']['m_column'], - self.val['m_end']['m_line'], self.val['m_end']['m_column']) - -pretty_printers_dict = {} - -def register_kde4_printers (obj): - if obj == None: - obj = gdb - - obj.pretty_printers.append(FunctionLookup(gdb, pretty_printers_dict)) - -def build_dictionary (): - pretty_printers_dict[re.compile('^KDevelop::Path$')] = lambda val: KDevelop_Path(val) - - pretty_printers_dict[re.compile('^KTextEditor::Cursor$')] = lambda val: KTextEditor_CursorPrinter(val) - pretty_printers_dict[re.compile('^KTextEditor::Range$')] = lambda val: KTextEditor_RangePrinter(val) - -build_dictionary () diff --git a/kdevelop/debuggers/gdb/printers/qt4.py b/kdevelop/debuggers/gdb/printers/qt4.py deleted file mode 100644 index 1a34c05c..00000000 --- a/kdevelop/debuggers/gdb/printers/qt4.py +++ /dev/null @@ -1,608 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Pretty-printers for Qt4. - -# Copyright (C) 2009 Niko Sams - -# 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 2 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 . - -import gdb -import itertools -import re - -from helper import * - -class QStringPrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - size = self.val['d']['size'] - ret = "" - - # The QString object might be not yet initialized. In this case size is a bogus value - # and the following 2 lines might throw memory access error. Hence the try/catch. - try: - isQt4 = has_field(self.val['d'], 'data') # Qt4 has d->data, Qt5 doesn't. - if isQt4: - dataAsCharPointer = self.val['d']['data'].cast(gdb.lookup_type("char").pointer()) - else: - dataAsCharPointer = (self.val['d'] + 1).cast(gdb.lookup_type("char").pointer()) - ret = dataAsCharPointer.string(encoding = 'UTF-16', length = size * 2) - except Exception: - # swallow the exception and return empty string - pass - return ret - - def display_hint (self): - return 'string' - - -class QByteArrayPrinter: - - def __init__(self, val): - self.val = val - - class _iterator(Iterator): - def __init__(self, data, size): - self.data = data - self.size = size - self.count = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.count >= self.size: - raise StopIteration - count = self.count - self.count = self.count + 1 - return ('[%d]' % count, self.data[count]) - - def children(self): - return self._iterator(self.val['d']['data'], self.val['d']['size']) - - def to_string(self): - #todo: handle charset correctly - return self.val['d']['data'].string() - - def display_hint (self): - return 'string' - -class QListPrinter: - "Print a QList" - - class _iterator(Iterator): - def __init__(self, nodetype, d): - self.nodetype = nodetype - self.d = d - self.count = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.count >= self.d['end'] - self.d['begin']: - raise StopIteration - count = self.count - array = self.d['array'][self.d['begin'] + count] - - #from QTypeInfo::isLarge - isLarge = self.nodetype.sizeof > gdb.lookup_type('void').pointer().sizeof - - isPointer = self.nodetype.code == gdb.TYPE_CODE_PTR - - #unfortunately we can't use QTypeInfo::isStatic as it's all inlined, so use - #this list of types that use Q_DECLARE_TYPEINFO(T, Q_MOVABLE_TYPE) - #(obviously it won't work for custom types) - movableTypes = ['QRect', 'QRectF', 'QString', 'QMargins', 'QLocale', 'QChar', 'QDate', 'QTime', 'QDateTime', 'QVector', - 'QRegExpr', 'QPoint', 'QPointF', 'QByteArray', 'QSize', 'QSizeF', 'QBitArray', 'QLine', 'QLineF', 'QModelIndex', 'QPersitentModelIndex', - 'QVariant', 'QFileInfo', 'QUrl', 'QXmlStreamAttribute', 'QXmlStreamNamespaceDeclaration', 'QXmlStreamNotationDeclaration', - 'QXmlStreamEntityDeclaration'] - #this list of types that use Q_DECLARE_TYPEINFO(T, Q_PRIMITIVE_TYPE) (from qglobal.h) - primitiveTypes = ['bool', 'char', 'signed char', 'unsigned char', 'short', 'unsigned short', 'int', 'unsigned int', 'long', 'unsigned long', 'long long', 'unsigned long long', 'float', 'double'] - - if movableTypes.count(self.nodetype.tag) or primitiveTypes.count(str(self.nodetype)): - isStatic = False - else: - isStatic = not isPointer - - if isLarge or isStatic: #see QList::Node::t() - node = array.cast(gdb.lookup_type('QList<%s>::Node' % self.nodetype).pointer()) - else: - node = array.cast(gdb.lookup_type('QList<%s>::Node' % self.nodetype)) - self.count = self.count + 1 - return ('[%d]' % count, node['v'].cast(self.nodetype)) - - def __init__(self, val, container, itype): - self.val = val - self.container = container - if itype == None: - self.itype = self.val.type.template_argument(0) - else: - self.itype = gdb.lookup_type(itype) - - def children(self): - return self._iterator(self.itype, self.val['d']) - - def to_string(self): - if self.val['d']['end'] == self.val['d']['begin']: - empty = "empty " - else: - empty = "" - - return "%s%s<%s>" % ( empty, self.container, self.itype ) - -class QVectorPrinter: - "Print a QVector" - - class _iterator(Iterator): - def __init__(self, nodetype, d, p): - self.nodetype = nodetype - self.d = d - self.p = p - self.count = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.count >= self.p['size']: - raise StopIteration - count = self.count - - self.count = self.count + 1 - return ('[%d]' % count, self.p['array'][count]) - - def __init__(self, val, container): - self.val = val - self.container = container - self.itype = self.val.type.template_argument(0) - - def children(self): - return self._iterator(self.itype, self.val['d'], self.val['p']) - - def to_string(self): - if self.val['d']['size'] == 0: - empty = "empty " - else: - empty = "" - - return "%s%s<%s>" % ( empty, self.container, self.itype ) - -class QLinkedListPrinter: - "Print a QLinkedList" - - class _iterator(Iterator): - def __init__(self, nodetype, begin, size): - self.nodetype = nodetype - self.it = begin - self.pos = 0 - self.size = size - - def __iter__(self): - return self - - def __next__(self): - if self.pos >= self.size: - raise StopIteration - - pos = self.pos - val = self.it['t'] - self.it = self.it['n'] - self.pos = self.pos + 1 - return ('[%d]' % pos, val) - - def __init__(self, val): - self.val = val - self.itype = self.val.type.template_argument(0) - - def children(self): - return self._iterator(self.itype, self.val['e']['n'], self.val['d']['size']) - - def to_string(self): - if self.val['d']['size'] == 0: - empty = "empty " - else: - empty = "" - - return "%sQLinkedList<%s>" % ( empty, self.itype ) - -class QMapPrinter: - "Print a QMap" - - class _iterator(Iterator): - def __init__(self, val): - self.val = val - self.ktype = self.val.type.template_argument(0) - self.vtype = self.val.type.template_argument(1) - self.data_node = self.val['e']['forward'][0] - self.count = 0 - - def __iter__(self): - return self - - def payload (self): - if gdb.parse_and_eval: - ret = int(gdb.parse_and_eval('QMap<%s, %s>::payload()' % (self.ktype, self.vtype))) - if (ret): return ret; - - #if the inferior function call didn't work, let's try to calculate ourselves - - #we can't use QMapPayloadNode as it's inlined - #as a workaround take the sum of sizeof(members) - ret = self.ktype.sizeof - ret += self.vtype.sizeof - ret += gdb.lookup_type('void').pointer().sizeof - - #but because of data alignment the value can be higher - #so guess it's aliged by sizeof(void*) - #TODO: find a real solution for this problem - ret += ret % gdb.lookup_type('void').pointer().sizeof - - #for some reason booleans are different - if str(self.vtype) == 'bool': - ret += 2 - - ret -= gdb.lookup_type('void').pointer().sizeof - - return ret - - def concrete (self, data_node): - node_type = gdb.lookup_type('QMapNode<%s, %s>' % (self.ktype, self.vtype)).pointer() - return (data_node.cast(gdb.lookup_type('char').pointer()) - self.payload()).cast(node_type) - - def __next__(self): - if self.data_node == self.val['e']: - raise StopIteration - node = self.concrete(self.data_node).dereference() - if self.count % 2 == 0: - item = node['key'] - else: - item = node['value'] - self.data_node = node['forward'][0] - - result = ('[%d]' % self.count, item) - self.count = self.count + 1 - return result - - - def __init__(self, val, container): - self.val = val - self.container = container - - def children(self): - isQt4 = has_field(self.val, 'e') # Qt4 has 'e', Qt5 doesn't - if isQt4: - return self._iterator(self.val) - else: - # TODO: Add proper iterator for Qt5-based QMap - return default_iterator(self.val) - - def to_string(self): - if self.val['d']['size'] == 0: - empty = "empty " - else: - empty = "" - - return "%s%s<%s, %s>" % ( empty, self.container, self.val.type.template_argument(0), self.val.type.template_argument(1) ) - - def display_hint (self): - return 'map' - -class QHashPrinter: - "Print a QHash" - - class _iterator(Iterator): - def __init__(self, val): - self.val = val - self.d = self.val['d'] - self.ktype = self.val.type.template_argument(0) - self.vtype = self.val.type.template_argument(1) - self.end_node = self.d.cast(gdb.lookup_type('QHashData::Node').pointer()) - self.data_node = self.firstNode() - self.count = 0 - - def __iter__(self): - return self - - def hashNode (self): - "Casts the current QHashData::Node to a QHashNode and returns the result. See also QHash::concrete()" - return self.data_node.cast(gdb.lookup_type('QHashNode<%s, %s>' % (self.ktype, self.vtype)).pointer()) - - def firstNode (self): - "Get the first node, See QHashData::firstNode()." - e = self.d.cast(gdb.lookup_type('QHashData::Node').pointer()) - #print "QHashData::firstNode() e %s" % e - bucketNum = 0 - bucket = self.d['buckets'][bucketNum] - #print "QHashData::firstNode() *bucket %s" % bucket - n = self.d['numBuckets'] - #print "QHashData::firstNode() n %s" % n - while n: - #print "QHashData::firstNode() in while, n %s" % n; - if bucket != e: - #print "QHashData::firstNode() in while, return *bucket %s" % bucket - return bucket - bucketNum += 1 - bucket = self.d['buckets'][bucketNum] - #print "QHashData::firstNode() in while, new bucket %s" % bucket - n -= 1 - #print "QHashData::firstNode() return e %s" % e - return e - - - def nextNode (self, node): - "Get the nextNode after the current, see also QHashData::nextNode()." - #print "******************************** nextNode" - #print "nextNode: node %s" % node - next = node['next'].cast(gdb.lookup_type('QHashData::Node').pointer()) - e = next - - #print "nextNode: next %s" % next - if next['next']: - #print "nextNode: return next" - return next - - #print "nextNode: node->h %s" % node['h'] - #print "nextNode: numBuckets %s" % self.d['numBuckets'] - start = (node['h'] % self.d['numBuckets']) + 1 - bucketNum = start - #print "nextNode: start %s" % start - bucket = self.d['buckets'][start] - #print "nextNode: bucket %s" % bucket - n = self.d['numBuckets'] - start - #print "nextNode: n %s" % n - while n: - #print "nextNode: in while; n %s" % n - #print "nextNode: in while; e %s" % e - #print "nextNode: in while; *bucket %s" % bucket - if bucket != e: - #print "nextNode: in while; return bucket %s" % bucket - return bucket - bucketNum += 1 - bucket = self.d['buckets'][bucketNum] - n -= 1 - #print "nextNode: return e %s" % e - return e - - def __next__(self): - "GDB iteration, first call returns key, second value and then jumps to the next hash node." - if self.data_node == self.end_node: - raise StopIteration - - node = self.hashNode() - - if self.count % 2 == 0: - item = node['key'] - else: - item = node['value'] - self.data_node = self.nextNode(self.data_node) - - self.count = self.count + 1 - return ('[%d]' % self.count, item) - - def __init__(self, val, container): - self.val = val - self.container = container - - def children(self): - return self._iterator(self.val) - - def to_string(self): - if self.val['d']['size'] == 0: - empty = "empty " - else: - empty = "" - - return "%s%s<%s, %s>" % ( empty, self.container, self.val.type.template_argument(0), self.val.type.template_argument(1) ) - - def display_hint (self): - return 'map' - -class QDatePrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - julianDay = self.val['jd'] - - if julianDay == 0: - return "invalid QDate" - - # Copied from Qt sources - if julianDay >= 2299161: - # Gregorian calendar starting from October 15, 1582 - # This algorithm is from Henry F. Fliegel and Thomas C. Van Flandern - ell = julianDay + 68569; - n = (4 * ell) / 146097; - ell = ell - (146097 * n + 3) / 4; - i = (4000 * (ell + 1)) / 1461001; - ell = ell - (1461 * i) / 4 + 31; - j = (80 * ell) / 2447; - d = ell - (2447 * j) / 80; - ell = j / 11; - m = j + 2 - (12 * ell); - y = 100 * (n - 49) + i + ell; - else: - # Julian calendar until October 4, 1582 - # Algorithm from Frequently Asked Questions about Calendars by Claus Toendering - julianDay += 32082; - dd = (4 * julianDay + 3) / 1461; - ee = julianDay - (1461 * dd) / 4; - mm = ((5 * ee) + 2) / 153; - d = ee - (153 * mm + 2) / 5 + 1; - m = mm + 3 - 12 * (mm / 10); - y = dd - 4800 + (mm / 10); - if y <= 0: - --y; - return "%d-%02d-%02d" % (y, m, d) - -class QTimePrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - ds = self.val['mds'] - - if ds == -1: - return "invalid QTime" - - MSECS_PER_HOUR = 3600000 - SECS_PER_MIN = 60 - MSECS_PER_MIN = 60000 - - hour = ds / MSECS_PER_HOUR - minute = (ds % MSECS_PER_HOUR) / MSECS_PER_MIN - second = (ds / 1000)%SECS_PER_MIN - msec = ds % 1000 - return "%02d:%02d:%02d.%03d" % (hour, minute, second, msec) - -class QDateTimePrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - #val['d'] is a QDateTimePrivate, but for some reason casting to that doesn't work - #so work around by manually adjusting the pointer - date = self.val['d'].cast(gdb.lookup_type('char').pointer()); - date += gdb.lookup_type('int').sizeof #increment for QAtomicInt ref; - date = date.cast(gdb.lookup_type('QDate').pointer()).dereference(); - - time = self.val['d'].cast(gdb.lookup_type('char').pointer()); - time += gdb.lookup_type('int').sizeof + gdb.lookup_type('QDate').sizeof #increment for QAtomicInt ref; and QDate date; - time = time.cast(gdb.lookup_type('QTime').pointer()).dereference(); - return "%s %s" % (date, time) - -class QUrlPrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - try: - return self.val['d']['encodedOriginal'] - except RuntimeError: - #if no debug information is avaliable for Qt, try guessing the correct address for encodedOriginal - #problem with this is that if QUrlPrivate members get changed, this fails - offset = gdb.lookup_type('int').sizeof - offset += offset % gdb.lookup_type('void').pointer().sizeof #alignment - offset += gdb.lookup_type('QString').sizeof * 6 - offset += gdb.lookup_type('QByteArray').sizeof - encodedOriginal = self.val['d'].cast(gdb.lookup_type('char').pointer()); - encodedOriginal += offset - encodedOriginal = encodedOriginal.cast(gdb.lookup_type('QByteArray').pointer()).dereference(); - encodedOriginal = encodedOriginal['d']['data'].string() - return encodedOriginal - -class QSetPrinter: - "Print a QSet" - - def __init__(self, val): - self.val = val - - class _iterator(Iterator): - def __init__(self, hashIterator): - self.hashIterator = hashIterator - self.count = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.hashIterator.data_node == self.hashIterator.end_node: - raise StopIteration - - node = self.hashIterator.hashNode() - - item = node['key'] - self.hashIterator.data_node = self.hashIterator.nextNode(self.hashIterator.data_node) - - self.count = self.count + 1 - return ('[%d]' % (self.count-1), item) - - def children(self): - hashPrinter = QHashPrinter(self.val['q_hash'], None) - hashIterator = hashPrinter._iterator(self.val['q_hash']) - return self._iterator(hashIterator) - - def to_string(self): - if self.val['q_hash']['d']['size'] == 0: - empty = "empty " - else: - empty = "" - - return "%sQSet<%s>" % ( empty , self.val.type.template_argument(0) ) - - -class QCharPrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - return unichr(self.val['ucs']) - - def display_hint (self): - return 'string' - -class QUuidPrinter: - - def __init__(self, val): - self.val = val - - def to_string(self): - return "QUuid({%x-%x-%x-%x%x-%x%x%x%x%x%x})" % (self.val['data1'], self.val['data2'], self.val['data3'], - self.val['data4'][0], self.val['data4'][1], - self.val['data4'][2], self.val['data4'][3], - self.val['data4'][4], self.val['data4'][5], - self.val['data4'][6], self.val['data4'][7]) - - def display_hint (self): - return 'string' - -pretty_printers_dict = {} - -def register_qt4_printers (obj): - if obj == None: - obj = gdb - - obj.pretty_printers.append(FunctionLookup(gdb, pretty_printers_dict)) - -def build_dictionary (): - pretty_printers_dict[re.compile('^QString$')] = lambda val: QStringPrinter(val) - pretty_printers_dict[re.compile('^QByteArray$')] = lambda val: QByteArrayPrinter(val) - pretty_printers_dict[re.compile('^QList<.*>$')] = lambda val: QListPrinter(val, 'QList', None) - pretty_printers_dict[re.compile('^QStringList$')] = lambda val: QListPrinter(val, 'QStringList', 'QString') - pretty_printers_dict[re.compile('^QQueue')] = lambda val: QListPrinter(val, 'QQueue', None) - pretty_printers_dict[re.compile('^QVector<.*>$')] = lambda val: QVectorPrinter(val, 'QVector') - pretty_printers_dict[re.compile('^QStack<.*>$')] = lambda val: QVectorPrinter(val, 'QStack') - pretty_printers_dict[re.compile('^QLinkedList<.*>$')] = lambda val: QLinkedListPrinter(val) - pretty_printers_dict[re.compile('^QMap<.*>$')] = lambda val: QMapPrinter(val, 'QMap') - pretty_printers_dict[re.compile('^QMultiMap<.*>$')] = lambda val: QMapPrinter(val, 'QMultiMap') - pretty_printers_dict[re.compile('^QHash<.*>$')] = lambda val: QHashPrinter(val, 'QHash') - pretty_printers_dict[re.compile('^QMultiHash<.*>$')] = lambda val: QHashPrinter(val, 'QMultiHash') - pretty_printers_dict[re.compile('^QDate$')] = lambda val: QDatePrinter(val) - pretty_printers_dict[re.compile('^QTime$')] = lambda val: QTimePrinter(val) - pretty_printers_dict[re.compile('^QDateTime$')] = lambda val: QDateTimePrinter(val) - pretty_printers_dict[re.compile('^QUrl$')] = lambda val: QUrlPrinter(val) - pretty_printers_dict[re.compile('^QSet<.*>$')] = lambda val: QSetPrinter(val) - pretty_printers_dict[re.compile('^QChar$')] = lambda val: QCharPrinter(val) - pretty_printers_dict[re.compile('^QUuid')] = lambda val: QUuidPrinter(val) - - -build_dictionary () diff --git a/kdevelop/debuggers/gdb/printers/tests/CMakeLists.txt b/kdevelop/debuggers/gdb/printers/tests/CMakeLists.txt deleted file mode 100644 index d489bd35..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -configure_file(qtprintersconfig.h.in qtprintersconfig.h) - -add_debuggable_executable(qstring SRCS qstring.cpp) -target_link_libraries(qstring ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qbytearray SRCS qbytearray.cpp) -target_link_libraries(qbytearray ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qlistcontainer SRCS qlistcontainer.cpp) -target_link_libraries(qlistcontainer ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qmapint SRCS qmapint.cpp) -target_link_libraries(qmapint ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qmapstring SRCS qmapstring.cpp) -target_link_libraries(qmapstring ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qmapstringbool SRCS qmapstringbool.cpp) -target_link_libraries(qmapstringbool ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qdate SRCS qdate.cpp) -target_link_libraries(qdate ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qtime SRCS qtime.cpp) -target_link_libraries(qtime ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qdatetime SRCS qdatetime.cpp) -target_link_libraries(qdatetime ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qurl SRCS qurl.cpp) -target_link_libraries(qurl ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qhashint SRCS qhashint.cpp) -target_link_libraries(qhashint ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qhashstring SRCS qhashstring.cpp) -target_link_libraries(qhashstring ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qsetint SRCS qsetint.cpp) -target_link_libraries(qsetint ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qsetstring SRCS qsetstring.cpp) -target_link_libraries(qsetstring ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qchar SRCS qchar.cpp) -target_link_libraries(qchar ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(quuid SRCS quuid.cpp) -target_link_libraries(quuid ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(qlistpod SRCS qlistpod.cpp) -target_link_libraries(qlistpod ${QT_QTCORE_LIBRARY}) - -add_debuggable_executable(ktexteditortypes SRCS ktexteditortypes.cpp) -target_link_libraries(ktexteditortypes ${QT_QTCORE_LIBRARY} ${KDE4_KTEXTEDITOR_LIBS}) - -add_debuggable_executable(kdeveloptypes SRCS kdeveloptypes.cpp) -target_link_libraries(kdeveloptypes ${QT_QTCORE_LIBRARY} ${KDEVPLATFORM_UTIL_LIBRARIES}) - -kde4_add_unit_test(qtprinters qtprinters.cpp) -target_link_libraries(qtprinters - ${QT_QTCORE_LIBRARY} - ${QT_QTTEST_LIBRARY} -) diff --git a/kdevelop/debuggers/gdb/printers/tests/kdeveloptypes.cpp b/kdevelop/debuggers/gdb/printers/tests/kdeveloptypes.cpp deleted file mode 100644 index 541c1af2..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/kdeveloptypes.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include - -#include - -using namespace KDevelop; - -int main() -{ - Path path1("/tmp/foo"); - Path path2("http://www.test.com/tmp/asdf.txt"); - - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/ktexteditortypes.cpp b/kdevelop/debuggers/gdb/printers/tests/ktexteditortypes.cpp deleted file mode 100644 index 77e4c87d..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/ktexteditortypes.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main() -{ - KTextEditor::Cursor cursor(1, 1); - - KTextEditor::Range range(1, 1, 2, 2); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qbytearray.cpp b/kdevelop/debuggers/gdb/printers/tests/qbytearray.cpp deleted file mode 100644 index 8d68bcc6..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qbytearray.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - QByteArray ba("test byte array"); - ba.append("x"); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qchar.cpp b/kdevelop/debuggers/gdb/printers/tests/qchar.cpp deleted file mode 100644 index b5c98422..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qchar.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - QChar c('k'); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qdate.cpp b/kdevelop/debuggers/gdb/printers/tests/qdate.cpp deleted file mode 100644 index 202633e6..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qdate.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - QDate d(2010, 1, 20); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qdatetime.cpp b/kdevelop/debuggers/gdb/printers/tests/qdatetime.cpp deleted file mode 100644 index ff2e24cc..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qdatetime.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - QDateTime dt(QDate(2010, 1, 20), QTime(15, 31, 13)); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qhashint.cpp b/kdevelop/debuggers/gdb/printers/tests/qhashint.cpp deleted file mode 100644 index 74ff2825..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qhashint.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -int main() -{ - QHash h; - h[10] = 100; - h[20] = 200; - h[30] = 300; - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qhashstring.cpp b/kdevelop/debuggers/gdb/printers/tests/qhashstring.cpp deleted file mode 100644 index 4c16b2dd..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qhashstring.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -int main() -{ - QHash h; - h[QString("10")] = QString("100"); - h[QString("20")] = QString("200"); - h[QString("30")] = QString("300"); - return 0; -} diff --git a/kdevelop/debuggers/gdb/printers/tests/qlistcontainer.cpp b/kdevelop/debuggers/gdb/printers/tests/qlistcontainer.cpp deleted file mode 100644 index a44c3832..00000000 --- a/kdevelop/debuggers/gdb/printers/tests/qlistcontainer.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -struct A { - A(const QString& _a = QString(), const QString& _b = QString(), - int _c = -1, int _d = -1) - : a(_a), b(_b), c(_c), d(_d) - {} - bool operator==(const A& other) const - { - return a == other.a && b == other.b && c == other.c && d == other.d; - } - QString a; - QString b; - int c; - int d; -}; - -uint qHash(const A& a) -{ - return qHash(a.a) + qHash(a.b); -} - -template