New UI Git plugin for QtCreator: GitQlient

Today I’m really happy to announce that the first version of the Git plugin for QtCreator has been released!

In the last post I advanced some of the final work that will be part of the first version of GitQlient. But what I didn’t explain so far is that that refactor, the re-work and addition of new functionality and the new redesign of the UI had one purpose: provide a Git plugin UI-based for QtCreator!

How to install the Git plugin

You can find the plugin in the release section of GitHub, but I give you the link as well:

Once you have downloaded the plugin, copy it into the QtCreator folder where Qt is installed (Qt/Tools/QtCreator/lib/qtcreator/plugins) or in the following folders:

  • Linux:
    • ~/.local/share/data/QtProject/qtcreator/plugin/<version>
  • Windows
    • %LOCALAPPDATA%\QtProject\qtcreator\plugins\<version>
  • OSX
    • ~/Library/Application Support/QtProject/Qt Creator/plugins/<version>

You need to replace <version> with the QtCreator version (e.g. 4.10.2).

The plugin is activated by default once you have copied it, so you just will need to reboot QtCreator.

How to use the Git plugin for QtCreator

As said before, the plugin will be active by default. That will add a new tab in the left panel with the name of GitQlient (the shourtcut is managed by QtCreator and is Ctrl+4):

New tab option for GitQlient
New tab option for GitQlient

If you go in that tab you will find the main window of GitQlient as it is in the app. I’ve disabled the logs in the plugin but apart from that is the same version.

As you can see, I’ve even added the support for multiple repositories in the view:

Support for multi-repo view - GitQlientPlugin - Git plugin for QtCreator
Support for multi-repo view – GitQlientPlugin – Git plugin for QtCreator

In the top of the window you will find the main controls. You will find all the available options in context menu inside every view. The Blame&History view is also available:

Blame&History view - GiQlientPlugin - Git plugin for QtCreator
Blame&History view – GiQlientPlugin – Git plugin for QtCreator

How to report an error, bug or request a new feature

If you find an error or a bug, please contact me as soon as possible so I can fix it. I’m using GitHub issues to help me on that task.

Since the 99% of the code belongs to GitQlient, please open an issue in that repo on GitHub and I’ll manage from there 🙂

In the Project area, you can see all the new features that are planned for the version 2.0.0. If you want something that is not there, don’t hesitate to add a new issue as Feature or Improvement in the issues page as you did for bug/errors.

Further work

The plan is to release a version of the plugin every time that QtCreator updates.

In addition and not to loose all the new features, I’ll release a new version of the plugin every time that GitQlient updates.

How to set up TravisCI for Qt apps

When I started GitQlient and GitQlientPlugin one of the first things I wanted was to setup TravisCI for Qt apps. The main reason is, of course, to have a system that checks a clean build of both projects.

The other reason, however, is that I think its a quite nice environment to deploy your build in GitHub. Locally, your system can be messed up with versions and old objects that are not cleared, etc. By doing it in this way, one is allowed to have a clean build in a really controlled environment. In addition, you can run as much versions and they are deploy independently.

This is post is more a remind me in the future rather than a how to, although I hope people find it useful.

(more…)

GitQlient: Preparing the first version

In the last post I showed all the major widgets that forms GitQlient, at least in their original design. After a month and a half of intense work, I’ve made some significant changes in the UI but also in the functionality.

For the first version I wanted to improve the UI and make GitQlient as stable as possible. However, I couldn’t resist to add all the features that I was missing for my day to day work. So after this time GitQlient no only had the functionality I showed so far. Here is what it’s new and will be part of the version 1.0.0.

The next post: about the release and something else!

(more…)

GitQlient: The new UI (Part II)

In the previous entry of this series of posts I introduced the change I planned to transform QGit in a new app and plugin called GitQlient.

A new UI for GitQlient

In the old QGit there was a mix of UI files, in place widgets and classes that handle data and return widgets because… why not? A mess. For GitQlient, I separated the UI by scopes and I changed the main window for a QWidget so I can easily integrate it in QtCreator as a plugin.

Centralized controls

In QGit there were a lot of controls, menu and options all around. You could easily feel a bit lost not because of the amount but because of their unspecific behavior. In GitQlient, I’ve opted for a central controls widget, with the main used actions and some additional features but trying to avoid as much as a possible to overwhelm the user. The Controls is widget composed by a series of buttons. The widget allows you to apply the main Git actions but also to move between the different views.

Controls widget of GitQlient
Controls widget of GitQlient
(more…)

GitQlient: The evolution of QGit (Part I)

Update: I’ve been noticed that Heimdal is already used so I’ve changed the name to GitQlient, that is not fancy but it will do it for now! 🙂

Some time ago I started looking into which possibilities I have to handle Git repositories in UI-based. The one that I like the most is GitKraken but I’m not willing to pay the price it cost. Specially since I need to work with private and/or company-hosted repositories. For that reason, I started by looking for a Qt app already made I could use. Or in the worst case adapt to my own use.

I discovered an app called QGit that is available for Linux which I could easily work with. The drawbacks were that it was using really old code and was done in quite an ugly style. Those were two of the most important inconveniences since it I wanted to understand exactly how things were done. And if needed, easily modify the app for my personal needs. After some analysis I came to the conclusion that QGit needs a big refactor. And that is what I’ve done!

(more…)

Orthodox canonical class form

This post is more about the basics of C++ and the last things C++11 brings to the orthodox canonical class form (OCCF). Some times the basics of a programming language are assumed by everybody but there is always a the time when someone asks why. Implement the complete OCCF is something that not always is required. In fact when you work with Qt framework and specially with widgets or inheritance from QObject is something you usually don’t care. And that’s an error.

(more…)

Bicing Barcelona with Qt

When I was living in Barcelona I saw that there is a OpenData service to get the information of the Bicing (bike public service). They provide the data in several formats such as CSV, XML and JSON. I wanted to write an app for Windows and Linux that retrieves the information from the stations and shows their current status. And for that, I chose JSON since I think the format is easier to read than XML.

After thinking a while I realised that it could be useful not just have every Bicing station data on demand but also a historic. To achieve that I split the app in two separated parts: “backend” that works as a deamon or service, and “frontend” that is the actual GUI app.

(more…)

Customization of a QCompleter

Time ago I had the task to create a QComboBox and a QLineEdit that open a completer so the user can select between all the suggested options. So far it seems a quite easy task by using the QCompleter that Qt provides.

The interesting part starts when I had to add customized styles for both the QComboBox and the QLineEdit, and make them match with the styles that I also had to add to the QCompleter. In addition I had a language constraint that initially I didn’t take into account but it impacted the performance of the widget. That’s the default filter implemented in QCompleter.

(more…)

Testing QTableWidget with QTest

In the last post I talked about how to integrate tests in the build environment. When we talk about testing I always think on unit testing for my classes and methods but I usually forget UI testing.

With Qt we have a really nice environment to test GUI as well. Widgets implement all the power of signals and slots, and Qt provides a wide range of signals so we can keep track of what happened and what’s currently happening. The fact that we can work with QSignalSpy makes all or testing easier. At least if we know what to test, because some times is not that straight-forward with widgets. Specially with QListWidget, QTableWidget and QTreeWidget classes.

In the Qt5 repository we can finde a lot of tests for those classes:

(more…)

Integrating Qt Test in Travis CI

For a long time I wanted to create a full Continuous Integration environment that uses Qt for both building apps and testing. In fact, one of the most important things for me was to find the right way to integrate Qt Test. For CI I’ve started to use Travis since it is one of the most widely used environments in GitHub. I took that decision after seeing other Qt projects (Musescore and Stellarium) using it.

The main difference between those projects and the one I wanted to set up, is that they’re using CTest as a testing tool. With that tool they can report when the tests are broken easily. But, how the hell I was going to do it with Qt?

(more…)