Messagelib

openwithurlinfo.cpp
1 /*
2  SPDX-FileCopyrightText: 2022-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "openwithurlinfo.h"
8 
9 using namespace MessageViewer;
10 OpenWithUrlInfo::OpenWithUrlInfo() = default;
11 
12 OpenWithUrlInfo::~OpenWithUrlInfo() = default;
13 
15 {
16  d << "command " << t.command();
17  d << "command line " << t.commandLine();
18  d << "url " << t.url();
19  return d;
20 }
21 
22 const QString &OpenWithUrlInfo::command() const
23 {
24  return mCommand;
25 }
26 
27 void OpenWithUrlInfo::setCommand(const QString &newCommand)
28 {
29  mCommand = newCommand;
30 }
31 
32 const QString &OpenWithUrlInfo::url() const
33 {
34  return mUrl;
35 }
36 
37 void OpenWithUrlInfo::setUrl(const QString &newUrl)
38 {
39  mUrl = newUrl;
40 }
41 
42 bool OpenWithUrlInfo::isValid() const
43 {
44  return !mUrl.isEmpty() && !mCommand.isEmpty();
45 }
46 
47 const QString &OpenWithUrlInfo::commandLine() const
48 {
49  return mCommandLine;
50 }
51 
52 void OpenWithUrlInfo::setCommandLine(const QString &newCommandLine)
53 {
54  mCommandLine = newCommandLine;
55 }
56 
57 bool OpenWithUrlInfo::operator==(const OpenWithUrlInfo &other) const
58 {
59  return mCommandLine == other.commandLine() && mCommand == other.command() && mUrl == other.url();
60 }
The OpenWithUrlInfo class.
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 20 2023 04:04:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.