Changeset - 196054fd9816
[Not reviewed]
default
0 1 0
Hasan Yavuz ÖZDERYA - 8 years ago 2017-08-27 13:41:17
hy@ozderya.net
don't show usb icon for "tty" ports even if they have a VID&PID defined
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/portlist.cpp
Show inline comments
 
/*
 
  Copyright © 2016 Hasan Yavuz Özderya
 
  Copyright © 2017 Hasan Yavuz Özderya
 

	
 
  This file is part of serialplot.
 

	
 
  serialplot 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 3 of the License, or
 
@@ -47,13 +47,14 @@ void PortListItem::construct(QString nam
 
{
 
    QString text = name;
 
    if (!description.isEmpty())
 
    {
 
        text += QString(" ") + description;
 
    }
 
    if (vid && pid)
 
    // Note: in some cases internal ports or RS232 ports may have VID&PID
 
    if (vid && pid && !name.contains("tty"))
 
    {
 
        text += QString("[%1:").arg(vid, 4, 16, QChar('0'));
 
        text += QString("%1]").arg(pid, 4, 16, QChar('0'));
 
        setIcon(QIcon(":/usb_icon.png"));
 
    }
 
    else if (name.contains("rfcomm"))
0 comments (0 inline, 0 general)