Skip to content

Commit

Permalink
Merge pull request #21 from peterkomar/new-features
Browse files Browse the repository at this point in the history
New features
  • Loading branch information
peterkomar committed Dec 14, 2015
2 parents 6c97aea + e10bbda commit c89388f
Show file tree
Hide file tree
Showing 22 changed files with 406 additions and 201 deletions.
78 changes: 78 additions & 0 deletions build/rpm/qrestclient-2.0.1.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#
# spec file for package qrestclient-2.0.1
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name: qrestclient
Version: 2.0.1
Release: 1
License: GPL
Summary: Rest client
Url: https://github.com/peterkomar/qrestclient
Vendor: Peter Komar
Group: Development/Networking
Source: qrestclient-2.0.1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build

%description
QRestClient testing tool for sending REST requests with different GET, POST, PUT, DELETE parameters, heders, raw body etc.

This tool will be helpful for developers working on web API services.

Featuers:

* Execution time calculation
* Parse GET params from URL
* Requests history & cleaner
* JSON response viewer
* CSV response viewer
* Request details viewer
* Share request to Gist
%prep
%setup -q

%build
qmake-qt5
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/icons
cp bin/qrestclient %{buildroot}/usr/bin
cp -R desktop/qrestclient.desktop %{buildroot}/usr/share/applications
cp -R -f desktop/icons %{buildroot}/usr/share
%clean
rm -rf $RPM_BUILD_ROOT
%post

%postun

%files
%defattr(-,root,root)
/usr/bin/qrestclient
/usr/share/applications/qrestclient.desktop
/usr/share/icons/hicolor/16x16/apps/qrestclient.png
/usr/share/icons/hicolor/24x24/apps/qrestclient.png
/usr/share/icons/hicolor/32x32/apps/qrestclient.png
/usr/share/icons/hicolor/48x48/apps/qrestclient.png
/usr/share/icons/hicolor/64x64/apps/qrestclient.png
/usr/share/icons/hicolor/128x128/apps/qrestclient.png
/usr/share/icons/hicolor/256x256/apps/qrestclient.png
/usr/share/icons/hicolor/512x512/apps/qrestclient.png
%changelog
* Thu Dec 2 2015 Peter Komar <peter0komar@gmail.com>
- Builded app for openSUSE Leap 42.1

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added desktop/icons/hicolor/16x16/apps/qrestclient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added desktop/icons/hicolor/24x24/apps/qrestclient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added desktop/icons/hicolor/64x64/apps/qrestclient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
15 changes: 1 addition & 14 deletions src/mainpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,11 @@
#include "restclientmainwindow.h"
#include "responsewidget.h"

#include <QPlainTextEdit>
#include <QVBoxLayout>

MainPanel::MainPanel(RestClientMainWindow* app)
{
m_response = new ResponseWidget(app);
m_response->setMinimumSize(500, 205);

m_errorResponse = new QPlainTextEdit;
m_errorResponse->setPlainText(QObject::tr(""));
m_errorResponse->setReadOnly(true);
m_errorResponse->setMinimumSize(500, 40);
m_errorResponse->setMaximumHeight(40);

QWidget *main = new QWidget;
QVBoxLayout *pvLayout = new QVBoxLayout(main);
pvLayout->addWidget(m_response);
pvLayout->addWidget(m_errorResponse);
app->setCentralWidget(main);
app->setCentralWidget(m_response);
}

4 changes: 1 addition & 3 deletions src/mainpanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@

class RestClientMainWindow;
class ResponseWidget;
class QPlainTextEdit;

class MainPanel
{
public:
MainPanel(RestClientMainWindow* app);
ResponseWidget *m_response;
QPlainTextEdit *m_errorResponse;
ResponseWidget *m_response;
};

#endif // MAINPANEL_H
3 changes: 3 additions & 0 deletions src/paramdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ void ParamDlg::initPredefinedHeaders()
list << "keep-alive"
<< "Upgrade";
addHeader("Connection", list);

m_cName->setCurrentIndex(-1);
m_cValue->clear();
}

void ParamDlg::addHeader(const QString& header, QStringList& values)
Expand Down
2 changes: 1 addition & 1 deletion src/paramslist.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/***************************************************************************
/***************************************************************************
* Copyright (C) 2014 by peter komar *
* udldevel@gmail.com *
* *
Expand Down
Loading

0 comments on commit c89388f

Please sign in to comment.